Function at 0x4204c3
Capabilities:
Read file on windows

Disassembly:
push edi
pop edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov edx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push 0xfffffffffffffffe
pop eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], edx
cmp esi, eax
jne 0x4204fa
call fcn.00417a4b
and dword [eax], 0
call fcn.00417a38
mov dword [eax], 9
or eax, 0xffffffff
jmp 0x420a77
push ebx
xor ebx, ebx
cmp esi, ebx
jl 0x420509
cmp esi, dword [0x459ad4]
jb 0x420528
call fcn.00417a4b
mov dword [eax], ebx
call fcn.00417a38
mov dword [eax], 9
call fcn.004179e6
or eax, 0xffffffff
jmp 0x420a76
mov eax, esi
sar eax, 5
push edi
and esi, 0x1f
lea edi, [eax*4 + 0x459ae0]
mov eax, dword [edi]
shl esi, 6
mov cl, byte [eax + esi + 4]
test cl, 1
jne 0x42055a
call fcn.00417a4b
mov dword [eax], ebx
call fcn.00417a38
mov dword [eax], 9
jmp 0x4205c2
cmp edx, 0x7fffffff
ja 0x4205b0
mov dword [ebp - 0xc], ebx
cmp edx, ebx
je 0x420a73
test cl, 2
jne 0x420a73
cmp dword [ebp + 0xc], ebx
je 0x4205b0
mov al, byte [eax + esi + 0x24]
add al, al
sar al, 1
mov byte [ebp - 2], al
movsx eax, al
dec eax
push 4
pop ecx
je 0x4205a8
dec eax
jne 0x4205a0
push edx
pop eax
not eax
test al, 1
je 0x4205b0
and edx, 0xfffffffe
mov dword [ebp + 0x10], edx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x10], ebx
jmp 0x420622
mov eax, edx
not eax
test al, 1
jne 0x4205c9
call fcn.00417a4b
mov dword [eax], ebx
call fcn.00417a38
mov dword [eax], 0x16
call fcn.004179e6
jmp 0x4205ff
mov eax, edx
shr eax, 1
mov dword [ebp + 0x10], ecx
cmp eax, ecx
jb 0x4205d7
mov dword [ebp + 0x10], eax
push dword [ebp + 0x10]
call fcn.00415138
push eax
pop ebx
pop ecx
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x420607
call fcn.00417a38
mov dword [eax], 0xc
call fcn.00417a4b
mov dword [eax], 8
or eax, 0xffffffff
jmp 0x420a75
push 1
push 0
push 0
push dword [ebp + 8]
call fcn.0041b644
mov ecx, dword [edi]
mov dword [esi + ecx + 0x28], eax
add esp, 0x10
mov dword [esi + ecx + 0x2c], edx
mov ecx, dword [edi]
add ecx, esi
test byte [ecx + 4], 0x48
push ebx
pop eax
je 0x4206a8
mov cl, byte [ecx + 5]
cmp cl, 0xa
je 0x4206a8
cmp dword [ebp + 0x10], 0
je 0x4206a8
dec dword [ebp + 0x10]
cmp byte [ebp - 2], 0
mov byte [ebx], cl
mov ecx, dword [edi]
lea eax, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [esi + ecx + 5], 0xa
je 0x4206a8
mov ecx, dword [edi]
mov cl, byte [esi + ecx + 0x25]
cmp cl, 0xa
je 0x4206a8
cmp dword [ebp + 0x10], 0
je 0x4206a8
mov byte [eax], cl
mov ecx, dword [edi]
inc eax
dec dword [ebp + 0x10]
cmp byte [ebp - 2], 1
mov dword [ebp - 0xc], 2
mov byte [esi + ecx + 0x25], 0xa
jne 0x4206a8
mov ecx, dword [edi]
mov cl, byte [esi + ecx + 0x26]
cmp cl, 0xa
je 0x4206a8
cmp dword [ebp + 0x10], 0
je 0x4206a8
mov byte [eax], cl
mov ecx, dword [edi]
inc eax
dec dword [ebp + 0x10]
mov dword [ebp - 0xc], 3
mov byte [esi + ecx + 0x26], 0xa
push 0
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
or eax, eax
je 0x420a3d
mov ecx, dword [ebp - 0x18]
or ecx, ecx
js 0x420a3d
cmp ecx, dword [ebp + 0x10]
ja 0x420a3d
mov eax, dword [edi]
add dword [ebp - 0xc], ecx
lea eax, [esi + eax + 4]
test byte [eax], 0x80
je 0x4208cf
cmp byte [ebp - 2], 2
je 0x420909
test ecx, ecx
je 0x420703
cmp byte [ebx], 0xa
jne 0x420703
or byte [eax], 4
jmp 0x420706
and byte [eax], 0xfb
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0xc], eax
cmp ebx, eax
jae 0x4207ed
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx]
cmp al, 0x1a
je 0x4207d8
cmp al, 0xd
je 0x420739
mov byte [ebx], al
inc ebx
inc ecx
mov dword [ebp + 0x10], ecx
jmp 0x4207ca
mov eax, dword [ebp - 0xc]
dec eax
cmp ecx, eax
jae 0x420759
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x420754
add ecx, 2
mov dword [ebp + 0x10], ecx
mov byte [ebx], 0xa
jmp 0x4207c9
mov dword [ebp + 0x10], eax
jmp 0x4207c6
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0x18]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
or eax, eax
jne 0x420781
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4207c6
cmp dword [ebp - 0x18], 0
je 0x4207c6
mov eax, dword [edi]
test byte [esi + eax + 4], 0x48
je 0x4207a4
cmp byte [ebp - 1], 0xa
je 0x42074f
mov byte [ebx], 0xd
mov eax, dword [edi]
mov cl, byte [ebp - 1]
mov byte [esi + eax + 5], cl
jmp 0x4207c9
cmp ebx, dword [ebp - 0x10]
jne 0x4207af
cmp byte [ebp - 1], 0xa
je 0x42074f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041b644
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4207ca
mov byte [ebx], 0xd
inc ebx
mov eax, dword [ebp - 0xc]
cmp dword [ebp + 0x10], eax
jb 0x42071c
jmp 0x4207ed
mov eax, dword [edi]
lea eax, [esi + eax + 4]
test byte [eax], 0x40
jne 0x4207e8
or byte [eax], 2
jmp 0x4207ed
mov al, byte [ecx]
mov byte [ebx], al
inc ebx
push ebx
pop eax
sub eax, dword [ebp - 0x10]
cmp byte [ebp - 2], 1
mov dword [ebp - 0xc], eax
jne 0x4208cf
test eax, eax
je 0x4208cf
dec ebx
mov cl, byte [ebx]
test cl, cl
js 0x420814
inc ebx
jmp 0x42089a
xor eax, eax
inc eax
movzx ecx, cl
jmp 0x42082b
cmp eax, 4
jg 0x420834
cmp ebx, dword [ebp - 0x10]
jb 0x420834
dec ebx
movzx ecx, byte [ebx]
inc eax
cmp byte [ecx + 0x42c098], 0
je 0x42081c
mov dl, byte [ebx]
movzx ecx, dl
movsx ecx, byte [ecx + 0x42c098]
or ecx, ecx
jne 0x420851
call fcn.00417a38
mov dword [eax], 0x2a
jmp 0x4208cb
inc ecx
cmp ecx, eax
jne 0x42085a
add ebx, eax
jmp 0x42089a
mov ecx, dword [edi]
test byte [ecx + esi + 4], 0x48
je 0x420888
inc ebx
mov byte [ecx + esi + 5], dl
cmp eax, 2
jl 0x420876
mov dl, byte [ebx]
mov ecx, dword [edi]
mov byte [esi + ecx + 0x25], dl
inc ebx
cmp eax, 3
jne 0x420884
mov dl, byte [ebx]
mov ecx, dword [edi]
mov byte [esi + ecx + 0x26], dl
inc ebx
sub ebx, eax
jmp 0x42089a
neg eax
cdq
push 1
push edx
push eax
push dword [ebp + 8]
call fcn.0041b644
add esp, 0x10
mov eax, dword [ebp - 0x1c]
sub ebx, dword [ebp - 0x10]
shr eax, 1
push eax
push dword [ebp + 0xc]
push ebx
push dword [ebp - 0x10]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0xc], eax
or eax, eax
jne 0x4208f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00417a5e
pop ecx
or dword [ebp - 0x14], 0xffffffff
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
je 0x4208de
push eax
call fcn.00411870
pop ecx
mov eax, dword [ebp - 0x14]
cmp eax, 0xfffffffe
jne 0x420a75
mov eax, dword [ebp - 0xc]
jmp 0x420a75
mov eax, dword [ebp - 0xc]
mov edx, dword [edi]
xor ecx, ecx
cmp eax, ebx
setne cl
add eax, eax
mov dword [ebp - 0xc], eax
mov dword [esi + edx + 0x30], ecx
jmp 0x4208cf
test ecx, ecx
je 0x420918
cmp word [ebx], 0xa
jne 0x420918
or byte [eax], 4
jmp 0x42091b
and byte [eax], 0xfb
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0xc], eax
cmp ebx, eax
jae 0x420a32
mov eax, dword [ebp + 0x10]
movzx ecx, word [eax]
cmp ecx, 0x1a
je 0x420a19
cmp ecx, 0xd
je 0x420956
mov word [ebx], cx
add ebx, 2
add eax, 2
mov dword [ebp + 0x10], eax
jmp 0x420a0b
mov ecx, dword [ebp - 0xc]
add ecx, 0xfffffffe
cmp eax, ecx
jae 0x42097e
lea ecx, [eax + 2]
cmp word [ecx], 0xa
jne 0x420976
add eax, 4
mov dword [ebp + 0x10], eax
push 0xa
jmp 0x420a04
mov dword [ebp + 0x10], ecx
jmp 0x420a02
add dword [ebp + 0x10], 2
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 8]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4209a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
or eax, eax
jne 0x420a02
cmp dword [ebp - 0x18], 0
je 0x420a02
mov eax, dword [edi]
test byte [esi + eax + 4], 0x48
je 0x4209de
cmp word [ebp - 8], 0xa
je 0x42096f
push 0xd
pop eax
mov word [ebx], ax
mov eax, dword [edi]
mov cl, byte [ebp - 8]
mov byte [esi + eax + 5], cl
mov eax, dword [edi]
mov cl, byte [ebp - 7]
mov byte [esi + eax + 0x25], cl
mov eax, dword [edi]
mov byte [esi + eax + 0x26], 0xa
jmp 0x420a08
cmp ebx, dword [ebp - 0x10]
jne 0x4209ea
cmp word [ebp - 8], 0xa
je 0x42096f
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041b644
add esp, 0x10
cmp word [ebp - 8], 0xa
je 0x420a0b
push 0xd
pop eax
mov word [ebx], ax
add ebx, 2
mov eax, dword [ebp - 0xc]
cmp dword [ebp + 0x10], eax
jb 0x420931
jmp 0x420a32
mov ecx, dword [edi]
lea esi, [esi + ecx + 4]
test byte [esi], 0x40
jne 0x420a29
or byte [esi], 2
jmp 0x420a32
mov ax, word [eax]
mov word [ebx], ax
add ebx, 2
sub ebx, dword [ebp - 0x10]
mov dword [ebp - 0xc], ebx
jmp 0x4208cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x420a61
call fcn.00417a38
mov dword [eax], 9
call fcn.00417a4b
mov dword [eax], esi
jmp 0x4208cb
cmp eax, 0x6d
jne 0x4208c4
and dword [ebp - 0x14], 0
jmp 0x4208cf
sub eax, eax
pop edi
pop ebx
pop esi
leave
ret