Function at 0x47a340
Capabilities:
Clear file content
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 8
push ebx
mov eax, dword [esp + 0x10]
push ebp
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
mov dword [esp + 0x28], ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x47a385
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 0x80000020
pop ebx
add esp, 8
ret 0xc
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
push edi
push 0x42
call ebp
mov ebx, eax
test ebx, ebx
je 0x47a3d0
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x47a3c9
lea ecx, [esp + 0x1c]
push 0
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x1c], edi
je 0x47a3ea
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test esi, esi
je 0x47a3db
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 0x80000020
pop ebx
add esp, 8
ret 0xc
test esi, esi
je 0x47a3f7
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
push 0x42
call ebp
mov edi, eax
test edi, edi
jne 0x47a415
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x47a4f6
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
push edx
push edi
push ebx
call fcn.0047a100
mov ebp, eax
test ebp, ebp
jge 0x47a44e
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
call ebx
push edi
call ebx
test esi, esi
je 0x47a442
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp esi, ebp
je 0x47a47e
test esi, esi
je 0x47a47c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, ebp
cmp esi, 0xffffffff
jne 0x47a4a6
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call esi
push edi
call esi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 0x80000030
pop ebx
add esp, 8
ret 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
mov dword [esp + 0x24], eax
jne 0x47a4c0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
call ebx
jmp 0x47a4f3
push edi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x14]
mov ebp, eax
push 0
push ecx
push ebp
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x14], ebp
je 0x47a510
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call ebx
test esi, esi
je 0x47a501
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 0x80000030
pop ebx
add esp, 8
ret 0xc
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test esi, esi
je 0x47a524
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
call ebx
push edi
call ebx
test esi, esi
je 0x47a542
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 0xc