Function at 0x40cdad
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x411038]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
push ebx
push edi
mov word [ebp - 0x24], ax
lea edi, [ebp - 0x22]
stosd dword es:[edi], eax
xor edx, edx
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp - 0x18], edx
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov ebx, edx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x3c], edx
stosd dword es:[edi], eax
test ecx, ecx
jne 0x40ce08
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40ce01
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40d017
push esi
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
test esi, esi
je 0x40d014
lea eax, [ebp - 0x3c]
push eax
call fcn.00407589
mov ecx, eax
neg ecx
sbb ecx, ecx
inc ecx
mov dword [ebp - 0x30], ecx
jne 0x40ce44
push 1
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
je 0x40d014
mov ecx, dword [ebp - 0x30]
xor eax, eax
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0xa
pop edi
push 0
lea eax, [ebp - 0x34]
push eax
push 1
cmp ecx, 1
jne 0x40ceab
lea eax, [ebp - 0x25]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40d014
cmp dword [ebp - 0x34], 0
je 0x40cfc8
mov al, byte [ebp - 0x25]
mov byte [ebp - 0x24], al
lea eax, [ebp - 0x24]
mov dword [ebp - 0x34], edi
push eax
lea ebx, [ebp - 0x34]
lea edi, [ebp - 0x18]
call fcn.0040cccb
movzx edx, word [ebp - 0x18]
mov ebx, dword [ebp - 0x38]
push 0xa
mov dword [ebp - 0x44], edx
pop edi
jmp 0x40cec1
lea eax, [ebp - 0x44]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x40d00a
mov edx, dword [ebp - 0x44]
cmp dx, 0xd
je 0x40cfc8
push 8
pop eax
cmp dx, ax
jne 0x40cf76
mov ecx, dword [ebp - 0x30]
test ebx, ebx
je 0x40ce5a
push eax
push 0x40d028
lea eax, [ebp - 0x18]
push edi
push eax
call fcn.00404c87
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0x10
push 0
lea eax, [ebp - 0x2c]
push eax
push 1
lea eax, [ebp - 0x18]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
push 0
push 0x40d028
lea eax, [ebp - 0x18]
push 0xa
push eax
call fcn.00404c87
add esp, 0x10
push 0
lea eax, [ebp - 0x2c]
push eax
push 1
lea eax, [ebp - 0x18]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
push 8
push 0x40d028
lea eax, [ebp - 0x18]
push 0xa
push eax
call fcn.00404c87
add esp, 0x10
push 0
lea eax, [ebp - 0x2c]
push eax
push 1
lea eax, [ebp - 0x18]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov ecx, dword [ebp - 0x30]
dec ebx
mov dword [ebp - 0x38], ebx
jmp 0x40ce57
mov eax, dword [ebp + 8]
dec eax
cmp ebx, eax
jne 0x40cf8d
push 0
lea eax, [ebp - 0x2c]
push eax
push 1
push 0x40d030
jmp 0x40cfb1
mov ecx, dword [ebp - 0x30]
cmp dx, di
je 0x40ce5a
mov eax, dword [ebp - 0x40]
mov word [eax + ebx*2], dx
push 0
lea eax, [ebp - 0x2c]
push eax
inc ebx
push 1
mov dword [ebp - 0x38], ebx
push 0x4054a4
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov ecx, dword [ebp - 0x30]
jmp 0x40ce5a
push dword [ebp - 0x3c]
mov eax, dword [ebp - 0x40]
xor ecx, ecx
push esi
mov word [eax + ebx*2], cx
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov esi, edi
mov edx, 0x40d034
lea ecx, [ebp - 0x18]
call fcn.00401d74
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 2
lea ecx, [ebp - 0x18]
push ecx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
xor eax, eax
inc eax
jmp 0x40d016
push dword [ebp - 0x3c]
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.00401d62
leave
ret 4