Function at 0x410140
Capabilities:
Resume thread

Disassembly:
push 0xffffffffffffffff
push 0x5f8fb3
mov eax, dword fs:[0]
push eax
sub esp, 0x80
push ebx
push ebp
push esi
push edi
mov eax, dword [0x72d630]
xor eax, esp
push eax
lea eax, [esp + 0x94]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xb4]
mov esi, dword [esp + 0xa4]
mov eax, dword [esp + 0xa8]
push eax
push esi
call fcn.00410a70
xor ebx, ebx
mov dword [esp + 0x9c], ebx
push ebx
push ebx
lea edi, [esi + 0x14d8]
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 + 0x14dc], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x14e0], eax
mov dword [esi + 0x14e4], ebx
mov dword [esi + 0x14e8], ebp
mov dword [esi + 0x14ec], ebx
mov dword [esi + 0x14f0], ebx
mov dword [esi + 0x14f4], ebx
mov dword [esi + 0x14f8], ebx
mov dword [esi + 0x14fc], ebx
mov dword [esi + 0x1910], ebx
cmp ebp, ebx
je 0x41020e
mov ecx, dword [ebp]
mov edx, dword [ecx + 4]
push ebp
call edx
mov eax, dword [esi + 0x14e8]
push edi
call fcn.0044c590
mov edi, dword [esp + 0xac]
cmp edi, ebx
jne 0x410230
mov dword [esi + 0x28], 1
mov dword [esp + 0x9c], 0xffffffff
jmp 0x4103b5
lea ecx, [esp + 0x18]
call fcn.00472830
mov byte [esp + 0x9c], 1
push edi
lea eax, [esp + 0x1c]
push 0x6bfcf0
push eax
call fcn.00473260
add esp, 0xc
push ebx
push 0x40000000
push 3
push ebx
push 3
push 0xc0000000
lea eax, [esp + 0x30]
call fcn.004221b0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
or ebp, 0xffffffff
mov dword [esi + 0x14dc], eax
cmp eax, ebp
jne 0x41031e
mov ecx, dword [0x741af8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x68]
push edx
call fcn.00475440
mov byte [esp + 0x9c], 2
mov eax, dword [0x741af8]
push eax
push 0xe100001a
lea ecx, [esp + 0x38]
push ecx
call fcn.00475440
mov byte [esp + 0x9c], 3
push edi
lea ecx, [esp + 0x34]
call fcn.004758c0
lea ecx, [esp + 0x60]
call fcn.004759f0
push eax
lea ecx, [esp + 0x34]
call fcn.004758c0
push ebx
push ebx
lea ecx, [esp + 0x38]
call fcn.004759f0
push eax
call sub.mfc90u.dll_AfxMessageBox_1
mov dword [esi + 0x28], 1
mov byte [esp + 0x9c], 2
lea ecx, [esp + 0x30]
call fcn.00475600
mov byte [esp + 0x9c], 1
lea ecx, [esp + 0x60]
call fcn.00475600
jmp 0x41039e
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x410375
mov edx, dword [esi + 0x14dc]
mov eax, dword [esp + 0xb0]
push edx
call fcn.00509c70
test al, al
jne 0x410347
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14dc]
lea eax, [esp + 0x1c]
push eax
push ecx
mov dword [esp + 0x24], 4
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], 0x1388
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
push ebx
push 4
push ebx
push ebx
push esi
push 0x410a30
call sub.mfc90u.dll_AfxBeginThread_1
mov dword [esi + 0x14e4], eax
mov dword [eax + 0x28], ebx
mov eax, dword [esi + 0x14e4]
mov edx, dword [eax + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov byte [esp + 0x9c], bl
lea ecx, [esp + 0x18]
call fcn.004740c0
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