Function at 0x420d80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov edi, edi
mov ebp, esp
sub esp, 0x1c
mov edx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push 0xfffffffffffffffe
pop eax
cmp esi, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], edx
jne 0x420db7
call fcn.0040b4b6
and dword [eax], 0
call fcn.0040b4a3
mov dword [eax], 9
or eax, 0xffffffff
jmp 0x421334
push ebx
xor ebx, ebx
cmp esi, ebx
jl 0x420dc6
cmp esi, dword [0x5ad710]
jb 0x420de5
call fcn.0040b4b6
mov dword [eax], ebx
call fcn.0040b4a3
mov dword [eax], 9
call fcn.0040ad62
or eax, 0xffffffff
jmp 0x421333
push edi
mov eax, esi
sar eax, 5
and esi, 0x1f
lea edi, [eax*4 + 0x5ad720]
shl esi, 6
mov eax, dword [edi]
mov cl, byte [eax + esi + 4]
test cl, 1
jne 0x420e17
call fcn.0040b4b6
mov dword [eax], ebx
call fcn.0040b4a3
mov dword [eax], 9
jmp 0x420e7f
cmp edx, 0x7fffffff
ja 0x420e6d
cmp edx, ebx
mov dword [ebp - 0xc], ebx
je 0x421330
test cl, 2
jne 0x421330
cmp dword [ebp + 0xc], ebx
je 0x420e6d
mov al, byte [eax + esi + 0x24]
add al, al
sar al, 1
mov byte [ebp - 2], al
push 4
pop ecx
movsx eax, al
dec eax
je 0x420e65
dec eax
jne 0x420e5d
mov eax, edx
not eax
test al, 1
je 0x420e6d
and edx, 0xfffffffe
mov dword [ebp + 0x10], edx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x10], ebx
jmp 0x420edf
mov eax, edx
not eax
test al, 1
jne 0x420e86
call fcn.0040b4b6
mov dword [eax], ebx
call fcn.0040b4a3
mov dword [eax], 0x16
call fcn.0040ad62
jmp 0x420ebc
mov eax, edx
shr eax, 1
cmp eax, ecx
mov dword [ebp + 0x10], ecx
jb 0x420e94
mov dword [ebp + 0x10], eax
push dword [ebp + 0x10]
call fcn.0041129d
mov ebx, eax
pop ecx
or ebx, ebx
mov dword [ebp - 0x10], ebx
jne 0x420ec4
call fcn.0040b4a3
mov dword [eax], 0xc
call fcn.0040b4b6
mov dword [eax], 8
or eax, 0xffffffff
jmp 0x421332
push 1
push 0
push 0
push dword [ebp + 8]
call fcn.00420a7b
mov ecx, dword [edi]
add esp, 0x10
mov dword [esi + ecx + 0x28], eax
mov dword [esi + ecx + 0x2c], edx
mov eax, ebx
mov ecx, dword [edi]
add ecx, esi
test byte [ecx + 4], 0x48
je 0x420f65
mov cl, byte [ecx + 5]
cmp cl, 0xa
je 0x420f65
cmp dword [ebp + 0x10], 0
je 0x420f65
lea eax, [ebx + 1]
dec dword [ebp + 0x10]
cmp byte [ebp - 2], 0
mov byte [ebx], cl
mov ecx, dword [edi]
mov dword [ebp - 0xc], 1
mov byte [esi + ecx + 5], 0xa
je 0x420f65
mov ecx, dword [edi]
mov cl, byte [esi + ecx + 0x25]
cmp cl, 0xa
je 0x420f65
cmp dword [ebp + 0x10], 0
je 0x420f65
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 0x420f65
mov ecx, dword [edi]
mov cl, byte [esi + ecx + 0x26]
cmp cl, 0xa
je 0x420f65
cmp dword [ebp + 0x10], 0
je 0x420f65
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
lea ecx, [ebp - 0x18]
push 0
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 0x4212fa
mov ecx, dword [ebp - 0x18]
test ecx, ecx
js 0x4212fa
cmp ecx, dword [ebp + 0x10]
ja 0x4212fa
mov eax, dword [edi]
add dword [ebp - 0xc], ecx
lea eax, [esi + eax + 4]
test byte [eax], 0x80
je 0x42118c
cmp byte [ebp - 2], 2
je 0x4211c6
test ecx, ecx
je 0x420fc0
cmp byte [ebx], 0xa
jne 0x420fc0
or byte [eax], 4
jmp 0x420fc3
and byte [eax], 0xfb
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x10]
add eax, ebx
cmp ebx, eax
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0xc], eax
jae 0x4210aa
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx]
cmp al, 0x1a
je 0x421095
cmp al, 0xd
je 0x420ff6
mov byte [ebx], al
inc ebx
inc ecx
mov dword [ebp + 0x10], ecx
jmp 0x421087
mov eax, dword [ebp - 0xc]
dec eax
cmp ecx, eax
jae 0x421016
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x421011
sub ecx, 0xfffffffe
mov dword [ebp + 0x10], ecx
mov byte [ebx], 0xa
jmp 0x421086
mov dword [ebp + 0x10], eax
jmp 0x421083
lea eax, [ebp - 0x18]
inc dword [ebp + 0x10]
push 0
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 0x42103e
call dword [sym.imp.KERNEL32.dll_GetLastError]
or eax, eax
jne 0x421083
cmp dword [ebp - 0x18], 0
je 0x421083
mov eax, dword [edi]
test byte [esi + eax + 4], 0x48
je 0x421061
cmp byte [ebp - 1], 0xa
je 0x42100c
mov byte [ebx], 0xd
mov cl, byte [ebp - 1]
mov eax, dword [edi]
mov byte [esi + eax + 5], cl
jmp 0x421086
cmp ebx, dword [ebp - 0x10]
jne 0x42106c
cmp byte [ebp - 1], 0xa
je 0x42100c
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00420a7b
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x421087
mov byte [ebx], 0xd
inc ebx
mov eax, dword [ebp - 0xc]
cmp dword [ebp + 0x10], eax
jb 0x420fd9
jmp 0x4210aa
mov eax, dword [edi]
lea eax, [esi + eax + 4]
test byte [eax], 0x40
jne 0x4210a5
or byte [eax], 2
jmp 0x4210aa
mov al, byte [ecx]
mov byte [ebx], al
inc ebx
mov eax, ebx
sub eax, dword [ebp - 0x10]
cmp byte [ebp - 2], 1
mov dword [ebp - 0xc], eax
jne 0x42118c
or eax, eax
je 0x42118c
dec ebx
mov cl, byte [ebx]
test cl, cl
js 0x4210d1
inc ebx
jmp 0x421157
xor eax, eax
inc eax
movzx ecx, cl
jmp 0x4210e8
cmp eax, 4
jg 0x4210f1
cmp ebx, dword [ebp - 0x10]
jb 0x4210f1
dec ebx
inc eax
movzx ecx, byte [ebx]
cmp byte [ecx + 0x42b2c8], 0
je 0x4210d9
mov dl, byte [ebx]
movzx ecx, dl
movsx ecx, byte [ecx + 0x42b2c8]
test ecx, ecx
jne 0x42110e
call fcn.0040b4a3
mov dword [eax], 0x2a
jmp 0x421188
inc ecx
cmp ecx, eax
jne 0x421117
add ebx, eax
jmp 0x421157
mov ecx, dword [edi]
test byte [ecx + esi + 4], 0x48
je 0x421145
inc ebx
cmp eax, 2
mov byte [ecx + esi + 5], dl
jl 0x421133
mov ecx, dword [edi]
mov dl, byte [ebx]
inc ebx
mov byte [esi + ecx + 0x25], dl
cmp eax, 3
jne 0x421141
mov ecx, dword [edi]
mov dl, byte [ebx]
mov byte [esi + ecx + 0x26], dl
inc ebx
sub ebx, eax
jmp 0x421157
neg eax
cdq
push 1
push edx
push eax
push dword [ebp + 8]
call fcn.00420a7b
sub esp, 0xfffffff0
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]
or eax, eax
mov dword [ebp - 0xc], eax
jne 0x4211af
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040b4c9
pop ecx
or dword [ebp - 0x14], 0xffffffff
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
je 0x42119b
push eax
call fcn.00408d8b
pop ecx
mov eax, dword [ebp - 0x14]
cmp eax, 0xfffffffe
jne 0x421332
mov eax, dword [ebp - 0xc]
jmp 0x421332
mov edx, dword [edi]
xor ecx, ecx
mov eax, dword [ebp - 0xc]
cmp eax, ebx
setne cl
add eax, eax
mov dword [ebp - 0xc], eax
mov dword [esi + edx + 0x30], ecx
jmp 0x42118c
test ecx, ecx
je 0x4211d5
cmp word [ebx], 0xa
jne 0x4211d5
or byte [eax], 4
jmp 0x4211d8
and byte [eax], 0xfb
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, ebx
cmp ebx, eax
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0xc], eax
jae 0x4212ef
mov eax, dword [ebp + 0x10]
movzx ecx, word [eax]
cmp ecx, 0x1a
je 0x4212d6
cmp ecx, 0xd
je 0x421213
mov word [ebx], cx
sub ebx, 0xfffffffe
sub eax, 0xfffffffe
mov dword [ebp + 0x10], eax
jmp 0x4212c8
mov ecx, dword [ebp - 0xc]
add ecx, 0xfffffffe
cmp eax, ecx
jae 0x42123b
lea ecx, [eax + 2]
cmp word [ecx], 0xa
jne 0x421233
sub eax, 0xfffffffc
mov dword [ebp + 0x10], eax
push 0xa
jmp 0x4212c1
mov dword [ebp + 0x10], ecx
jmp 0x4212bf
lea eax, [ebp - 0x18]
add dword [ebp + 0x10], 2
push 0
push eax
lea eax, [ebp - 8]
push 2
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x421264
call dword [sym.imp.KERNEL32.dll_GetLastError]
or eax, eax
jne 0x4212bf
cmp dword [ebp - 0x18], 0
je 0x4212bf
mov eax, dword [edi]
test byte [esi + eax + 4], 0x48
je 0x42129b
cmp word [ebp - 8], 0xa
je 0x42122c
push 0xd
pop eax
mov word [ebx], ax
mov cl, byte [ebp - 8]
mov eax, dword [edi]
mov byte [esi + eax + 5], cl
mov cl, byte [ebp - 7]
mov eax, dword [edi]
mov byte [esi + eax + 0x25], cl
mov eax, dword [edi]
mov byte [esi + eax + 0x26], 0xa
jmp 0x4212c5
cmp ebx, dword [ebp - 0x10]
jne 0x4212a7
cmp word [ebp - 8], 0xa
je 0x42122c
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00420a7b
sub esp, 0xfffffff0
cmp word [ebp - 8], 0xa
je 0x4212c8
push 0xd
pop eax
mov word [ebx], ax
add ebx, 2
mov eax, dword [ebp - 0xc]
cmp dword [ebp + 0x10], eax
jb 0x4211ee
jmp 0x4212ef
mov ecx, dword [edi]
lea esi, [esi + ecx + 4]
test byte [esi], 0x40
jne 0x4212e6
or byte [esi], 2
jmp 0x4212ef
mov ax, word [eax]
mov word [ebx], ax
sub ebx, 0xfffffffe
sub ebx, dword [ebp - 0x10]
mov dword [ebp - 0xc], ebx
jmp 0x42118c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ebx
cmp eax, ebx
jne 0x42131e
call fcn.0040b4a3
mov dword [eax], 9
call fcn.0040b4b6
mov dword [eax], ebx
jmp 0x421188
cmp eax, 0x6d
jne 0x421181
and dword [ebp - 0x14], 0
jmp 0x42118c
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret