Function at 0x415500
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 + 0x64]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x415580
mov edx, dword [ebx + 0x68]
mov eax, edx
cmp edx, 1
jbe 0x4156b0
mov eax, dword [ebx + 0x64]
cmp byte [eax], 0x1f
je 0x415623
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x415560
mov eax, dword [ebx + 0x28]
test edx, edx
mov dword [ebx + 4], eax
jne 0x415690
mov dword [ebx + 0x30], 1
mov dword [ebx + 0x2c], 1
xor ecx, ecx
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret
xor ecx, ecx
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x40], 1
mov dword [ebx], 0
mov eax, ecx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
mov eax, dword [ebx + 0x20]
push eax
call sub.msvcrt.dll_malloc
mov dword [ebx + 0x24], eax
mov eax, dword [ebx + 0x20]
add eax, eax
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov edx, dword [ebx + 0x24]
add esp, 0x10
mov dword [ebx + 0x28], eax
test edx, edx
je 0x41564e
test eax, eax
je 0x415665
mov eax, dword [ebx + 0x20]
mov dword [ebx + 0x84], 0
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x88], 0
mov dword [ebx + 0x8c], 0
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x64], 0
push 0x38
push str.1.2.6
push 0x1f
push esi
call fcn.00404d10
add esp, 0x10
test eax, eax
je 0x415515
sub esp, 0xc
mov eax, dword [ebx + 0x28]
push eax
call sub.msvcrt.dll_free
pop edi
mov esi, dword [ebx + 0x24]
push esi
call sub.msvcrt.dll_free
add esp, 0xc
mov dword [ebx + 0x1c], 0
jmp 0x415672
cmp byte [eax + 1], 0x8b
jne 0x41552f
sub esp, 0xc
push esi
call fcn.00404c40
xor ecx, ecx
add esp, 0x10
mov dword [ebx + 0x30], 2
mov dword [ebx + 0x2c], 0
jmp 0x415554
test eax, eax
je 0x415671
sub esp, 0xc
push eax
call sub.msvcrt.dll_free
mov edx, dword [ebx + 0x24]
add esp, 0x10
test edx, edx
je 0x415671
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.0040bcd0
or ecx, 0xffffffff
add esp, 0x10
mov eax, ecx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
push edi
push edx
mov esi, dword [ebx + 0x64]
push esi
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebx + 0x68]
add esp, 0x10
mov dword [ebx], eax
mov dword [ebx + 0x68], 0
jmp 0x415544
mov edi, dword [ebx + 0x5c]
test edi, edi
je 0x4156c3
or ecx, 0xffffffff
cmp edi, 0xfffffffb
jne 0x415554
mov ecx, dword [ebx + 0x40]
test ecx, ecx
jne 0x41571a
test edx, edx
jne 0x415740
mov edx, dword [ebx + 0x1c]
xor edi, edi
sub edx, eax
mov dword [ebp - 0x14], edx
mov ecx, dword [ebx + 0x24]
add eax, ecx
mov dword [ebp - 0x10], eax
mov eax, edx
jmp 0x4156e7
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 + 0x14]
push eax
call sub.msvcrt.dll__read
add esp, 0x10
cmp eax, 0
jle 0x415733
add edi, eax
cmp dword [ebp - 0x14], edi
ja 0x4156e4
mov ecx, dword [ebx + 0x68]
mov eax, dword [ebx + 0x24]
add ecx, edi
mov dword [ebx + 0x64], eax
mov dword [ebx + 0x68], ecx
mov edx, dword [ebx + 0x68]
test edx, edx
je 0x41572c
cmp edx, 1
ja 0x415523
jmp 0x41552f
xor ecx, ecx
jmp 0x415554
jne 0x41575a
mov dword [ebx + 0x40], 1
jmp 0x415709
push eax
push edx
mov eax, dword [ebx + 0x64]
push eax
mov edi, dword [ebx + 0x24]
push edi
call sub.msvcrt.dll_memmove
mov eax, dword [ebx + 0x68]
add esp, 0x10
jmp 0x4156ce
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.0040bcd0
or ecx, 0xffffffff
add esp, 0x10
jmp 0x415554