Function at 0x10013a60
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x4028
call fcn.10026d60
mov eax, dword [esi]
push ebx
mov ebx, dword [esp + 0x4034]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push edi
mov edi, dword [esp + 0x4040]
push 0
push 0
push edi
push ebx
push eax
call ebp
test eax, eax
jne 0x10013aac
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10013aa6
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x10013d19
mov eax, dword [esi]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x10
lea edx, [esp + 0x2c]
push edx
push eax
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10013c81
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10013ae9
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x10013d19
mov ecx, dword [esi]
xor eax, eax
push eax
push eax
push edi
push ebx
push ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call ebp
test eax, eax
jne 0x10013b26
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10013b20
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x10013d19
push esi
mov ecx, 0x10
lea edx, [esp + 0x24]
call fcn.10014360
test eax, eax
jl 0x10013d19
mov eax, dword [esi + 0xf]
sub eax, dword [esp + 0x4038]
sub eax, 1
mov dword [esp + 0x10], eax
je 0x10013cb4
mov dword [esp + 0x18], eax
cmp eax, 0x400
jb 0x10013b67
mov dword [esp + 0x18], 0x400
mov edi, dword [esi + 0xf]
mov edx, dword [esi]
sub edi, eax
dec edi
xor ebx, ebx
shl edi, 4
mov eax, edi
add eax, dword [esi + 0x23]
push ebx
mov ecx, ebx
adc ecx, dword [esi + 0x27]
add eax, 0x10
push ebx
adc ecx, ebx
push ecx
push eax
push edx
mov dword [esp + 0x30], ebx
call ebp
test eax, eax
jne 0x10013bae
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10013ba8
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x10013d19
mov ebp, dword [esp + 0x18]
mov edx, dword [esi]
push 0
lea eax, [esp + 0x18]
push eax
shl ebp, 4
push ebp
lea ecx, [esp + 0x3c]
push ecx
push edx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10013c9d
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
test eax, eax
jle 0x10013bf3
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x10013d19
add edi, dword [esi + 0x23]
mov eax, dword [esi]
adc ebx, dword [esi + 0x27]
push 0
push 0
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x10013c2a
call ebp
test eax, eax
jle 0x10013c24
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x10013d19
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esi]
push edx
lea eax, [esp + 0x3c]
push eax
push ecx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10013c68
call ebp
test eax, eax
jle 0x10013c62
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x10013d19
mov edx, dword [esp + 0x18]
sub dword [esp + 0x10], edx
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
je 0x10013cb4
mov eax, dword [esp + 0x10]
jmp 0x10013b54
cmp dword [esp + 0x10], 0x10
je 0x10013aef
mov eax, 0x803c0005
pop edi
pop ebp
pop ebx
add esp, 0x4028
ret 0x10
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
cmp eax, ebp
jne 0x10013c8c
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10013bf9
call fcn.10014220
dec dword [esi + 0xf]
xor ecx, ecx
push ecx
mov edi, eax
push ecx
xor eax, eax
push ecx
push eax
mov eax, dword [esi]
mov ebx, edx
push eax
mov dword [esi + 0x3b], edi
mov dword [esi + 0x3f], ebx
mov dword [esi + 0x53], edi
mov dword [esi + 0x57], ebx
call ebp
test eax, eax
jne 0x10013cf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10013cf3
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x10013d19
lea edx, [esi + 7]
push esi
mov ecx, 0x54
call fcn.10014360
test eax, eax
jl 0x10013d19
mov eax, dword [esp + 0x4044]
test eax, eax
je 0x10013d17
mov dword [eax], edi
mov dword [eax + 4], ebx
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0x4028
ret 0x10