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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [esp], 1
call fcn.00407f1f
test eax, eax
push edx
je 0x407fae
mov dword [esp + 8], 5
mov dword [esp + 4], ebx
mov dword [esp], esi
call eax
sub esp, 0xc
test eax, eax
jne 0x408203
test ebx, ebx
mov dword [0x4304c8], 0x4c554e
je 0x408010
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.00407802
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x4304c8
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
sub esp, 0xc
cmp eax, 0x400
jg 0x408209
test eax, eax
je 0x408209
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x4308c8
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
sub esp, 0xc
cmp eax, 0x400
jg 0x408209
test eax, eax
je 0x408209
mov dword [esp + 0xc], 0x4308c8
mov dword [esp + 8], 0x4304c8
mov dword [esp + 4], str._s_s_r_n
mov dword [esp], 0x430cc8
call dword [sym.imp.USER32.dll_wsprintfA]
mov dword [ebp - 0x2c], eax
mov eax, dword [0x43280c]
mov eax, dword [eax + 0x128]
mov dword [esp], 0x4308c8
mov dword [esp + 4], eax
call fcn.00407b4f
push edi
push edi
mov dword [esp + 8], 4
mov dword [esp + 4], 0xc0000000
mov dword [esp], 0x4308c8
call fcn.00407802
sub esp, 0xc
cmp eax, 0xffffffff
mov edi, eax
je 0x408203
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [ebp - 0x2c]
push ecx
mov ebx, eax
push ecx
lea eax, [eax + edx + 0xa]
mov dword [esp + 4], eax
mov dword [esp], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
push esi
push esi
mov esi, eax
je 0x4081f9
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x4081f9
cmp ebx, dword [ebp - 0x1c]
jne 0x4081f9
mov dword [esp + 4], str._Rename__r_n
mov dword [esp], esi
call fcn.0040773a
test eax, eax
push edx
push edx
jne 0x40814d
lea eax, [esi + ebx]
add ebx, 0xa
mov dword [esp + 4], str._Rename__r_n
mov dword [esp], eax
call fcn.00407a3d
push ecx
push ecx
mov ecx, ebx
jmp 0x408189
add eax, 0xa
mov dword [esp + 4], 0x40b3ef
mov dword [esp], eax
call fcn.0040773a
mov ecx, ebx
push edx
test eax, eax
push edx
je 0x408189
lea ecx, [eax + 1]
lea edx, [esi + ebx]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x34], edx
jmp 0x40817e
mov cl, byte [eax]
mov edx, dword [ebp - 0x2c]
mov byte [eax + edx], cl
inc eax
cmp eax, dword [ebp - 0x34]
jb 0x408176
mov ecx, dword [ebp - 0x30]
sub ecx, esi
mov eax, dword [ebp - 0x2c]
add ecx, esi
mov dword [esp], ecx
mov dword [esp + 4], 0x430cc8
mov dword [esp + 8], eax
call fcn.004077a7
add ebx, dword [ebp - 0x2c]
sub esp, 0xc
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x1c]
sub esp, 0x10
mov dword [esp + 8], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
inc dword [0x4327dc]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8