Function at 0x41d950
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x588141
mov eax, dword fs:[0]
push eax
sub esp, 0x410
mov eax, dword [0x5f01b4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
xor edi, edi
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x214], edi
cmp dword [ebx + 0x5b8], edi
jle 0x41dbe3
mov dword [ebp - 0x210], edi
test edi, edi
js 0x41dc72
cmp edi, dword [ebx + 0x5b8]
jge 0x41dc72
mov eax, dword [ebx + 0x5b4]
add eax, dword [ebp - 0x210]
mov ecx, dword [esi + 0x110]
cmp ecx, dword [eax + 0x110]
jne 0x41dbc6
cmp dword [esi + 0x118], 0
jne 0x41dc58
push str._Black
lea edi, [esi + 0x94]
lea edx, [ebp - 0x218]
push edi
push edx
call fcn.00404ea0
push str._BlackKill
lea eax, [ebp - 0x21c]
push edi
push eax
mov dword [ebp - 4], 0
call fcn.00404ea0
push 0x1c
mov byte [ebp - 4], 1
call fcn.0046ac74
xor ecx, ecx
add esp, 0x1c
cmp eax, ecx
je 0x41da3a
mov dword [eax], vtable.CBlackPrintFromCom.0
mov dword [eax + 0xc], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
jmp 0x41da3c
xor eax, eax
mov edx, dword [ebp - 0x218]
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push edx
push 1
push 1
push ecx
mov dword [esi + 0x118], eax
call edi
mov dword [esi + 0x144], eax
mov eax, dword [ebp - 0x21c]
push eax
push 0
push 1
push 0
call edi
mov ecx, dword [esi + 0x144]
mov edi, dword [esi + 0x118]
mov edx, dword [esi + 0x110]
mov dword [esi + 0x148], eax
mov ebx, dword [ebx + 0x544]
mov dword [edi + 0x14], ecx
mov ecx, dword [edi + 0xc]
mov dword [edi + 0x10], ebx
xor ebx, ebx
mov dword [edi + 4], edx
mov dword [edi + 0x18], eax
test ecx, ecx
jne 0x41dac4
push ebx
push 4
push ebx
push ebx
push edi
push 0x4012e0
call fcn.0046b7d1
cmp eax, ebx
je 0x41dac4
mov dword [eax + 0x28], ebx
mov dword [edi + 0xc], eax
mov edx, dword [eax + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x41db0a
mov ecx, dword [esi + 0x118]
cmp ecx, ebx
je 0x41dad6
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov eax, dword [esi + 0x144]
mov dword [esi + 0x118], ebx
cmp eax, ebx
je 0x41daed
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x148]
mov dword [esi + 0x144], ebx
cmp eax, ebx
je 0x41db04
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x148], ebx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41db30
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x218]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41db59
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0x214]
mov ebx, dword [ebp - 0x220]
push esi
lea ecx, [ebp - 0x41c]
push ecx
call fcn.00402fc0
mov dword [ebp - 4], 2
cmp edi, dword [ebx + 0x5b8]
jge 0x41dc72
mov edi, dword [ebx + 0x5b4]
add edi, dword [ebp - 0x210]
lea edx, [ebp - 0x20c]
push edx
lea eax, [ebp - 0x41c]
call fcn.004028c0
lea ecx, [ebp - 0x20c]
call fcn.004026e0
lea ecx, [ebp - 0x41c]
mov dword [ebp - 4], 0xffffffff
call fcn.004026e0
mov edi, dword [ebp - 0x214]
add dword [ebp - 0x210], 0x1fc
inc edi
mov dword [ebp - 0x214], edi
cmp edi, dword [ebx + 0x5b8]
jl 0x41d99f
push str.__________________OnGotPrintingModeOfDevice____________________n
push 0x40000
push 0x5f2054
call fcn.00433010
push str.__ON_MESSAGE_WM_BLACK_PRINT_MODE_RESPONSE__OnGotPrintingModeOfDevice___n
push 0x40000
push 0x5f2054
call fcn.00433010
mov eax, dword [esi + 0x94]
push eax
push str.__prt.m_strPrinterName___s_n
push 0x40000
push 0x5f2054
call fcn.00433010
push str.________________________________________________________________n
push 0x40000
push 0x5f2054
call fcn.00433010
add esp, 0x34
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055db96
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x144]
test eax, eax
je 0x41db65
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x41db65
call fcn.0046c980
int3