Function at 0x4e7540
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.004cb8c0
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__iob]
cmp eax, 0xffffffff
mov dword [esp + 0x30], eax
je 0x4e794e
cmp ebx, 2
jle 0x4e7640
mov edx, dword [esp + 0x7c]
test edx, edx
je 0x4e76a0
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 0x4e7802
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 0x4e7577
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp], eax
call fcn.004cc7f0
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 0x4e7689
mov dword [esp], 0x7e2100
call fcn.004e3b80
cmp dword [0x73f5b8], 1
je 0x4e78e0
mov eax, dword [0x7e20f8]
test eax, eax
jne 0x4e77ea
movzx eax, word [esp + 0x42]
test ax, ax
je 0x4e7880
mov edx, eax
mov ecx, eax
mov word [0x73f5be], ax
and edx, 4
and ecx, 2
mov byte [0x73f5bc], 0
mov word [esp + 0x2e], dx
mov edx, eax
mov byte [0x7e20ff], 0
and edx, 1
mov byte [0x7e20fe], 0
mov byte [0x7e20fd], 0
mov word [esp + 0x2c], dx
mov edx, eax
mov byte [0x7e20fc], 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 0x4e78d2
test cx, cx
je 0x4e777d
or byte [0x73f5bc], 2
cmp word [esp + 0x2c], 0
je 0x4e778c
or byte [0x73f5bc], 4
cmp word [esp + 0x2a], 0
je 0x4e779b
mov byte [0x7e20ff], 1
cmp word [esp + 0x28], 0
je 0x4e77aa
or byte [0x7e20ff], 2
cmp word [esp + 0x26], 0
je 0x4e77b9
or byte [0x7e20ff], 4
cmp word [esp + 0x20], 0
je 0x4e77c8
mov byte [0x7e20fe], 1
test dx, dx
je 0x4e77d4
mov byte [0x7e20fd], 1
test ax, ax
je 0x4e77e0
mov byte [0x7e20fc], 1
mov dword [0x7e20f8], 1
mov eax, ebp
call fcn.004e4e80
mov dword [esp], 0x7e2100
call fcn.004e3b40
jmp 0x4e7583
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 [0x7e20ff], 0
mov word [0x73f5be], 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 [0x7e20fe], 0
mov byte [0x7e20fd], 0
mov ecx, 2
mov byte [0x7e20fc], 0
mov word [esp + 0x2c], 1
mov byte [0x73f5bc], 1
jmp 0x4e7771
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 0x4e7920
mov dword [0x73f5b8], 2
jmp 0x4e76d5
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 0x4e790c
mov dword [0x73f5b8], 0
jmp 0x4e76d5
mov eax, 0xfffff00d
jmp 0x4e7632