Function at 0x413c50
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
push 0xfffffffffffffffe
pop ecx
xor edi, edi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], esi
cmp eax, ecx
jne 0x413c8a
call fcn.0040aa27
mov dword [eax], edi
call fcn.0040aa5d
mov dword [eax], 9
jmp 0x414425
test eax, eax
js 0x414406
cmp eax, dword [0x41d960]
jae 0x414406
mov ecx, eax
and eax, 0x1f
sar ecx, 5
imul ebx, eax, 0x24
mov dword [ebp - 0x10], ecx
mov edx, dword [ecx*4 + 0x41d980]
mov dword [ebp - 0x20], edx
mov al, byte [ebx + edx + 4]
mov byte [ebp - 2], al
test al, 1
je 0x414406
cmp esi, 0x7fffffff
jbe 0x413ce4
call fcn.0040aa27
mov dword [eax], edi
call fcn.0040aa5d
mov dword [eax], 0x16
jmp 0x414418
test esi, esi
je 0x414402
test al, 2
jne 0x414402
cmp dword [ebp + 0xc], edi
jne 0x413d17
call fcn.0040aa27
xor ebx, ebx
mov dword [eax], ebx
call fcn.0040aa5d
push ebx
push ebx
push ebx
push ebx
mov dword [eax], 0x16
push ebx
jmp 0x41441d
mov eax, dword [ebx + edx + 8]
and eax, 3
mov dword [ebp - 0x28], eax
sub eax, 1
je 0x413d3e
sub eax, 1
jne 0x413d36
mov eax, esi
not eax
test al, 1
je 0x413cf9
and esi, 0xfffffffe
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
jmp 0x413d7f
mov eax, esi
not eax
test al, 1
je 0x413cf9
shr esi, 1
cmp esi, 4
jae 0x413d50
push 4
pop esi
push esi
call fcn.00408126
mov dword [ebp - 0xc], eax
pop ecx
test eax, eax
jne 0x413d79
call fcn.0040aa5d
mov dword [eax], 0xc
call fcn.0040aa27
mov dword [eax], 8
jmp 0x414425
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x20]
test byte [ebp - 2], 0x48
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], 0xa
je 0x413e18
mov dl, byte [ebx + edx + 5]
cmp dl, 0xa
je 0x413e18
test esi, esi
je 0x413e18
mov byte [eax], dl
xor edi, edi
lea edx, [eax + 1]
inc edi
mov eax, dword [ecx*4 + 0x41d980]
dec esi
cmp dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], edx
mov byte [ebx + eax + 5], 0xa
je 0x413e18
mov eax, dword [ecx*4 + 0x41d980]
mov al, byte [ebx + eax + 6]
cmp al, 0xa
je 0x413e18
test esi, esi
je 0x413e18
mov byte [edx], al
inc edx
mov eax, dword [ecx*4 + 0x41d980]
dec esi
cmp dword [ebp - 0x28], 1
push 2
mov dword [ebp - 0x1c], edx
pop edi
mov byte [ebx + eax + 6], 0xa
jne 0x413e18
mov eax, dword [ecx*4 + 0x41d980]
mov al, byte [ebx + eax + 7]
cmp al, 0xa
je 0x413e18
test esi, esi
je 0x413e18
mov byte [edx], al
inc edx
mov eax, dword [ecx*4 + 0x41d980]
dec esi
mov ecx, dword [ebp - 0x14]
push 3
mov dword [ebp - 0x1c], edx
pop edi
mov byte [ebx + eax + 7], cl
push dword [ebp + 8]
call fcn.0041376d
test eax, eax
mov eax, dword [ebp - 0x10]
pop ecx
je 0x413e99
mov ecx, dword [eax*4 + 0x41d980]
cmp byte [ebx + ecx + 4], 0
jge 0x413e99
lea eax, [ebp - 0x38]
push eax
push dword [ebx + ecx]
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x413e96
cmp dword [ebp - 0x28], 2
jne 0x413e96
push 0
lea eax, [ebp - 0x20]
shr esi, 1
push eax
mov eax, dword [ebp - 0x10]
push esi
push dword [ebp - 0x1c]
mov eax, dword [eax*4 + 0x41d980]
push dword [ebx + eax]
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
jne 0x413e8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040aa3a
pop ecx
or ebx, 0xffffffff
mov ecx, dword [ebp - 0xc]
jmp 0x414143
mov eax, dword [ebp - 0x20]
lea ecx, [eax + eax]
mov dword [ebp - 0x20], ecx
jmp 0x413ece
mov eax, dword [ebp - 0x10]
mov eax, dword [eax*4 + 0x41d980]
lea ecx, [ebp - 0x20]
push 0
push ecx
push esi
push dword [ebp - 0x1c]
push dword [ebx + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4143ce
mov ecx, dword [ebp - 0x20]
test ecx, ecx
js 0x4143ce
cmp ecx, esi
ja 0x4143ce
mov edx, dword [ebp - 0x10]
add edi, ecx
mov esi, dword [edx*4 + 0x41d980]
mov al, byte [ebx + esi + 4]
test al, al
jns 0x41413d
cmp dword [ebp - 0x28], 2
je 0x41415d
test ecx, ecx
mov ecx, dword [ebp - 0xc]
je 0x413f00
cmp byte [ecx], 0xa
jne 0x413f00
or al, 4
jmp 0x413f02
and al, 0xfb
mov byte [ebx + esi + 4], al
add edi, ecx
mov dword [ebp - 0x2c], edi
mov eax, ecx
mov dword [ebp - 0x18], eax
mov esi, ecx
cmp ecx, edi
jae 0x414040
mov dword [ebp - 0x1c], 0xd
mov al, byte [eax]
mov byte [ebp - 2], al
cmp al, 0x1a
je 0x414025
mov edi, dword [ebp - 0x18]
inc edi
cmp al, 0xd
je 0x413f43
mov byte [esi], al
mov eax, edi
inc esi
mov dword [ebp - 0x18], eax
jmp 0x41401a
mov eax, dword [ebp - 0x2c]
dec eax
cmp dword [ebp - 0x18], eax
jae 0x413f73
mov al, byte [edi]
mov byte [ebp - 3], al
cmp al, 0xa
jne 0x413f5b
mov eax, dword [ebp - 0x14]
mov byte [ebp - 2], al
xor eax, eax
cmp byte [ebp - 3], 0xa
sete al
inc eax
add dword [ebp - 0x18], eax
mov al, byte [ebp - 2]
mov byte [esi], al
inc esi
jmp 0x414017
push 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x18], edi
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edx*4 + 0x41d980]
push dword [ebx + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x413fa0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41400b
cmp dword [ebp - 0x20], 0
je 0x41400b
mov edx, dword [ebp - 0x10]
mov eax, dword [edx*4 + 0x41d980]
test byte [ebx + eax + 4], 0x48
je 0x413fd9
mov eax, dword [ebp - 0x14]
cmp byte [ebp - 1], al
jne 0x413fc3
mov byte [esi], al
jmp 0x413fd6
mov eax, dword [ebp - 0x1c]
mov byte [esi], al
mov ecx, dword [edx*4 + 0x41d980]
mov al, byte [ebp - 1]
mov byte [ebx + ecx + 5], al
inc esi
jmp 0x414014
mov ecx, dword [ebp - 0xc]
cmp esi, ecx
jne 0x413fed
mov eax, dword [ebp - 0x14]
cmp byte [ebp - 1], al
jne 0x413fed
mov byte [esi], al
inc esi
jmp 0x414017
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004154a4
mov eax, dword [ebp - 0x14]
add esp, 0x10
mov edx, dword [ebp - 0x10]
cmp byte [ebp - 1], al
je 0x414014
jmp 0x41400e
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
mov byte [esi], al
inc esi
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x2c]
jb 0x413f21
jmp 0x414040
mov edx, dword [edx*4 + 0x41d980]
mov al, byte [ebx + edx + 4]
test al, 0x40
jne 0x41403c
or al, 2
mov byte [ebx + edx + 4], al
jmp 0x414040
mov byte [esi], 0x1a
inc esi
mov edi, esi
mov edx, esi
sub edi, ecx
cmp dword [ebp - 0x28], 1
jne 0x414140
test edi, edi
je 0x414140
dec esi
mov al, byte [esi]
test al, al
js 0x414066
mov esi, edx
jmp 0x41410b
xor edx, edx
movzx eax, al
inc edx
jmp 0x41407c
cmp edx, 4
jg 0x414085
cmp esi, ecx
jb 0x414085
dec esi
inc edx
movzx eax, byte [esi]
cmp byte [eax + 0x403318], 0
je 0x41406e
movzx eax, byte [esi]
movsx eax, byte [eax + 0x403318]
test eax, eax
jne 0x4140a3
call fcn.0040aa5d
mov dword [eax], 0x2a
jmp 0x413e80
inc eax
cmp eax, edx
jne 0x4140ac
add esi, edx
jmp 0x41410b
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax*4 + 0x41d980]
test byte [ebx + ecx + 4], 0x48
je 0x4140f4
mov al, byte [esi]
inc esi
mov byte [ebx + ecx + 5], al
mov eax, dword [ebp - 0x10]
cmp edx, 2
jl 0x4140dd
mov ecx, dword [eax*4 + 0x41d980]
mov al, byte [esi]
inc esi
mov byte [ebx + ecx + 6], al
mov eax, dword [ebp - 0x10]
cmp edx, 3
jne 0x4140f0
mov ecx, dword [eax*4 + 0x41d980]
mov al, byte [esi]
inc esi
mov byte [ebx + ecx + 7], al
sub esi, edx
jmp 0x414108
neg edx
mov eax, edx
push 1
cdq
push edx
push eax
push dword [ebp + 8]
call fcn.004154a4
add esp, 0x10
mov ecx, dword [ebp - 0xc]
mov edi, esi
mov esi, dword [ebp - 0x30]
mov eax, esi
sub edi, ecx
shr eax, 1
push eax
push dword [ebp + 0xc]
push edi
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x413e73
add eax, eax
cmp eax, esi
ja 0x413e73
mov edi, eax
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x24]
cmp ecx, dword [ebp + 0xc]
je 0x41414f
push ecx
call fcn.0040c002
pop ecx
cmp ebx, 0xfffffffe
je 0x414156
mov edi, ebx
mov eax, edi
jmp 0x414428
cmp dword [ebp - 0x2c], 0
je 0x4141f5
mov ecx, dword [ebp - 0xc]
mov eax, edi
cdq
mov esi, ecx
sub eax, edx
mov dword [ebp - 0x18], ecx
sar eax, 1
lea edi, [ecx + eax*2]
cmp ecx, edi
jae 0x4141e8
push 0x1a
pop eax
mov dword [ebp - 0x1c], 0xd
mov dword [ebp - 0x28], eax
movzx edx, word [esi]
cmp dx, ax
je 0x4141d9
cmp dx, word [ebp - 0x1c]
je 0x4141a6
mov eax, dword [ebp - 0x18]
mov word [eax], dx
add eax, 2
add esi, 2
jmp 0x4141cd
lea eax, [edi - 2]
cmp esi, eax
jae 0x4141d0
mov eax, dword [ebp - 0x18]
add esi, 2
lea ecx, [eax + 2]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x14]
cmp word [esi], cx
mov ecx, dword [ebp - 0xc]
jne 0x4141c7
mov edx, dword [ebp - 0x14]
mov word [eax], dx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x28]
cmp esi, edi
jb 0x41418a
jmp 0x4141e8
mov eax, dword [ebp - 0x10]
mov eax, dword [eax*4 + 0x41d980]
or byte [ebx + eax + 4], 2
mov edi, dword [ebp - 0x18]
sub edi, ecx
and edi, 0xfffffffe
jmp 0x414140
test ecx, ecx
mov ecx, dword [ebp - 0xc]
je 0x414208
mov edx, dword [ebp - 0x14]
cmp word [ecx], dx
jne 0x414208
or al, 4
jmp 0x41420a
and al, 0xfb
mov byte [ebx + esi + 4], al
lea edx, [edi - 1]
add edx, ecx
mov eax, ecx
mov dword [ebp - 0x38], edx
cmp ecx, edx
mov edx, dword [ebp - 0x10]
mov esi, ecx
mov dword [ebp - 0x18], eax
jae 0x4143c5
mov dword [ebp - 0x1c], 0xd
mov dword [ebp - 0x28], 0x1a
movzx eax, word [eax]
mov dword [ebp - 0x30], eax
cmp ax, word [ebp - 0x28]
je 0x4143a5
mov edx, dword [ebp - 0x18]
add edx, 2
mov dword [ebp - 0x2c], edx
mov edx, dword [ebp - 0x10]
cmp ax, word [ebp - 0x1c]
je 0x414269
mov word [esi], ax
add esi, 2
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x18], eax
jmp 0x41439a
lea eax, [edi - 2]
add eax, ecx
cmp dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x2c]
jae 0x4142b4
movzx edx, word [eax]
lea eax, [esi + 2]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x14]
cmp dx, ax
je 0x41428d
mov eax, dword [ebp - 0x30]
movzx eax, ax
mov dword [ebp - 0x2c], eax
xor eax, eax
cmp dx, word [ebp - 0x14]
mov edx, dword [ebp - 0x2c]
sete al
mov word [esi], dx
mov esi, dword [ebp - 0x34]
lea eax, [eax*2 + 2]
add eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
jmp 0x414397
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push 0
push eax
push 2
lea eax, [ebp - 8]
push eax
mov eax, dword [edx*4 + 0x41d980]
push dword [ebx + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4142e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x414388
cmp dword [ebp - 0x20], 0
je 0x414388
mov edx, dword [ebp - 0x10]
mov eax, dword [edx*4 + 0x41d980]
test byte [ebx + eax + 4], 0x48
je 0x41434e
mov ecx, dword [ebp - 0x14]
lea eax, [esi + 2]
mov dword [ebp - 0x34], eax
cmp word [ebp - 8], cx
jne 0x414314
mov word [esi], cx
jmp 0x414347
mov eax, dword [ebp - 0x1c]
mov word [esi], ax
mov ecx, dword [edx*4 + 0x41d980]
mov al, byte [ebp - 8]
mov byte [ebx + ecx + 5], al
mov ecx, dword [edx*4 + 0x41d980]
mov al, byte [ebp - 7]
mov byte [ebx + ecx + 6], al
mov eax, dword [edx*4 + 0x41d980]
mov ecx, dword [ebp - 0x14]
mov byte [ebx + eax + 7], cl
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov esi, eax
jmp 0x414364
mov ecx, dword [ebp - 0xc]
cmp esi, ecx
jne 0x414369
mov eax, dword [ebp - 0x14]
cmp word [ebp - 8], ax
jne 0x414369
mov word [esi], ax
add esi, 2
mov eax, dword [ebp - 0x18]
jmp 0x41439a
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004154a4
mov eax, dword [ebp - 0x14]
add esp, 0x10
mov ecx, dword [ebp - 0xc]
cmp word [ebp - 8], ax
je 0x414394
jmp 0x41438b
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
mov word [esi], ax
add esi, 2
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x38]
jb 0x414236
jmp 0x4143c5
mov edx, dword [edx*4 + 0x41d980]
mov al, byte [ebx + edx + 4]
test al, 0x40
jne 0x4143bc
or al, 2
mov byte [ebx + edx + 4], al
jmp 0x4143c5
mov eax, dword [ebp - 0x28]
mov word [esi], ax
add esi, 2
mov edi, esi
sub edi, ecx
jmp 0x414140
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4143f2
call fcn.0040aa5d
mov dword [eax], 9
call fcn.0040aa27
mov dword [eax], esi
jmp 0x413e80
cmp eax, 0x6d
jne 0x413e79
xor ebx, ebx
jmp 0x413e83
xor eax, eax
jmp 0x414428
call fcn.0040aa27
mov dword [eax], edi
call fcn.0040aa5d
mov dword [eax], 9
push edi
push edi
push edi
push edi
push edi
call fcn.0040aab3
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret