Function at 0x41fd7c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebx, ebx
mov ebp, esp
add esp, 0xffffffe4
mov edx, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
push 0xfffffffffffffffe
pop eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], edx
cmp edi, eax
jne 0x41fdb3
call fcn.00414b2a
and dword [eax], 0
call fcn.00414b17
mov dword [eax], 9
or eax, 0xffffffff
jmp 0x420330
push esi
xor esi, esi
cmp edi, esi
jl 0x41fdc2
cmp edi, dword [0x47b788]
jb 0x41fde1
call fcn.00414b2a
mov dword [eax], esi
call fcn.00414b17
mov dword [eax], 9
call fcn.00414ac5
or eax, 0xffffffff
jmp 0x42032f
push ebx
mov eax, edi
sar eax, 5
and edi, 0x1f
lea ebx, [eax*4 + 0x47b7a0]
shl edi, 6
mov eax, dword [ebx]
mov cl, byte [eax + edi + 4]
test cl, 1
jne 0x41fe13
call fcn.00414b2a
mov dword [eax], esi
call fcn.00414b17
mov dword [eax], 9
jmp 0x41fe7b
cmp edx, 0x7fffffff
ja 0x41fe69
mov dword [ebp - 0xc], esi
cmp edx, esi
je 0x42032c
test cl, 2
jne 0x42032c
cmp dword [ebp + 0xc], esi
je 0x41fe69
mov al, byte [eax + edi + 0x24]
add al, al
sar al, 1
mov byte [ebp - 2], al
movsx eax, al
dec eax
push 4
pop ecx
je 0x41fe61
dec eax
jne 0x41fe59
mov eax, edx
not eax
test al, 1
je 0x41fe69
and edx, 0xfffffffe
mov dword [ebp + 0x10], edx
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x10], esi
jmp 0x41fedb
mov eax, edx
not eax
test al, 1
jne 0x41fe82
call fcn.00414b2a
mov dword [eax], esi
call fcn.00414b17
mov dword [eax], 0x16
call fcn.00414ac5
jmp 0x41feb8
mov dword [ebp + 0x10], ecx
mov eax, edx
shr eax, 1
cmp eax, ecx
jb 0x41fe90
mov dword [ebp + 0x10], eax
push dword [ebp + 0x10]
call fcn.00414432
pop ecx
mov esi, eax
mov dword [ebp - 0x10], esi
test esi, esi
jne 0x41fec0
call fcn.00414b17
mov dword [eax], 0xc
call fcn.00414b2a
mov dword [eax], 8
or eax, 0xffffffff
jmp 0x42032e
push 1
push 0
push 0
push dword [ebp + 8]
call fcn.0041bfd2
add esp, 0x10
mov ecx, dword [ebx]
mov dword [edi + ecx + 0x28], eax
mov dword [edi + ecx + 0x2c], edx
mov ecx, dword [ebx]
add ecx, edi
mov eax, esi
test byte [ecx + 4], 0x48
je 0x41ff61
mov cl, byte [ecx + 5]
cmp cl, 0xa
je 0x41ff61
cmp dword [ebp + 0x10], 0
je 0x41ff61
lea eax, [esi + 1]
dec dword [ebp + 0x10]
cmp byte [ebp - 2], 0
mov byte [esi], cl
mov ecx, dword [ebx]
mov dword [ebp - 0xc], 1
mov byte [edi + ecx + 5], 0xa
je 0x41ff61
mov ecx, dword [ebx]
mov cl, byte [edi + ecx + 0x25]
cmp cl, 0xa
je 0x41ff61
cmp dword [ebp + 0x10], 0
je 0x41ff61
mov byte [eax], cl
inc eax
mov ecx, dword [ebx]
dec dword [ebp + 0x10]
cmp byte [ebp - 2], 1
mov dword [ebp - 0xc], 2
mov byte [edi + ecx + 0x25], 0xa
jne 0x41ff61
mov ecx, dword [ebx]
mov cl, byte [edi + ecx + 0x26]
cmp cl, 0xa
je 0x41ff61
cmp dword [ebp + 0x10], 0
je 0x41ff61
mov byte [eax], cl
inc eax
mov ecx, dword [ebx]
dec dword [ebp + 0x10]
mov dword [ebp - 0xc], 3
mov byte [edi + ecx + 0x26], 0xa
lea ecx, [ebp - 0x18]
push 0
push ecx
push dword [ebp + 0x10]
push eax
mov eax, dword [ebx]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
or eax, eax
je 0x4202f6
mov ecx, dword [ebp - 0x18]
test ecx, ecx
js 0x4202f6
cmp ecx, dword [ebp + 0x10]
ja 0x4202f6
mov eax, dword [ebx]
lea eax, [edi + eax + 4]
add dword [ebp - 0xc], ecx
test byte [eax], 0x80
je 0x420188
cmp byte [ebp - 2], 2
je 0x4201c2
or ecx, ecx
je 0x41ffbc
cmp byte [esi], 0xa
jne 0x41ffbc
or byte [eax], 4
jmp 0x41ffbf
and byte [eax], 0xfb
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov dword [ebp + 0x10], esi
add eax, esi
mov dword [ebp - 0xc], eax
cmp esi, eax
jae 0x4200a6
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx]
cmp al, 0x1a
je 0x420091
cmp al, 0xd
je 0x41fff2
mov byte [esi], al
inc esi
inc ecx
mov dword [ebp + 0x10], ecx
jmp 0x420083
mov eax, dword [ebp - 0xc]
dec eax
cmp ecx, eax
jae 0x420012
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x42000d
sub ecx, 0xfffffffe
mov dword [ebp + 0x10], ecx
mov byte [esi], 0xa
jmp 0x420082
mov dword [ebp + 0x10], eax
jmp 0x42007f
inc dword [ebp + 0x10]
lea eax, [ebp - 0x18]
push 0
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [ebx]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
or eax, eax
jne 0x42003a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x42007f
cmp dword [ebp - 0x18], 0
je 0x42007f
mov eax, dword [ebx]
test byte [edi + eax + 4], 0x48
je 0x42005d
cmp byte [ebp - 1], 0xa
je 0x420008
mov byte [esi], 0xd
mov cl, byte [ebp - 1]
mov eax, dword [ebx]
mov byte [edi + eax + 5], cl
jmp 0x420082
cmp esi, dword [ebp - 0x10]
jne 0x420068
cmp byte [ebp - 1], 0xa
je 0x420008
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041bfd2
sub esp, 0xfffffff0
cmp byte [ebp - 1], 0xa
je 0x420083
mov byte [esi], 0xd
inc esi
mov eax, dword [ebp - 0xc]
cmp dword [ebp + 0x10], eax
jb 0x41ffd5
jmp 0x4200a6
mov eax, dword [ebx]
lea eax, [edi + eax + 4]
test byte [eax], 0x40
jne 0x4200a1
or byte [eax], 2
jmp 0x4200a6
mov al, byte [ecx]
mov byte [esi], al
inc esi
mov eax, esi
sub eax, dword [ebp - 0x10]
cmp byte [ebp - 2], 1
mov dword [ebp - 0xc], eax
jne 0x420188
or eax, eax
je 0x420188
dec esi
mov cl, byte [esi]
or cl, cl
js 0x4200cd
inc esi
jmp 0x420153
xor eax, eax
inc eax
movzx ecx, cl
jmp 0x4200e4
cmp eax, 4
jg 0x4200ed
cmp esi, dword [ebp - 0x10]
jb 0x4200ed
dec esi
inc eax
movzx ecx, byte [esi]
cmp byte [ecx + 0x477e20], 0
je 0x4200d5
mov dl, byte [esi]
movzx ecx, dl
movsx ecx, byte [ecx + 0x477e20]
or ecx, ecx
jne 0x42010a
call fcn.00414b17
mov dword [eax], 0x2a
jmp 0x420184
inc ecx
cmp ecx, eax
jne 0x420113
add esi, eax
jmp 0x420153
mov ecx, dword [ebx]
test byte [ecx + edi + 4], 0x48
je 0x420141
inc esi
cmp eax, 2
mov byte [ecx + edi + 5], dl
jl 0x42012f
mov dl, byte [esi]
mov ecx, dword [ebx]
inc esi
mov byte [edi + ecx + 0x25], dl
cmp eax, 3
jne 0x42013d
mov dl, byte [esi]
inc esi
mov ecx, dword [ebx]
mov byte [edi + ecx + 0x26], dl
sub esi, eax
jmp 0x420153
neg eax
cdq
push 1
push edx
push eax
push dword [ebp + 8]
call fcn.0041bfd2
add esp, 0x10
mov eax, dword [ebp - 0x1c]
sub esi, dword [ebp - 0x10]
shr eax, 1
push eax
push dword [ebp + 0xc]
push esi
push dword [ebp - 0x10]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
mov dword [ebp - 0xc], eax
jne 0x4201ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00414b3d
pop ecx
or dword [ebp - 0x14], 0xffffffff
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
je 0x420197
push eax
call fcn.00412cfc
pop ecx
mov eax, dword [ebp - 0x14]
cmp eax, 0xfffffffe
jne 0x42032e
mov eax, dword [ebp - 0xc]
jmp 0x42032e
xor ecx, ecx
mov edx, dword [ebx]
mov eax, dword [ebp - 0xc]
cmp eax, esi
setne cl
add eax, eax
mov dword [ebp - 0xc], eax
mov dword [edi + edx + 0x30], ecx
jmp 0x420188
or ecx, ecx
je 0x4201d1
cmp word [esi], 0xa
jne 0x4201d1
or byte [eax], 4
jmp 0x4201d4
and byte [eax], 0xfb
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0x10]
mov dword [ebp + 0x10], esi
add eax, esi
mov dword [ebp - 0xc], eax
cmp esi, eax
jae 0x4202eb
mov eax, dword [ebp + 0x10]
movzx ecx, word [eax]
cmp ecx, 0x1a
je 0x4202d2
cmp ecx, 0xd
je 0x42020f
mov word [esi], cx
add esi, 2
add eax, 2
mov dword [ebp + 0x10], eax
jmp 0x4202c4
mov ecx, dword [ebp - 0xc]
sub ecx, 2
cmp eax, ecx
jae 0x420237
lea ecx, [eax + 2]
cmp word [ecx], 0xa
jne 0x42022f
sub eax, 0xfffffffc
mov dword [ebp + 0x10], eax
push 0xa
jmp 0x4202bd
mov dword [ebp + 0x10], ecx
jmp 0x4202bb
lea eax, [ebp - 0x18]
sub dword [ebp + 0x10], 0xfffffffe
push 0
push eax
lea eax, [ebp - 8]
push 2
push eax
mov eax, dword [ebx]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
or eax, eax
jne 0x420260
call dword [sym.imp.KERNEL32.dll_GetLastError]
or eax, eax
jne 0x4202bb
cmp dword [ebp - 0x18], 0
je 0x4202bb
mov eax, dword [ebx]
test byte [edi + eax + 4], 0x48
je 0x420297
cmp word [ebp - 8], 0xa
je 0x420228
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx]
mov cl, byte [ebp - 8]
mov byte [edi + eax + 5], cl
mov cl, byte [ebp - 7]
mov eax, dword [ebx]
mov byte [edi + eax + 0x25], cl
mov eax, dword [ebx]
mov byte [edi + eax + 0x26], 0xa
jmp 0x4202c1
cmp esi, dword [ebp - 0x10]
jne 0x4202a3
cmp word [ebp - 8], 0xa
je 0x420228
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041bfd2
sub esp, 0xfffffff0
cmp word [ebp - 8], 0xa
je 0x4202c4
push 0xd
pop eax
mov word [esi], ax
sub esi, 0xfffffffe
mov eax, dword [ebp - 0xc]
cmp dword [ebp + 0x10], eax
jb 0x4201ea
jmp 0x4202eb
mov ecx, dword [ebx]
lea edi, [edi + ecx + 4]
test byte [edi], 0x40
jne 0x4202e2
or byte [edi], 2
jmp 0x4202eb
mov ax, word [eax]
mov word [esi], ax
add esi, 2
sub esi, dword [ebp - 0x10]
mov dword [ebp - 0xc], esi
jmp 0x420188
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop edi
cmp eax, edi
jne 0x42031a
call fcn.00414b17
mov dword [eax], 9
call fcn.00414b2a
mov dword [eax], edi
jmp 0x420184
cmp eax, 0x6d
jne 0x42017d
and dword [ebp - 0x14], 0
jmp 0x420188
xor eax, eax
pop ebx
pop esi
pop edi
leave
ret