Function at 0x401db6
Capabilities:
Read file on windows

Disassembly:
jmp 0x4405a0
sub esp, 0x2c
mov eax, dword [0x4a94b8]
push esi
xor esi, esi
cmp eax, esi
mov dword [esp + 8], esi
mov dword [esp + 0x10], esi
jl 0x4405cf
mov ecx, dword [esp + 0x38]
mov byte [ecx], al
lea eax, [esi + 1]
mov dword [0x4a94b8], 0xffffffff
pop esi
add esp, 0x2c
ret
mov eax, dword [esp + 0x3c]
shr eax, 1
push ebx
mov dword [esp + 0x40], eax
jne 0x440646
mov dword [esp + 0x40], 1
mov dword [esp + 0x10], 0x48b160
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [esp + 0x40]
push edi
jmp 0x440600
mov eax, dword [0x4a94ac]
mov ecx, dword [0x4a94b0]
mov edx, dword [0x4a94b4]
mov edi, dword [esp + 0x40]
push 0xffffffffffffffff
mov dword [esp + 0x30], eax
push 0
lea eax, [esp + 0x34]
push eax
push 4
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], edi
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x44068e
push 0xa
call fcn.0040143d
add esp, 4
jmp 0x4406a0
cmp eax, 0x800
jbe 0x4405e4
lea edx, [eax + eax*4]
add edx, edx
add edx, edx
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
cmp ebx, esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], 1
jne 0x4405f0
call fcn.0044baf1
pop ebx
mov dword [eax], 0xc
or eax, 0xffffffff
pop esi
add esp, 0x2c
ret
cmp eax, 1
je 0x44082c
cmp eax, 2
je 0x440843
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x24]
push ecx
push edx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputA]
test eax, eax
je 0x44085a
xor eax, eax
cmp dword [esp + 0x24], eax
mov word [0x4a94a8], ax
mov dword [esp + 0x20], eax
jbe 0x440600
lea edi, [ebx + 0xa]
movzx eax, word [edi - 0xa]
sub eax, 1
jne 0x4407dd
cmp dword [edi - 6], eax
je 0x4407dd
mov cl, byte [edi + 4]
movzx eax, word [edi]
mov byte [esp + 0x13], cl
mov ebx, dword [edi + 6]
test bl, 2
jne 0x440709
test bl, 1
je 0x440711
cmp dword [0x497518], 0
je 0x440711
mov dword [esp + 0x14], 1
mov edx, 1
cmp word [0x4a94a4], dx
jne 0x440753
cmp ax, 0x70
jb 0x44072f
cmp ax, 0x87
jbe 0x440895
cmp ax, 0x21
jb 0x44073f
cmp ax, 0x28
jbe 0x44089c
cmp ax, 0x2d
je 0x440909
cmp ax, 0x2e
je 0x440977
cmp ax, 0x1b
je 0x4407cb
test cl, cl
je 0x4407d1
cmp dword [0x48b140], edx
jne 0x44078b
cmp cl, 0xd
jne 0x44078b
push 0
lea eax, [esp + 0x2c]
push eax
push edx
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x1f]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov cl, byte [esp + 0x13]
mov edx, 1
cmp dword [0x497518], 0
je 0x4407a9
cmp cl, 0x20
je 0x44079e
cmp cl, 0x40
jne 0x4407a9
test bl, 0xc
je 0x4407a9
xor cl, cl
mov byte [esp + 0x13], cl
cmp dword [esp + 0x14], 0
je 0x4407c6
mov byte [esi + ebp], 0x1b
add esi, edx
cmp dword [esp + 0x48], edx
jne 0x4407c6
movzx eax, cl
mov dword [0x4a94b8], eax
jmp 0x4407d1
mov byte [esi + ebp], cl
jmp 0x4407cf
mov byte [esi + ebp], 0x1b
add esi, edx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x20]
add eax, 1
add edi, 0x14
cmp eax, dword [esp + 0x24]
mov dword [esp + 0x20], eax
jb 0x4406d3
test esi, esi
je 0x440600
cmp dword [esp + 0x48], esi
jae 0x440807
mov byte [esi + ebp], 0
cmp dword [esp + 0x1c], 0
je 0x44081e
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
je 0x44088a
pop edi
pop ebp
pop ebx
mov eax, esi
pop esi
add esp, 0x2c
ret
call fcn.0044baf1
push 1
mov dword [eax], 4
call fcn.0040143d
add esp, 4
jmp 0x440807
call fcn.0044baf1
push 3
mov dword [eax], 4
call fcn.0040143d
add esp, 4
jmp 0x440807
call dword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xfffffffb
cmp eax, 1
ja 0x440873
call fcn.0044baf1
mov dword [eax], 9
cmp dword [esp + 0x1c], 0
je 0x44088a
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop ebp
pop ebx
or eax, 0xffffffff
pop esi
add esp, 0x2c
ret
add eax, 0x90
jmp 0x4408a1
add eax, 0xf7
test bl, 0xc
mov word [0x4a94a8], ax
je 0x4408c7
add word [0x4a94a8], 0x22
pop edi
pop ebp
pop ebx
mov word [0x4a94a4], 2
mov eax, edx
pop esi
add esp, 0x2c
ret
cmp dword [esp + 0x14], 0
je 0x4408e9
add word [0x4a94a8], 0x44
pop edi
pop ebp
pop ebx
mov word [0x4a94a4], 2
mov eax, edx
pop esi
add esp, 0x2c
ret
test bl, 0x10
je 0x4408f6
add word [0x4a94a8], 0x66
pop edi
pop ebp
pop ebx
mov word [0x4a94a4], 2
mov eax, edx
pop esi
add esp, 0x2c
ret
test bl, 0xc
mov word [0x4a94a8], 0x120
je 0x440933
pop edi
pop ebp
pop ebx
mov word [0x4a94a8], 0x142
mov word [0x4a94a4], 2
mov eax, edx
pop esi
add esp, 0x2c
ret
cmp dword [esp + 0x14], 0
je 0x440956
pop edi
pop ebp
pop ebx
mov word [0x4a94a8], 0x164
mov word [0x4a94a4], 2
mov eax, edx
pop esi
add esp, 0x2c
ret
test bl, 0x10
je 0x440964
mov word [0x4a94a8], 0x186
pop edi
pop ebp
pop ebx
mov word [0x4a94a4], 2
mov eax, edx
pop esi
add esp, 0x2c
ret
test bl, 0xc
mov word [0x4a94a8], 0x121
je 0x4409a1
pop edi
pop ebp
pop ebx
mov word [0x4a94a8], 0x143
mov word [0x4a94a4], 2
mov eax, edx
pop esi
add esp, 0x2c
ret
cmp dword [esp + 0x14], 0
je 0x4409c4
pop edi
pop ebp
pop ebx
mov word [0x4a94a8], 0x165
mov word [0x4a94a4], 2
mov eax, edx
pop esi
add esp, 0x2c
ret
test bl, 0x10
je 0x4409d2
mov word [0x4a94a8], 0x187
pop edi
pop ebp
pop ebx
mov word [0x4a94a4], 2
mov eax, edx
pop esi
add esp, 0x2c
ret