Function at 0x40eba0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1c]
xor ebx, ebx
xor ebp, ebp
mov edx, 1
xor eax, eax
mov dword [esp + 0xc], edx
push edi
mov edi, dword [esp + 0x28]
mov dword [esp + 0x14], eax
mov cl, byte [esi]
cmp cl, 0x22
jne 0x40ebf7
mov eax, esi
nop dword [eax + eax]
mov dl, byte [eax + 1]
lea eax, [eax + 1]
mov byte [eax - 1], dl
test dl, dl
jne 0x40ebd0
test ebp, ebp
je 0x40ebe8
mov cl, byte [esi]
cmp cl, 0x22
je 0x40ebf3
mov cl, byte [esi]
xor eax, eax
test ebp, ebp
sete al
mov ebp, eax
mov edx, dword [esp + 0x10]
movzx eax, cl
cmp eax, 0x24
ja case.0x40ec0a.1
movzx eax, byte [eax + 0x40ee68]
jmp dword [eax*4 + 0x40ee58]
test ebp, ebp
je 0x40ec22
test edx, edx
je 0x40ee2e
jmp 0x40ee1c
cmp dword [0x45042c], 0
jne 0x40ee2e
mov dword [esp + 0x14], esi
mov byte [esi], 0
inc esi
jmp 0x40ebc2
test ebp, ebp
jne case.0x40ec0a.1
mov eax, dword [esp + 0x14]
mov edx, 1
mov byte [esi], 0
mov dword [esp + 0x10], edx
test eax, eax
je 0x40ee2e
lea edi, [eax + 1]
dec ebx
push ebp
push edi
call fcn.00429896
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
jg 0x40ec96
push edi
push str.Failed_to_open__s_n
push 2
call fcn.00422fa8
add esp, 4
push eax
call fcn.004025a0
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov edi, dword [esp + 0x28]
inc esi
jmp 0x40ebc2
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov ecx, dword [eax]
mov eax, ecx
sub eax, dword [edx]
cmp eax, 0xffff
jge 0x40ed00
lea eax, [ecx + 0xffff]
mov ecx, dword [esp + 0x34]
push eax
mov dword [ecx], eax
mov eax, dword [esp + 0x30]
push dword [eax]
call fcn.0042fc66
mov ecx, dword [esp + 0x34]
add esp, 8
mov dword [ecx], eax
test eax, eax
jne 0x40ed00
push edi
push str.Failed_to_allocate_memory_for__s_n
push 2
call fcn.00422fa8
add esp, 4
push eax
call fcn.004025a0
push dword [esp + 0x2c]
call fcn.0042772e
mov edx, dword [esp + 0x20]
add esp, 0x10
mov edi, dword [esp + 0x28]
inc esi
jmp 0x40ebc2
mov eax, dword [esp + 0x24]
xor edi, edi
mov ecx, dword [eax + ebx*4]
lea eax, [eax + ebx*4]
mov eax, dword [esp + 0x14]
inc eax
cmp ecx, eax
je 0x40ed40
mov edi, ecx
lea edx, [edi + 1]
nop word [eax + eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x40ed20
mov eax, dword [esp + 0x2c]
sub edi, edx
push edi
push ecx
mov ecx, dword [esp + 0x38]
mov eax, dword [eax]
add eax, dword [ecx]
push eax
call fcn.00421e80
add esp, 0xc
mov ecx, dword [esp + 0x30]
mov eax, 0xfffe
sub eax, edi
push eax
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
add eax, dword [ecx]
add eax, edi
push eax
push dword [esp + 0x28]
call fcn.004280c0
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jg 0x40ed90
mov eax, dword [esp + 0x14]
inc eax
push eax
call fcn.004247b8
push dword [esp + 0x24]
call fcn.0042772e
mov edx, dword [esp + 0x18]
add esp, 8
mov edi, dword [esp + 0x28]
inc esi
jmp 0x40ebc2
push dword [esp + 0x20]
call fcn.0042772e
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
push dword [esp + 0x38]
mov eax, dword [ecx]
add eax, dword [edx]
mov edx, dword [esp + 0x20]
add eax, edx
inc edx
mov byte [eax + edi], 0
mov eax, dword [esp + 0x38]
mov ecx, dword [ecx]
mov eax, dword [eax]
add ecx, eax
add eax, edx
mov edx, dword [esp + 0x38]
add eax, edi
mov edi, dword [esp + 0x30]
push edx
push dword [esp + 0x38]
mov dword [edx], eax
mov eax, edi
mov edx, dword [esp + 0x34]
sub eax, ebx
inc dword [0x45042c]
push eax
lea eax, [edx + ebx*4]
push eax
push ecx
call fcn.0040eba0
dec dword [0x45042c]
add esp, 0x1c
mov edx, dword [esp + 0x10]
add ebx, eax
mov dword [esp + 0x14], 0
inc esi
jmp 0x40ebc2
test edx, edx
je 0x40ee2e
test ebp, ebp
je 0x40ee1c
cmp cl, 0x22
jne 0x40ee1c
cmp byte [esi + 1], cl
je 0x40ee1c
inc esi
xor ebp, ebp
mov eax, dword [esp + 0x24]
mov dword [eax + ebx*4], esi
inc ebx
cmp ebx, edi
jge 0x40ee4e
xor edx, edx
mov dword [esp + 0x10], edx
inc esi
jmp 0x40ebc2
test ebp, ebp
je 0x40ee43
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0xc
ret
mov eax, dword [esp + 0x24]
mov dword [eax + ebx*4], 0
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0xc
ret