Function at 0x416800
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov ebx, eax
lea esi, [eax + 0x54]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x416880
mov edx, dword [ebx + 0x58]
cmp edx, 1
jbe 0x4169b0
mov eax, dword [ebx + 0x54]
cmp byte [eax], 0x1f
je 0x416920
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x416860
mov eax, dword [ebx + 0x24]
test edx, edx
mov dword [ebx + 4], eax
jne 0x416990
mov dword [ebx + 0x2c], 1
mov dword [ebx + 0x28], 1
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebx + 0x58], 0
mov dword [ebx + 0x34], 1
mov dword [ebx], 0
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
mov eax, dword [ebx + 0x1c]
push eax
call sub.msvcrt.dll_malloc
mov dword [ebx + 0x20], eax
mov eax, dword [ebx + 0x1c]
add eax, eax
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov edx, dword [ebx + 0x20]
add esp, 0x10
mov dword [ebx + 0x24], eax
test edx, edx
je 0x41694b
test eax, eax
je 0x416962
mov eax, dword [ebx + 0x1c]
mov dword [ebx + 0x74], 0
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x78], 0
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x58], 0
mov dword [ebx + 0x54], 0
push 0x38
push str.1.2.7
push 0x1f
push esi
call fcn.00405730
add esp, 0x10
test eax, eax
je 0x416815
sub esp, 0xc
mov eax, dword [ebx + 0x24]
push eax
call sub.msvcrt.dll_free
pop eax
mov eax, dword [ebx + 0x20]
push eax
call sub.msvcrt.dll_free
add esp, 0xc
mov dword [ebx + 0x18], 0
jmp 0x41696f
cmp byte [eax + 1], 0x8b
jne 0x41682d
sub esp, 0xc
push esi
call fcn.00405660
xor eax, eax
add esp, 0x10
mov dword [ebx + 0x2c], 2
mov dword [ebx + 0x28], 0
jmp 0x416852
test eax, eax
je 0x41696e
sub esp, 0xc
push eax
call sub.msvcrt.dll_free
mov edx, dword [ebx + 0x20]
add esp, 0x10
test edx, edx
je 0x41696e
sub esp, 0xc
push edx
call sub.msvcrt.dll_free
add esp, 0x10
push eax
push str.out_of_memory
push 0xfffffffffffffffc
push ebx
call fcn.00411a10
or eax, 0xffffffff
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
push edi
push edx
mov esi, dword [ebx + 0x54]
push esi
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebx + 0x58]
add esp, 0x10
mov dword [ebx], eax
mov dword [ebx + 0x58], 0
jmp 0x416842
mov ecx, dword [ebx + 0x4c]
test ecx, ecx
je 0x4169c3
or eax, 0xffffffff
cmp ecx, 0xfffffffb
jne 0x416852
mov edi, dword [ebx + 0x34]
test edi, edi
jne 0x416a29
xor eax, eax
test edx, edx
je 0x4169dd
mov edx, dword [ebx + 0x54]
mov eax, dword [ebx + 0x20]
mov dl, byte [edx]
mov byte [eax], dl
mov eax, dword [ebx + 0x58]
mov edx, dword [ebx + 0x18]
xor edi, edi
sub edx, eax
mov dword [ebp - 0x14], edx
mov ecx, dword [ebx + 0x20]
add eax, ecx
mov dword [ebp - 0x10], eax
mov eax, edx
jmp 0x4169f6
mov eax, dword [ebp - 0x14]
sub eax, edi
push edx
push eax
mov eax, dword [ebp - 0x10]
add eax, edi
push eax
mov eax, dword [ebx + 0x10]
push eax
call sub.msvcrt.dll__read
add esp, 0x10
cmp eax, 0
jle 0x416a42
add edi, eax
cmp dword [ebp - 0x14], edi
ja 0x4169f3
mov ecx, dword [ebx + 0x58]
mov eax, dword [ebx + 0x20]
add ecx, edi
mov dword [ebx + 0x54], eax
mov dword [ebx + 0x58], ecx
mov edx, dword [ebx + 0x58]
test edx, edx
je 0x416a3b
cmp edx, 1
ja 0x416821
jmp 0x41682d
xor eax, eax
jmp 0x416852
jne 0x416a4d
mov dword [ebx + 0x34], 1
jmp 0x416a18
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
push eax
call sub.msvcrt.dll_strerror
add esp, 0xc
push eax
push 0xffffffffffffffff
push ebx
call fcn.00411a10
or eax, 0xffffffff
add esp, 0x10
jmp 0x416852