Function at 0x479ef0
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 0x479f35
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 0x479f80
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x479f72
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 0x479f9a
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test esi, esi
je 0x479f8b
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 0x479fa7
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push 0
push 0x42
call ebp
mov edi, eax
test edi, edi
jne 0x479fc6
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x47a0a7
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
push edx
push edi
push ebx
call fcn.00479ce0
mov ebp, eax
test ebp, ebp
jge 0x479fff
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
call ebx
push edi
call ebx
test esi, esi
je 0x479ff3
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 0x47a02f
test esi, esi
je 0x47a02d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, ebp
cmp esi, 0xffffffff
jne 0x47a057
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 0x47a071
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
call ebx
jmp 0x47a0a4
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 0x47a0c1
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 0x47a0b2
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 0x47a0d5
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 0x47a0f3
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