Function at 0x4096b0
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x38
mov ebx, edx
mov esi, ecx
mov eax, dword [esp + 0x50]
mov dword [esp + 0xc], 0
lea ecx, [esp + 0xc]
push ecx
push 1
push eax
push esi
call fcn.00426660
add esp, 0x10
test eax, eax
jne 0x4098cb
mov dword [esp + 8], esi
push 0x10000
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ebp, eax
mov esi, 0x7f2bb746
xor edi, edi
test eax, eax
je 0x4098a8
mov eax, dword [esp + 8]
push dword [eax + 0x14]
push 1
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
add esp, 8
test eax, eax
je 0x4098a8
mov ecx, dword [esp + 0x4c]
mov edi, eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [ecx + 0x18]
mov ecx, dword [ecx + 0x1c]
mov dword [esp + 0x24], 0
mov dword [esp + 0x2c], eax
cmp eax, 1
mov dword [esp + 0x28], ecx
mov eax, ecx
sbb eax, 0
jl 0x409894
mov dword [esp], edi
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x10], ebx
jmp 0x40977f
mov ecx, dword [esp + 0x18]
add ecx, 0x10000
mov edx, dword [esp + 0x14]
adc edx, 0
cmp ecx, dword [esp + 0x2c]
mov eax, edx
sbb eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x10]
jge 0x4098d3
push 0
mov dword [esp + 0x18], edx
push edx
mov dword [esp + 0x20], ecx
push ecx
push ebx
call fcn.00427440
add esp, 0x10
test edx, edx
js 0x40975a
push 0x10000
push ebp
push dword [esp + 0x18]
call sub.api_ms_win_crt_stdio_l1_1_0.dll__read
add esp, 0xc
test eax, eax
js 0x4098d7
je 0x40975a
mov ecx, dword [esp + 8]
mov esi, dword [ecx + 0x14]
xor edx, edx
mov edi, ebp
xor ebx, ebx
mov dword [esp + 4], ebp
mov dword [esp + 0x30], eax
jmp 0x4097f6
add edi, ebp
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 8]
mov esi, dword [eax + 0x14]
mov edx, dword [esp + 0x34]
add edx, esi
adc ebx, 0
mov eax, dword [esp + 0x30]
cmp edx, eax
mov ecx, ebx
sbb ecx, 0
mov ebp, dword [esp + 4]
jae 0x40975a
mov ecx, esi
sar ecx, 0x1f
mov ebp, eax
sub ebp, edx
mov eax, ebx
mov ebx, edx
mov edx, 0
mov dword [esp + 0x1c], eax
sbb edx, eax
cmp ebp, esi
sbb edx, ecx
cmovge ebp, esi
push ebp
push dword [esp + 4]
push edi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
add esp, 0xc
test eax, eax
mov dword [esp + 0x34], ebx
je 0x4097cb
mov eax, ebx
add eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov ecx, ebx
adc ecx, dword [esp + 0x14]
push 0
push 0
push ecx
push eax
push dword [esp + 0x30]
call fcn.004272e0
add esp, 0x14
test eax, eax
jne 0x409898
nop word cs:[eax + eax]
test ebp, ebp
jle 0x4097d1
lea eax, [esp + 0x24]
push eax
push ebp
push edi
push dword [esp + 0x2c]
call fcn.00426b50
add esp, 0x10
test eax, eax
jne 0x409898
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40989c
sub ebp, eax
add edi, eax
test ebp, ebp
jg 0x409868
jmp 0x4097d1
xor esi, esi
jmp 0x4098a8
mov esi, eax
jmp 0x4098a1
mov esi, 5
mov ebp, dword [esp + 4]
mov edi, dword [esp]
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
push dword [esp + 0xc]
call fcn.00426850
add esp, 4
test esi, esi
cmovne eax, esi
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret
xor esi, esi
jmp 0x4098a5
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov esi, dword [eax]
jmp 0x4098a5