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

Disassembly:
sub esp, 0x24
mov eax, dword [esp + 0x28]
push ebx
push ebp
push edi
xor edi, edi
push edi
push 0x10000000
push 3
push edi
push 1
push 0xc0000000
push eax
xor ebx, ebx
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x18], ebp
jne 0x10008be4
pop edi
pop ebp
mov eax, 0xfffffffe
pop ebx
add esp, 0x24
ret
push esi
lea ecx, [esp + 0x20]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
xor eax, eax
cmp esi, 0xffffffff
mov dword [esp + 0x28], eax
jne 0x10008c24
test eax, eax
jne 0x10008c24
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x10008c20
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebp
mov eax, 0xfffffffd
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
neg edx
add esi, edx
mov edx, dword [esp + 0x50]
adc eax, 0
and edx, 0x400
mov dword [esp + 0x24], edx
jne 0x10008c60
cmp eax, dword [esp + 0x48]
ja 0x10008c60
jb 0x10008c4f
mov eax, dword [esp + 0x44]
cmp esi, eax
ja 0x10008c64
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x44]
mov ecx, eax
or ecx, dword [esp + 0x48]
jne 0x10008c7e
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], ecx
jmp 0x10008c98
mov ecx, dword [esp + 0x48]
cmp dword [esp + 0x40], ecx
jb 0x10008c98
ja 0x10008c90
cmp dword [esp + 0x3c], eax
jbe 0x10008c98
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ecx
test ecx, ecx
ja 0x10008e53
jb 0x10008cab
cmp eax, 0xffffffff
jae 0x10008e53
test edx, edx
push 0
push 0
je 0x10008cc2
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x14], esi
jmp 0x10008cd8
sub esi, dword [esp + 0x44]
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x14], edx
mov esi, edx
lea eax, [esi + 2]
push eax
call fcn.1000bbc2
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
je 0x10008e53
push 0
lea ecx, [esp + 0x30]
push ecx
push esi
push eax
push ebp
mov byte [esi + eax], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10008d21
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x10]
push edx
call fcn.1000b9ec
add esp, 4
jmp 0x10008e53
mov eax, dword [esp + 0x24]
test eax, eax
je 0x10008e2d
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x10008d3c
mov edi, dword [eax]
mov ebx, dword [eax + 4]
jmp 0x10008d66
mov eax, dword [esp + 0x10]
push 0xa
push eax
call fcn.1000e220
add esp, 8
test eax, eax
je 0x10008d74
nop
add edi, 1
adc ebx, 0
inc eax
push 0xa
push eax
call fcn.1000e220
add esp, 8
test eax, eax
jne 0x10008d50
cmp ebx, dword [esp + 0x48]
ja 0x10008d92
jb 0x10008d74
cmp edi, dword [esp + 0x44]
ja 0x10008d92
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x10]
push ecx
call fcn.1000b9ec
add esp, 4
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
mov esi, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
sub edi, esi
sbb ebx, edx
mov edx, dword [esp + 0x10]
push 0xa
mov ebp, edi
push edx
xor esi, esi
xor edi, edi
call fcn.1000e220
add esp, 8
test eax, eax
je 0x10008dd5
add esi, 1
adc edi, 0
inc eax
cmp esi, ebp
jne 0x10008dc6
cmp edi, ebx
je 0x10008e27
push 0xa
push eax
call fcn.1000e220
add esp, 8
test eax, eax
jne 0x10008db7
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x1c]
push 0
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [esp + 0x10]
push 0
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x20]
sub esi, eax
add esi, edi
push esi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push ebp
jne 0x10008e4d
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.1000b9ec
add esp, 4
pop esi
pop edi
pop ebp
mov eax, 0xfffffffa
pop ebx
add esp, 0x24
ret
mov dword [esp + 0x18], eax
jmp 0x10008dd5
mov edi, dword [esp + 0x10]
push 0xa
push edi
call fcn.1000e220
add esp, 8
test eax, eax
je 0x10008e47
inc eax
mov dword [esp + 0x18], eax
jmp 0x10008ddd
mov dword [esp + 0x18], edi
jmp 0x10008ddd
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x10]
push ecx
call fcn.1000b9ec
add esp, 4
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x24
ret