Function at 0x406430
Capabilities:
Enumerate pe sections
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd4
push esi
mov byte [ebp - 5], 0
push 0x24
push 1
call fcn.00407d80
add esp, 8
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x44], 0xfffffff9
mov dword [ebp - 0x40], 0xffffffff
push ecx
fld dword [str.VUUD]
fstp dword [esp]
call fcn.00401bb0
add esp, 4
add eax, 8
mov dword [ebp - 0x3c], eax
push ecx
fld dword [0x40d11c]
fstp dword [esp]
call fcn.00401bb0
add esp, 4
add eax, 6
mov dword [ebp - 0x38], eax
call sub.KERNEL32.dll_GetConsoleWindow
mov dword [ebp + 8], eax
cmp dword [ebp + 8], 0
je 0x4064e9
cmp dword [ebp + 8], 0
je 0x4064bf
mov dword [ebp - 0x48], 1
jmp 0x4064c6
mov dword [ebp - 0x48], 0
push str.get_console_window
movzx ecx, byte [ebp - 0x48]
push ecx
push 0
push 0xa3
push 0x40e2d0
call fcn.0040a5a0
add esp, 0x14
jmp 0x4066f1
mov dword [ebp - 0x28], 0
push 0xffffffffffffffff
call sub.KERNEL32.dll_AttachConsole
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x406509
mov dword [ebp - 0x4c], 1
jmp 0x406510
mov dword [ebp - 0x4c], 0
push str.attach_to_parent_process
movzx edx, byte [ebp - 0x4c]
push edx
call sub.KERNEL32.dll_GetLastError
push eax
push 0xac
push 0x40e2f8
call fcn.0040a5a0
add esp, 0x14
cmp dword [ebp - 0x28], 0
je 0x40653d
jmp 0x4066f1
call sub.KERNEL32.dll_GetLastError
mov ecx, 4
shl ecx, 0
mov dword [ebp + ecx - 0x88], eax
mov byte [ebp - 5], 1
call sub.KERNEL32.dll_AllocConsole
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x40656c
mov dword [ebp - 0x50], 1
jmp 0x406573
mov dword [ebp - 0x50], 0
push str.create_new_console
movzx edx, byte [ebp - 0x50]
push edx
mov eax, dword [ebp - 0x2c]
push eax
push 0xb7
push 0x40e318
call fcn.0040a5a0
add esp, 0x14
cmp dword [ebp - 0x2c], 0
je 0x40659e
jmp 0x4064e9
call sub.KERNEL32.dll_GetLastError
mov ecx, 4
imul edx, ecx, 0
mov dword [ebp + edx - 0x88], eax
mov eax, dword [ebp - 4]
push eax
call fcn.00407ef0
add esp, 4
mov dword [ebp - 0xc], 0
jmp 0x4065d0
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 5
jae 0x4066ea
mov edx, dword [ebp - 0xc]
cmp dword [ebp + edx*4 - 0x88], 0
je case.default.0x4065fe
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 4
ja case.default.0x4065fe
mov ecx, dword [ebp - 0x54]
jmp dword [ecx*4 + 0x406c80]
push str.alloc_failed
push 0x40e334
call fcn.00406f20
add esp, 8
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + edx*4 - 0x88]
push eax
push 0x40e344
call fcn.0040a9f0
add esp, 8
jmp case.default.0x4065fe
push str.attach_failed
push 0x40e364
call fcn.00406f20
add esp, 8
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp + ecx*4 - 0x88]
push edx
push 0x40e374
call fcn.0040a9f0
add esp, 8
jmp case.default.0x4065fe
push str.no_console_window
push 0x40e398
call fcn.00406f20
add esp, 8
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + eax*4 - 0x88]
push ecx
push 0x40e3a8
call fcn.0040a9f0
add esp, 8
jmp case.default.0x4065fe
push 0x40e3b8
push 0x40e3d4
call fcn.00406f20
add esp, 8
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + edx*4 - 0x88]
push eax
push 0x40e3e4
call fcn.0040a9f0
add esp, 8
jmp case.default.0x4065fe
push str.invalid_handle_for_STDIN
push 0x40e410
call fcn.00406f20
add esp, 8
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp + ecx*4 - 0x88]
push edx
push str.init_console
call fcn.0040a9f0
add esp, 8
jmp 0x4065c7
xor eax, eax
jmp 0x406c7b
push 1
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0x3c]
sub ecx, dword [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x40]
push edx
mov eax, dword [ebp - 0x44]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.USER32.dll_MoveWindow
mov dword [ebp - 0x94], eax
cmp dword [ebp - 0x94], 0
je 0x40672a
mov dword [ebp - 0x58], 1
jmp 0x406731
mov dword [ebp - 0x58], 0
push str.move_console_window_to__coords__dims_
movzx edx, byte [ebp - 0x58]
push edx
call sub.KERNEL32.dll_GetLastError
push eax
push 0xe2
push 0x40e458
call fcn.0040a5a0
add esp, 0x14
push 0xfffffffffffffff5
call sub.KERNEL32.dll_GetStdHandle
mov dword [0x4a1568], eax
cmp dword [0x4a1568], 0xffffffff
je 0x406771
mov dword [ebp - 0x5c], 1
jmp 0x406778
mov dword [ebp - 0x5c], 0
push str.get_STDOUT_handle
movzx eax, byte [ebp - 0x5c]
push eax
call sub.KERNEL32.dll_GetLastError
push eax
push 0xe7
push 0x40e478
call fcn.0040a5a0
add esp, 0x14
cmp dword [0x4a1568], 0xffffffff
jne 0x4067b7
call sub.KERNEL32.dll_GetLastError
mov ecx, 4
imul edx, ecx, 3
mov dword [ebp + edx - 0x88], eax
push 0xfffffffffffffff6
call sub.KERNEL32.dll_GetStdHandle
mov dword [0x4a156c], eax
cmp dword [0x4a156c], 0xffffffff
je 0x4067d5
mov dword [ebp - 0x60], 1
jmp 0x4067dc
mov dword [ebp - 0x60], 0
push str.get_STDIN_handle
movzx eax, byte [ebp - 0x60]
push eax
call sub.KERNEL32.dll_GetLastError
push eax
push 0xed
push 0x40e498
call fcn.0040a5a0
add esp, 0x14
cmp dword [0x4a156c], 0xffffffff
jne 0x40681b
call sub.KERNEL32.dll_GetLastError
mov ecx, 4
shl ecx, 2
mov dword [ebp + ecx - 0x88], eax
lea edx, [ebp - 0xbc]
push edx
mov eax, dword [0x4a1568]
push eax
call sub.KERNEL32.dll_GetConsoleScreenBufferInfo
mov ecx, dword [ebp - 4]
mov dx, word [ebp - 0xbc]
mov word [ecx + 4], dx
mov eax, dword [ebp - 4]
mov cx, word [ebp - 0xba]
mov word [eax + 6], cx
mov edx, dword [ebp - 4]
mov ax, word [ebp - 0xb8]
mov word [edx + 8], ax
mov ecx, dword [ebp - 4]
mov dx, word [ebp - 0xb6]
mov word [ecx + 0xa], dx
mov eax, dword [ebp - 4]
mov cx, word [ebp - 0x44]
mov word [eax + 0xc], cx
mov edx, dword [ebp - 4]
mov ax, word [ebp - 0x40]
mov word [edx + 0xe], ax
mov ecx, dword [ebp - 4]
mov dx, word [ebp - 0x3c]
mov word [ecx + 0x10], dx
mov eax, dword [ebp - 4]
mov cx, word [ebp - 0x38]
mov word [eax + 0x12], cx
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov dword [edx], eax
mov dword [ebp - 0xa0], 0xc0000000
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0x98], 0
mov ecx, dword [ebp - 4]
mov dx, word [ecx + 4]
mov word [ebp - 0x30], dx
mov eax, dword [ebp - 4]
mov cx, word [eax + 6]
mov word [ebp - 0x2e], cx
xor edx, edx
mov word [ebp - 0x6c], dx
xor eax, eax
mov word [ebp - 0x6a], ax
xor ecx, ecx
mov word [ebp - 0x8e], cx
mov edx, dword [ebp - 4]
mov ax, word [edx + 6]
mov word [ebp - 0x8a], ax
xor ecx, ecx
mov word [ebp - 0x90], cx
mov edx, dword [ebp - 4]
mov ax, word [edx + 4]
mov word [ebp - 0x8c], ax
push 4
mov ecx, dword [ebp - 4]
movsx edx, word [ecx + 4]
mov eax, dword [ebp - 4]
movsx ecx, word [eax + 6]
imul edx, ecx
push edx
call fcn.00407d80
add esp, 8
mov edx, 8
imul ecx, edx, 0
mov edx, dword [ebp - 4]
mov dword [edx + ecx + 0x18], eax
push 4
mov eax, dword [ebp - 4]
movsx ecx, word [eax + 4]
mov edx, dword [ebp - 4]
movsx eax, word [edx + 6]
imul ecx, eax
push ecx
call fcn.00407d80
add esp, 8
mov ecx, 8
shl ecx, 0
mov edx, dword [ebp - 4]
mov dword [edx + ecx + 0x18], eax
push 0
push 1
mov eax, dword [ebp - 0x98]
push eax
mov ecx, dword [ebp - 0x9c]
push ecx
mov edx, dword [ebp - 0xa0]
push edx
call sub.KERNEL32.dll_CreateConsoleScreenBuffer
mov ecx, 8
imul edx, ecx, 0
mov ecx, dword [ebp - 4]
mov dword [ecx + edx + 0x14], eax
mov edx, 8
imul eax, edx, 0
mov ecx, dword [ebp - 4]
cmp dword [ecx + eax + 0x14], 0xffffffff
je 0x4069a5
mov dword [ebp - 0x64], 1
jmp 0x4069ac
mov dword [ebp - 0x64], 0
push str.create_console_screenbuffer
movzx edx, byte [ebp - 0x64]
push edx
call sub.KERNEL32.dll_GetLastError
push eax
push 0x113
push 0x40e4c0
call fcn.0040a5a0
add esp, 0x14
mov eax, 8
imul ecx, eax, 0
mov edx, 4
imul eax, edx, 0
mov edx, dword [ebp - 4]
mov ecx, dword [edx + ecx + 0x18]
mov byte [ecx + eax], 0x51
push 0
push 1
push 1
push 1
call fcn.00407840
add esp, 0x10
movzx esi, al
push 0x10
push 0
push 0
push 0x10
call fcn.00407840
add esp, 0x10
movzx edx, al
or esi, edx
mov eax, 8
imul ecx, eax, 0
mov edx, 4
imul eax, edx, 0
mov edx, dword [ebp - 4]
mov ecx, dword [edx + ecx + 0x18]
mov word [ecx + eax + 2], si
mov edx, dword [ebp - 0x30]
push edx
mov eax, 8
imul ecx, eax, 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + ecx + 0x14]
push eax
call sub.KERNEL32.dll_SetConsoleScreenBufferSize
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x406a58
mov dword [ebp - 0x68], 1
jmp 0x406a5f
mov dword [ebp - 0x68], 0
push str.set_buffer_size
movzx ecx, byte [ebp - 0x68]
push ecx
call sub.KERNEL32.dll_GetLastError
push eax
push 0x11c
push 0x40e4dc
call fcn.0040a5a0
add esp, 0x14
lea edx, [ebp - 0x90]
push edx
mov eax, dword [ebp - 0x6c]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, 8
imul eax, edx, 0
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + eax + 0x18]
push edx
mov eax, 8
imul ecx, eax, 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + ecx + 0x14]
push eax
call sub.KERNEL32.dll_WriteConsoleOutputA
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x406ac7
mov dword [ebp - 0x70], 1
jmp 0x406ace
mov dword [ebp - 0x70], 0
push str.write
movzx ecx, byte [ebp - 0x70]
push ecx
call sub.KERNEL32.dll_GetLastError
push eax
push 0x11e
push 0x40e4f0
call fcn.0040a5a0
add esp, 0x14
push 0
push 0
push 0xe
push 0x40e4fc
mov edx, 8
imul eax, edx, 0
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + eax + 0x14]
push edx
call sub.KERNEL32.dll_WriteConsoleA
mov eax, 8
imul ecx, eax, 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + ecx + 0x14]
push eax
call sub.KERNEL32.dll_SetConsoleActiveScreenBuffer
mov dword [ebp - 0xa4], eax
cmp dword [ebp - 0xa4], 0
je 0x406b3d
mov dword [ebp - 0x74], 1
jmp 0x406b44
mov dword [ebp - 0x74], 0
push str.change_active_scrbuf
movzx ecx, byte [ebp - 0x74]
push ecx
call sub.KERNEL32.dll_GetLastError
push eax
push 0x126
push str.console.c
call fcn.0040a5a0
add esp, 0x14
xor edx, edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], edx
lea eax, [ebp - 0xd4]
push eax
call fcn.0040a4e0
add esp, 4
mov ecx, dword [eax]
mov dword [ebp - 0x24], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0x20], edx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x1c], ecx
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x14], ecx
mov edx, dword [eax + 0x14]
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x24], 0
je 0x406c27
cmp dword [ebp - 0x14], 0
je 0x406c27
cmp dword [ebp - 0x10], 0
je 0x406c27
sub esp, 0x18
mov eax, esp
mov ecx, dword [ebp - 0x24]
mov dword [eax], ecx
mov edx, dword [ebp - 0x20]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x18]
mov dword [eax + 0xc], edx
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0x10], ecx
mov edx, dword [ebp - 0x10]
mov dword [eax + 0x14], edx
call fcn.0040ae50
add esp, 0x18
mov eax, dword [ebp - 0x24]
push eax
call fcn.00407ef0
add esp, 4
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00407ef0
add esp, 4
mov dword [ebp - 0x14], 0
mov edx, dword [ebp - 0x10]
push edx
call fcn.00407ef0
add esp, 4
mov dword [ebp - 0x10], 0
xor eax, eax
jne 0x406b66
mov ecx, dword [0x4a1568]
push ecx
call sub.KERNEL32.dll_SetConsoleActiveScreenBuffer
movzx edx, byte [ebp - 5]
test edx, edx
je 0x406c54
push 7
push str.console:_allocated_new_console_n
call fcn.00406dc0
add esp, 8
jmp 0x406c63
push 7
push str.console:_attached_to_parent_console_n
call fcn.00406dc0
add esp, 8
mov eax, 8
imul ecx, eax, 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + ecx + 0x14]
push eax
call sub.KERNEL32.dll_SetConsoleActiveScreenBuffer
mov eax, dword [ebp - 4]
pop esi
mov esp, ebp
pop ebp
ret