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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x10d0640]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
or dword [ebp - 0x214], 0xffffffff
mov dword [ebp - 0x220], edx
mov edx, dword [ebp + 0x10]
push ebx
xor ebx, ebx
mov dword [ebp - 0x228], edx
mov edx, dword [ebp + 0x14]
push esi
push edi
mov dword [ebp - 0x21c], ecx
mov dword [ebp - 0x224], edx
mov dword [ebp - 0x218], ebx
mov byte [ebp - 0x20d], bl
mov dword [ebp - 0x22c], ebx
cmp eax, ebx
jne 0x1070872
mov dword [ebp - 0x218], ecx
jmp 0x10708f8
push eax
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
xor ecx, ecx
push eax
mov word [ebp - 0x20c], cx
call fcn.0102dff2
mov edi, eax
cmp edi, ebx
je 0x107089c
push edi
push 0x10d9013b
jmp 0x10708d6
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.0107043d
mov edi, eax
cmp edi, ebx
je 0x10708b7
push edi
push 0x10dc013b
jmp 0x10708d6
push dword [ebp - 0x21c]
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0102e02c
mov edi, eax
cmp edi, ebx
je 0x10708db
push edi
push 0x10df013b
call fcn.0108c503
mov esi, edi
cmp edi, ebx
je 0x10708ec
push edi
push 0x1108013b
jmp 0x1070ab4
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x218], eax
push 1
push dword [ebp - 0x218]
call fcn.0106ea6e
mov dword [ebp - 0x214], eax
cmp eax, 0xffffffff
jne 0x1070922
call fcn.01091f1e
mov esi, eax
push esi
push 0x1111013b
jmp 0x1070ab4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1070936
mov byte [ebp - 0x20d], 1
push ebx
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x107095c
call fcn.01091f1e
mov esi, eax
push esi
push 0x111c013b
jmp 0x1070ab4
cmp esi, dword [ebp + 0xc]
jne 0x1070a27
push esi
push ebx
mov byte [ebp - 0x20e], bl
mov dword [ebp - 0x21c], ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
mov dword [ebp - 0x230], edi
cmp edi, ebx
jne 0x107099a
mov esi, 0x8007000e
push esi
push 0x1129013b
call fcn.0108c503
jmp 0x1070b41
push ebx
lea eax, [ebp - 0x21c]
push eax
push esi
push edi
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10709dc
cmp esi, dword [ebp - 0x21c]
jne 0x10709dc
mov ecx, esi
mov esi, dword [ebp - 0x220]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10709cf
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x10709f0
mov byte [ebp - 0x20e], 1
jmp 0x10709f0
call fcn.01091f1e
cmp eax, ebx
je 0x10709f0
push eax
push 0x113c013b
call fcn.0108c503
push dword [ebp - 0x230]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp byte [ebp - 0x20e], bl
jne 0x1070b09
cmp dword [0x10d22a0], ebx
jne 0x1070a44
mov eax, 0x800700b7
push eax
push 0x1148013b
mov esi, eax
call fcn.0108c503
jmp 0x1070b13
cmp byte [ebp - 0x20d], bl
je 0x1070a44
cmp dword [0x10d22a0], ebx
jne 0x1070a44
mov eax, 0x800700b7
push eax
push 0x114e013b
jmp 0x1070a1b
push ebx
push ebx
push ebx
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1070a67
call fcn.01091f1e
mov esi, eax
push esi
push 0x1158013b
jmp 0x1070ab4
push ebx
lea eax, [ebp - 0x22c]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x220]
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1070a97
call fcn.01091f1e
mov esi, eax
push esi
push 0x1163013b
jmp 0x1070ab4
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1070abb
call fcn.01091f1e
mov esi, eax
push esi
push 0x1169013b
call fcn.0108c503
jmp 0x1070b0b
cmp dword [0x10d22a4], ebx
je 0x1070af3
push dword [ebp - 0x218]
xor eax, eax
cmp byte [ebp - 0x20d], bl
sete al
dec eax
and eax, 0x189
add eax, 0x97d
push eax
call fcn.0108bbbd
push eax
push 0x100cfd4
call fcn.0109c1c3
add esp, 0xc
mov eax, dword [ebp - 0x224]
cmp byte [ebp - 0x20d], bl
jne 0x1070b07
mov eax, dword [ebp - 0x228]
inc dword [eax]
xor esi, esi
cmp esi, 0x800700b7
jne 0x1070b3d
push 0x10027b8
push dword [ebp - 0x218]
push 0xb07
call fcn.0108bbbd
push eax
call fcn.0109c1c3
push 0x10042f8
call fcn.0109c1c3
add esp, 0x10
jmp 0x1070b4f
cmp esi, ebx
je 0x1070b4f
push dword [ebp - 0x218]
push esi
push ebx
push ebx
call fcn.0108bc9c
cmp dword [ebp - 0x214], 0xffffffff
je 0x1070b64
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.01077d0b
leave
ret 0x10