Function at 0x40ebe0
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 0x40ec37
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 0x40ec10
test ebp, ebp
je 0x40ec28
mov cl, byte [esi]
cmp cl, 0x22
je 0x40ec33
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.0x40ec4a.1
movzx eax, byte [eax + 0x40eea8]
jmp dword [eax*4 + 0x40ee98]
test ebp, ebp
je 0x40ec62
test edx, edx
je 0x40ee6e
jmp 0x40ee5c
cmp dword [0x45048c], 0
jne 0x40ee6e
mov dword [esp + 0x14], esi
mov byte [esi], 0
inc esi
jmp 0x40ec02
test ebp, ebp
jne case.0x40ec4a.1
mov eax, dword [esp + 0x14]
mov edx, 1
mov byte [esi], 0
mov dword [esp + 0x10], edx
test eax, eax
je 0x40ee6e
lea edi, [eax + 1]
dec ebx
push ebp
push edi
call fcn.004298c6
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
jg 0x40ecd6
push edi
push str.Failed_to_open__s_n
push 2
call fcn.00422fd8
add esp, 4
push eax
call fcn.004025e0
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov edi, dword [esp + 0x28]
inc esi
jmp 0x40ec02
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 0x40ed40
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.0042fc96
mov ecx, dword [esp + 0x34]
add esp, 8
mov dword [ecx], eax
test eax, eax
jne 0x40ed40
push edi
push str.Failed_to_allocate_memory_for__s_n
push 2
call fcn.00422fd8
add esp, 4
push eax
call fcn.004025e0
push dword [esp + 0x2c]
call fcn.0042775e
mov edx, dword [esp + 0x20]
add esp, 0x10
mov edi, dword [esp + 0x28]
inc esi
jmp 0x40ec02
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 0x40ed80
mov edi, ecx
lea edx, [edi + 1]
nop word [eax + eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x40ed60
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.00421eb0
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.004280f0
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jg 0x40edd0
mov eax, dword [esp + 0x14]
inc eax
push eax
call fcn.004247e8
push dword [esp + 0x24]
call fcn.0042775e
mov edx, dword [esp + 0x18]
add esp, 8
mov edi, dword [esp + 0x28]
inc esi
jmp 0x40ec02
push dword [esp + 0x20]
call fcn.0042775e
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 [0x45048c]
push eax
lea eax, [edx + ebx*4]
push eax
push ecx
call fcn.0040ebe0
dec dword [0x45048c]
add esp, 0x1c
mov edx, dword [esp + 0x10]
add ebx, eax
mov dword [esp + 0x14], 0
inc esi
jmp 0x40ec02
test edx, edx
je 0x40ee6e
test ebp, ebp
je 0x40ee5c
cmp cl, 0x22
jne 0x40ee5c
cmp byte [esi + 1], cl
je 0x40ee5c
inc esi
xor ebp, ebp
mov eax, dword [esp + 0x24]
mov dword [eax + ebx*4], esi
inc ebx
cmp ebx, edi
jge 0x40ee8e
xor edx, edx
mov dword [esp + 0x10], edx
inc esi
jmp 0x40ec02
test ebp, ebp
je 0x40ee83
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