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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90c
push ebx
mov ebx, ecx
push esi
push edi
mov edi, dword [ebx + 0x50]
xor esi, esi
cmp edi, esi
mov dword [ebp - 0x14], ebx
je 0x10008dd8
cmp dword [ebx + 0x58], esi
je 0x10008dd8
lea eax, [edi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 0xa
cmp eax, 0x3e8
jae 0x10008dd8
mov eax, dword [ebx + 0x64]
cmp eax, esi
je 0x10008dd8
push esi
push 0x8000080
push 2
push esi
push esi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
je 0x10008dd2
mov eax, dword [edi + 0x3f8]
mov dword [ebp - 4], 1
cmp eax, esi
mov dword [ebp - 0xc], esi
jle 0x10008db0
cmp dword [ebp - 4], esi
je 0x10008db0
cmp eax, 1
lea ecx, [edi + 0x10]
jle 0x10008cd0
push dword [ebp - 0xc]
lea eax, [ebp - 0x50c]
push ecx
push str._s__d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x50c]
lea eax, [ebp - 0x124]
push 0x104
push eax
push esi
push esi
push 0xffffffffffffffff
push esi
push ecx
lea ecx, [ebx + 8]
call fcn.10010e5c
test eax, eax
je 0x10008da5
push esi
push 0x8000000
push 3
push esi
push 1
lea eax, [ebp - 0x124]
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10008daa
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, esi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], esi
jbe 0x10008d87
lea eax, [ebp - 8]
push esi
push eax
lea eax, [ebp - 0x90c]
push 0x400
push eax
push ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10008d84
cmp dword [ebp - 8], esi
je 0x10008d84
lea eax, [ebp - 0x10]
push esi
push eax
lea eax, [ebp - 0x90c]
push dword [ebp - 8]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10008d84
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jne 0x10008d84
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
jb 0x10008d2c
jmp 0x10008d87
mov dword [ebp - 4], esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 0xc]
mov eax, dword [edi + 0x3f8]
cmp dword [ebp - 0xc], eax
mov ebx, dword [ebp - 0x14]
jl 0x10008ca0
jmp 0x10008db0
mov dword [ebp - 4], esi
jmp 0x10008db0
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 4], esi
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], esi
jne 0x10008de4
mov ecx, ebx
call fcn.10009009
mov dword [edi], 0xffffff31
push esi
call dword [sym.imp.USER32.dll_PostQuitMessage]
pop edi
pop esi
pop ebx
leave
ret
mov eax, dword [edi + 0x3fc]
cmp eax, esi
je 0x10008e02
cmp dword [ebp - 0x10], eax
je 0x10008e02
mov ecx, ebx
call fcn.10009009
mov dword [edi], 0xffffff30
jmp 0x10008dd8
mov eax, dword [0x10018950]
push esi
push esi
push eax
push esi
push dword [ebx + 0x64]
call fcn.1001246f
add esp, 0x14
mov ecx, ebx
test al, al
jne 0x10008e29
call fcn.10009009
mov dword [edi], 0xffffff2f
jmp 0x10008dd8
call fcn.10008e30
jmp 0x10008ddf