{"type": "func", "start": 6276416, "end": 6276488, "name": "FileOperation::saveFile", "pseudocode": "// \n// FileOperation::saveFile from 0x5fc540 to 0x5fc588 (72 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid FileOperation::saveFile()\n{\n  int v0; // r1\n  FILE *v1; // r0\n  FILE *v2; // r6\n  char *filename; // [sp+0h] [bp-8h] BYREF\n\n  FileOperation::getFilePath((FileOperation *)&filename, v0);\n  v1 = fopen(filename, \"w\");\n  v2 = v1;\n  if ( v1 )\n  {\n    fputs(\"file example\", v1);\n    fclose(v2);\n  }\n  sub_774008(&filename);\n}", "assembly": "; \n; FileOperation::saveFile from 0x5fc540 to 0x5fc588 (72 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH            {R0,R1,R4-R6,LR}                                       ; +0x0, 0x5fc540\nMOV             R0, SP; this                                           ; +0x2, 0x5fc542\nLDR             R4, =(__stack_chk_guard_ptr - 0x5FC54C)                ; +0x4, 0x5fc544\nMOV             R5, SP                                                 ; +0x6, 0x5fc546\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0x8, 0x5fc548\nLDR             R4, [R4]; __stack_chk_guard                            ; +0xa, 0x5fc54a\nLDR             R3, [R4]                                               ; +0xc, 0x5fc54c\nSTR             R3, [SP,#8+var_4]                                      ; +0xe, 0x5fc54e\nBL              _ZN13FileOperation11getFilePathEv; FileOperation::getFilePath(void) ; +0x10, 0x5fc550\nLDR             R1, =(aW - 0x5FC55C); \"w\"                              ; +0x14, 0x5fc554\nLDR             R0, [SP,#8+filename]; filename                         ; +0x16, 0x5fc556\nADD             R1, PC; \"w\"                                            ; +0x18, 0x5fc558\nBLX             fopen                                                  ; +0x1a, 0x5fc55a\nMOV             R6, R0                                                 ; +0x1e, 0x5fc55e\nCBZ             R0, loc_5FC572                                         ; +0x20, 0x5fc560\nLDR             R0, =(aFileExample - 0x5FC56A); \"file example\"         ; +0x22, 0x5fc562\nMOV             R1, R6; stream                                         ; +0x24, 0x5fc564\nADD             R0, PC; \"file example\"                                 ; +0x26, 0x5fc566\nBLX             fputs                                                  ; +0x28, 0x5fc568\nMOV             R0, R6; stream                                         ; +0x2c, 0x5fc56c\nBLX             fclose                                                 ; +0x2e, 0x5fc56e\nMOV             R0, R5                                                 ; +0x32, 0x5fc572\nBL              sub_774008                                             ; +0x34, 0x5fc574\nLDR             R2, [SP,#8+var_4]                                      ; +0x38, 0x5fc578\nLDR             R3, [R4]                                               ; +0x3a, 0x5fc57a\nCMP             R2, R3                                                 ; +0x3c, 0x5fc57c\nBEQ             loc_5FC584                                             ; +0x3e, 0x5fc57e\nBLX             __stack_chk_fail                                       ; +0x40, 0x5fc580\nADD             SP, SP, #8                                             ; +0x44, 0x5fc584\nPOP             {R4-R6,PC}                                             ; +0x46, 0x5fc586", "xrefs": [], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}