Function at 0x4807d0
Capabilities:
Resume thread

Disassembly:
push 0xffffffffffffffff
push 0x55ced3
mov eax, dword fs:[0]
push eax
sub esp, 0x80
push ebx
push ebp
push esi
push edi
mov eax, dword [0x668038]
xor eax, esp
push eax
lea eax, [esp + 0x94]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xb0]
mov esi, dword [esp + 0xa4]
mov eax, dword [esp + 0xb4]
push eax
push esi
call fcn.00481140
xor ebx, ebx
mov dword [esp + 0x9c], ebx
push ebx
push ebx
lea edi, [esi + 0x753b8]
mov dword [edi], vtable.ITermStreamSink.0
push 1
push ebx
mov dword [esi], vtable.PrinterPortStream.0
mov dword [edi], vtable.PrinterPortStream.1.0
mov dword [esi + 0x753bc], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x753c0], eax
mov dword [esi + 0x753c4], ebx
mov dword [esi + 0x753c8], ebp
mov dword [esi + 0x753cc], ebx
mov dword [esi + 0x753d0], ebx
mov dword [esi + 0x753d4], ebx
mov dword [esi + 0x753d8], ebx
mov dword [esi + 0x753dc], ebx
mov dword [esi + 0x9c4f0], ebx
cmp ebp, ebx
je 0x48089e
mov ecx, dword [ebp]
mov edx, dword [ecx + 4]
push ebp
call edx
mov eax, dword [esi + 0x753c8]
push edi
call fcn.00466690
mov edi, dword [esp + 0xa8]
cmp edi, ebx
jne 0x4808c0
mov dword [esi + 0x1c], 1
mov dword [esp + 0x9c], 0xffffffff
jmp 0x480a45
lea ecx, [esp + 0x14]
call fcn.004992d0
mov byte [esp + 0x9c], 1
push edi
lea eax, [esp + 0x18]
push 0x60ff5c
push eax
call fcn.00499d40
add esp, 0xc
push ebx
push 0x40000000
push 3
push ebx
push 3
push 0xc0000000
lea eax, [esp + 0x2c]
call fcn.00408130
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
or ebp, 0xffffffff
mov dword [esi + 0x753bc], eax
cmp eax, ebp
jne 0x4809ae
mov ecx, dword [0x67f9a0]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x68]
push edx
call fcn.0049c100
mov byte [esp + 0x9c], 2
mov eax, dword [0x67f9a0]
push eax
push 0xe100001a
lea ecx, [esp + 0x34]
push ecx
call fcn.0049c100
mov byte [esp + 0x9c], 3
push edi
lea ecx, [esp + 0x30]
call fcn.0049c590
lea ecx, [esp + 0x60]
call fcn.0049c6b0
push eax
lea ecx, [esp + 0x30]
call fcn.0049c590
push ebx
push ebx
lea ecx, [esp + 0x34]
call fcn.0049c6b0
push eax
call sub.mfc90u.dll_AfxMessageBox
mov dword [esi + 0x1c], 1
mov byte [esp + 0x9c], 2
lea ecx, [esp + 0x2c]
call fcn.0049c2c0
mov byte [esp + 0x9c], 1
lea ecx, [esp + 0x60]
call fcn.0049c2c0
jmp 0x480a2e
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x480a05
mov edx, dword [esi + 0x753bc]
mov eax, dword [esp + 0xac]
push edx
call fcn.00541ad0
test al, al
jne 0x4809d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x753bc]
lea eax, [esp + 0x18]
push eax
push ecx
mov dword [esp + 0x20], 4
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], 0x1388
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
push ebx
push 4
push ebx
push ebx
push esi
push 0x481130
call sub.mfc90u.dll_AfxBeginThread_1
mov dword [esi + 0x753c4], eax
mov dword [eax + 0x28], ebx
mov eax, dword [esi + 0x753c4]
mov edx, dword [eax + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov byte [esp + 0x9c], bl
lea ecx, [esp + 0x14]
call fcn.00499450
mov dword [esp + 0x9c], ebp
mov eax, esi
mov ecx, dword [esp + 0x94]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret 0x14