Function at 0x4015e0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push ebx
push ebp
mov ebp, dword [esp + 0x34]
push esi
xor edx, edx
xor ebx, ebx
mov eax, 1
xor esi, esi
push edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], eax
mov edi, dword [esp + 0x2c]
cmp byte [edi], 0x22
jne 0x40162f
mov eax, edi
mov cl, byte [eax + 1]
mov byte [eax], cl
inc eax
test cl, cl
jne 0x401611
test ebx, ebx
je 0x401624
cmp byte [edi], 0x22
je 0x40162f
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 0x10], eax
xor eax, eax
mov al, byte [edi]
cmp eax, 0x24
ja case.0x401644.3
xor ecx, ecx
mov cl, byte [eax + 0x4018e0]
jmp dword [ecx*4 + 0x4018d0]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x401894
mov eax, dword [0x42a7b8]
test eax, eax
jne 0x401894
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x14], edi
mov esi, dword [esp + 0x14]
mov byte [edi], 0
inc edi
mov dword [esp + 0x2c], edi
jmp 0x401606
mov eax, dword [esp + 0x10]
test eax, eax
jne case.0x401644.3
test esi, esi
mov byte [edi], 0
mov dword [esp + 0x20], 1
mov dword [esp + 0x1c], 0
je 0x401894
dec edx
inc esi
push 0
push esi
mov dword [esp + 0x44], edx
call fcn.0041c261
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [esp + 0x18], ebx
jg 0x4016e5
push esi
push str.Failed_to_open__s_n
push 0x427730
call fcn.00415178
mov edx, dword [esp + 0x48]
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
add esp, 0xc
inc edi
mov dword [esp + 0x2c], edi
jmp 0x401606
mov ecx, dword [esp + 0x40]
mov edi, dword [ebp]
mov eax, dword [ecx]
mov edx, eax
sub edx, edi
cmp edx, 0xffff
jge 0x40174c
add eax, 0xffff
mov dword [ecx], eax
push eax
mov eax, dword [esp + 0x3c]
push eax
call fcn.00414e49
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x38], edi
jne 0x401750
push esi
push str.Failed_to_allocate_memory_for__s_n
push 0x427730
call fcn.00415178
push ebx
call fcn.00418240
mov edi, dword [esp + 0x3c]
mov edx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
add esp, 0x10
inc edi
mov dword [esp + 0x2c], edi
jmp 0x401606
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x3c]
xor ebx, ebx
lea eax, [ecx + edx*4]
mov dword [esp + 0x24], eax
mov edx, dword [eax]
cmp edx, esi
je 0x401792
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
mov esi, edx
repne scasb al, byte es:[edi]
mov edi, dword [ebp]
mov eax, dword [esp + 0x38]
not ecx
dec ecx
add edi, eax
mov ebx, ecx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x38]
mov edx, dword [ebp]
mov eax, dword [esp + 0x18]
mov ecx, 0xfffe
add edx, ebx
sub ecx, ebx
add edx, edi
push ecx
push edx
push eax
call fcn.0041d6ed
mov esi, eax
add esp, 0xc
test esi, esi
jg 0x4017e9
mov ecx, dword [esp + 0x14]
lea eax, [ecx + 1]
push eax
call fcn.00414dbe
mov edx, dword [esp + 0x1c]
push edx
call fcn.00418240
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
add esp, 8
inc edi
mov dword [esp + 0x2c], edi
jmp 0x401606
mov eax, dword [esp + 0x18]
push eax
call fcn.00418240
mov ecx, dword [ebp]
add ecx, esi
add ecx, ebx
mov byte [ecx + edi], 0
mov eax, dword [ebp]
lea ecx, [eax + edi]
add eax, esi
lea edx, [eax + ebx + 1]
mov eax, dword [esp + 0x44]
mov dword [ebp], edx
mov esi, dword [0x42a7b8]
mov edx, dword [esp + 0x38]
inc esi
mov dword [0x42a7b8], esi
mov esi, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x2c]
push ebp
sub edx, esi
push edi
push edx
push eax
push ecx
call fcn.004015e0
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x2c]
add esi, eax
mov eax, dword [0x42a7b8]
add esp, 0x1c
dec eax
mov dword [esp + 0x14], 0
inc edi
mov dword [esp + 0x3c], esi
mov edx, esi
mov esi, dword [esp + 0x14]
mov dword [0x42a7b8], eax
mov dword [esp + 0x2c], edi
jmp 0x401606
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
inc ecx
test eax, eax
mov dword [esp + 0x1c], ecx
je 0x401894
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x20], 0
mov dword [ecx + edx*4], edi
inc edx
cmp edx, eax
jge 0x4018c4
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
inc edi
mov dword [esp + 0x2c], edi
jmp 0x401606
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4018b9
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x30]
mov dword [eax + edx*4], 0
pop edi
pop esi
pop ebp
mov eax, edx
pop ebx
add esp, 0x18
ret