Function at 0x6578d9
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov dword [ebp - 0x7c], ecx
mov ecx, dword [ebp - 0x7c]
add ecx, 0x120
call fcn.00661adf
mov dword [ebp - 0x64], eax
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 0x7c]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0xffffffff
jne 0x657920
jmp 0x657b24
push 0x2c
push 0
lea ecx, [ebp - 0x30]
push ecx
call fcn.00642ec0
add esp, 0xc
mov dword [ebp - 0x38], 0
push 0x14
push 0
lea edx, [ebp - 0x54]
push edx
call fcn.00642ec0
add esp, 0xc
push 0x14
mov eax, dword [ebp - 0x7c]
add eax, 0x108
push eax
lea ecx, [ebp - 0x54]
push ecx
call fcn.00642a60
add esp, 0xc
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx + 0x11c]
push eax
push 0x14
lea ecx, [ebp - 0x54]
push ecx
mov ecx, dword [ebp - 0x7c]
call fcn.00657193
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx + 0x11c]
push eax
lea ecx, [ebp - 0x54]
push ecx
mov ecx, dword [ebp - 0x7c]
call fcn.00658340
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x64], 0
je 0x657a57
mov edx, dword [ebp - 0x64]
push edx
mov ecx, dword [ebp - 0x7c]
add ecx, 0x120
call fcn.00661ba4
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
cmp dword [eax], 0x2c
jne 0x657a01
push 0x2c
lea ecx, [ebp - 0x64]
push ecx
mov ecx, dword [ebp - 0x7c]
add ecx, 0x120
call fcn.00661bd2
push eax
lea edx, [ebp - 0x30]
push edx
call fcn.00642a60
add esp, 0xc
mov eax, dword [ebp - 0x38]
push eax
push 0x2c
lea ecx, [ebp - 0x30]
push ecx
mov ecx, dword [ebp - 0x7c]
call fcn.00657193
push 0
lea edx, [ebp - 0x6c]
push edx
push 0x2c
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x657a52
mov edx, dword [ebp - 0x68]
cmp dword [edx], 0x18
jne 0x657a52
push 0x18
lea eax, [ebp - 0x64]
push eax
mov ecx, dword [ebp - 0x7c]
add ecx, 0x120
call fcn.00661bd2
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.00642a60
add esp, 0xc
mov edx, dword [ebp - 0x38]
push edx
push 0x18
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x7c]
call fcn.00657193
push 0
lea ecx, [ebp - 0x70]
push ecx
push 0x18
lea edx, [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x65798f
mov ecx, dword [ebp - 0x7c]
add ecx, 0x120
call fcn.00661990
mov word [ebp - 0x40], ax
push 0
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub eax, 4
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x3c]
push edx
call fcn.0067cb4a
add esp, 4
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x58], eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0x60]
push edx
mov eax, dword [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x58]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x58]
push ecx
mov ecx, dword [ebp - 0x7c]
call fcn.006570c3
mov word [ebp - 0x34], ax
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x78], edx
mov eax, dword [ebp - 0x78]
push eax
call fcn.0067cb73
add esp, 4
push 2
push 0
push 0xfffffffffffffffc
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 4]
push edx
push 2
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [ebp - 4]
push edx
push 2
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esp, ebp
pop ebp
ret