Function at 0x473620
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [esp + 0x78]
mov esi, dword [esp + 0x70]
mov edi, dword [esp + 0x74]
call fcn.00457ca0
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__get_osfhandle]
cmp eax, 0xffffffff
mov dword [esp + 0x30], eax
je 0x473a2e
cmp ebx, 2
jle 0x473720
mov edx, dword [esp + 0x7c]
test edx, edx
je 0x473780
lea eax, [esi + 8]
mov edx, dword [esp + 0x7c]
mov dword [edi + 4], esi
mov dword [edi + 8], 0xe
mov dword [edi + 0x10], eax
mov ecx, dword [esi + 0xc]
lea eax, [edi + 0x10]
test edx, edx
mov dword [edi + 0x14], ecx
mov dword [ecx], eax
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x30]
mov dword [edi + 0x30], 0
mov dword [edi + 0x40], 0
mov dword [edi + 0x88], 0
mov dword [edi + 0x48], 0xe
mov dword [edi + 0x64], 0
mov dword [edi + 0x80], 0
mov dword [edi + 0x84], 0xffffffff
mov dword [edi + 0x44], edi
mov dword [edi + 0x8c], 0
mov dword [edi + 0x90], eax
mov dword [edi + 0x18], ebx
mov dword [edi + 0x3c], 0
mov dword [edi + 0x2c], 0x1220
jne 0x4738e2
xor eax, eax
mov dword [edi + 0x2c], 0x11220
mov dword [edi + 0x94], 0
mov word [edi + 0x98], ax
mov byte [edi + 0x9a], 0
xor eax, eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [esp + 0x30]
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0xffffffff
mov ebx, 0xffffffff
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
mov dword [esp], 0xffffffff
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
sub esp, 0x1c
test eax, eax
jne 0x473657
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], eax
call fcn.004588d0
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x3a]
mov dword [esp + 4], ebp
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
sub esp, 8
test eax, eax
je 0x473769
mov dword [esp], 0x576840
call fcn.0046fc60
cmp dword [0x53e040], 1
je 0x4739c0
mov eax, dword [0x576838]
test eax, eax
jne 0x4738ca
movzx eax, word [esp + 0x42]
test ax, ax
je 0x473960
mov edx, eax
mov ecx, eax
mov word [0x53e046], ax
and edx, 4
and ecx, 2
mov byte [0x53e044], 0
mov word [esp + 0x2e], dx
mov edx, eax
mov byte [0x57683f], 0
and edx, 1
mov byte [0x57683e], 0
mov byte [0x57683d], 0
mov word [esp + 0x2c], dx
mov edx, eax
mov byte [0x57683c], 0
and edx, 0x40
mov word [esp + 0x2a], dx
mov edx, eax
and edx, 0x20
mov word [esp + 0x28], dx
mov edx, eax
and edx, 0x10
mov word [esp + 0x26], dx
mov edx, eax
and edx, 8
mov word [esp + 0x20], dx
mov edx, eax
and ax, 0x4000
and dx, 0x80
cmp word [esp + 0x2e], 0
jne 0x4739b2
test cx, cx
je 0x47385d
or byte [0x53e044], 2
cmp word [esp + 0x2c], 0
je 0x47386c
or byte [0x53e044], 4
cmp word [esp + 0x2a], 0
je 0x47387b
mov byte [0x57683f], 1
cmp word [esp + 0x28], 0
je 0x47388a
or byte [0x57683f], 2
cmp word [esp + 0x26], 0
je 0x473899
or byte [0x57683f], 4
cmp word [esp + 0x20], 0
je 0x4738a8
mov byte [0x57683e], 1
test dx, dx
je 0x4738b4
mov byte [0x57683d], 1
test ax, ax
je 0x4738c0
mov byte [0x57683c], 1
mov dword [0x576838], 1
mov eax, ebp
call fcn.00470f60
mov dword [esp], 0x576840
call fcn.0046fc20
jmp 0x473663
mov dword [edi + 0x2c], 0x1009220
mov dword [edi + 0x94], 0
xor eax, eax
mov dword [edi + 0x98], 0
mov dword [edi + 0x9c], 0
mov dword [edi + 0xa0], 0
mov dword [edi + 0xac], 0
mov dword [edi + 0xb0], 0
mov dword [edi + 0xb4], 0
mov dword [edi + 0xb8], 0
mov dword [edi + 0xbc], 0
mov dword [edi + 0xc0], 0
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, 7
xor edx, edx
mov byte [0x57683f], 0
mov word [0x53e046], cx
xor ecx, ecx
mov word [esp + 0x2a], dx
mov word [esp + 0x28], cx
xor edx, edx
xor ecx, ecx
mov word [esp + 0x20], dx
mov word [esp + 0x26], cx
xor edx, edx
mov byte [0x57683e], 0
mov byte [0x57683d], 0
mov ecx, 2
mov byte [0x57683c], 0
mov word [esp + 0x2c], 1
mov byte [0x53e044], 1
jmp 0x473851
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [esp + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
sub esp, 8
test eax, eax
mov ecx, dword [esp + 0x20]
jne 0x473a00
mov dword [0x53e040], 2
jmp 0x4737b5
mov eax, dword [esp + 0x34]
mov dword [esp], ecx
or eax, 4
mov dword [esp + 0x34], eax
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
sub esp, 8
test eax, eax
je 0x4739ec
mov dword [0x53e040], 0
jmp 0x4737b5
mov eax, 0xfffff00d
jmp 0x473712