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

Disassembly:
push 0xffffffffffffffff
push 0x101594d0
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push ebp
push esi
push edi
mov eax, dword [0x101b0cd0]
xor eax, esp
push eax
lea eax, [esp + 0x74]
mov dword fs:[0], eax
xor ebp, ebp
mov dword [esp + 0x7c], ebp
push 1
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], 0xf000c
mov dword [esp + 0x18], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x40], vtable.XStringA.0
mov dword [esp + 0x50], 1
call fcn.10054f2b
xor edi, edi
xor esi, esi
add esp, 4
mov dword [esp + 0x40], eax
mov byte [eax], 0
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], ebp
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], ebp
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x18]
push ecx
push ebp
push ebp
push 2
push ebp
push 2
mov byte [esp + 0x98], 1
xor ebx, ebx
mov dword [esp + 0x34], 1
call sub.WINSPOOL.DRV_EnumPrintersA
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.10046982
add esp, 4
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x18]
push edx
push ecx
push eax
push 2
push ebp
push 2
mov dword [esp + 0x48], eax
call sub.WINSPOOL.DRV_EnumPrintersA
mov dword [esp + 0x28], ebp
cmp dword [esp + 0x24], ebp
jbe 0x1002a88f
mov edx, dword [esp + 0x2c]
add edx, 4
mov dword [esp + 0x1c], edx
mov eax, dword [esp + 0x1c]
mov ebp, dword [eax + 8]
test ebp, ebp
je 0x1002a5a2
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002a566
sub eax, edx
push eax
lea esi, [esp + 0x40]
call fcn.100184f0
mov eax, ebp
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002a580
mov ecx, dword [esp + 0x4c]
sub eax, edx
mov edi, ecx
imul edi, eax
test edi, edi
jle 0x1002a5b1
push ebp
lea eax, [esp + 0x40]
call fcn.10018600
jmp 0x1002a5ad
push 0
lea esi, [esp + 0x40]
call fcn.100184f0
mov ecx, dword [esp + 0x4c]
mov edi, dword [esp + 0x44]
test edi, edi
jle 0x1002a68b
xor eax, eax
nop
mov edx, dword [esp + 0x40]
cmp byte [edx + eax], 0x3a
je 0x1002a5d5
add eax, ecx
cmp eax, edi
jl 0x1002a5c0
jmp 0x1002a68b
cdq
idiv ecx
test eax, eax
jle 0x1002a68b
lea ecx, [esp + 0x58]
mov esi, eax
push ecx
lea eax, [esp + 0x40]
call fcn.10018cb0
mov ebp, eax
lea edx, [esp + 0x3c]
cmp edx, ebp
je 0x1002a62e
mov eax, dword [ebp + 8]
cdq
idiv dword [ebp + 0x10]
lea esi, [esp + 0x3c]
test eax, eax
jle 0x1002a623
push eax
call fcn.100184f0
mov edi, dword [ebp + 8]
test edi, edi
jle 0x1002a62a
mov eax, dword [ebp + 4]
push eax
mov eax, esi
call fcn.10018600
jmp 0x1002a62a
push 0
call fcn.100184f0
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x58], vtable.XStringA.0
test eax, eax
je 0x1002a666
mov ecx, dword [esp + 0x60]
inc ecx
imul ecx, dword [esp + 0x68]
push ecx
push 0
push eax
call fcn.10057070
mov edx, dword [esp + 0x68]
push edx
call fcn.10054ff5
add esp, 0x10
mov dword [esp + 0x5c], 0
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x1002a68b
mov ecx, dword [esp + 0x70]
lea edx, [ecx + ecx]
push edx
push 0
push eax
call fcn.10057070
mov eax, dword [esp + 0x78]
push eax
call fcn.1004698d
add esp, 0x10
mov ecx, dword [esp + 0x8c]
mov eax, dword [esp + 0x40]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1002a6b6
test dl, dl
je 0x1002a6b2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1002a6b6
add eax, 2
add ecx, 2
test dl, dl
jne 0x1002a696
xor eax, eax
jmp 0x1002a6bb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x1002a871
push 0x20
call fcn.10046953
mov esi, eax
add esp, 4
test esi, esi
je 0x1002a6e2
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 8]
push edx
call fcn.10018050
jmp 0x1002a6e4
xor esi, esi
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebp]
mov ecx, dword [esp + 0x84]
push eax
add ecx, 4
call fcn.1004af72
mov dword [eax], esi
mov edx, dword [ebp]
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x24]
push ecx
push edx
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
je 0x1002a85d
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x14]
push eax
xor ebp, ebp
push ebp
push ebx
push 2
push ecx
call sub.WINSPOOL.DRV_GetPrinterA
test eax, eax
jne 0x1002a777
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1002a777
mov eax, dword [esp + 0xa4]
push str.MoveWindowsDriverPort_:_failed_to_GetPrinter_:_ERROR_INSUFFICIENT_BUFFER
call fcn.10018690
add esp, 4
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0xa4]
push str.moveDriverPort_:_failed_to_LocalAlloc
call fcn.10018690
add esp, 4
mov eax, dword [esp + 0x20]
push eax
call sub.WINSPOOL.DRV_ClosePrinter
jmp 0x1002a871
cmp dword [esp + 0x18], 1
jne 0x1002a754
mov edx, dword [esp + 0x14]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
xor eax, eax
cmp ebx, ebp
setne al
mov dword [esp + 0x18], eax
cmp eax, 1
jne 0x1002a754
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x14]
push eax
push ecx
push ebx
push 2
push edx
call sub.WINSPOOL.DRV_GetPrinterA
test eax, eax
je 0x1002a82a
mov eax, dword [ebx + 0x34]
mov dword [esi + 0x1c], eax
test dword [ebx + 0x34], 0x800
je 0x1002a7ce
mov dword [ebx + 0x34], 0x1000
call fcn.1002ad80
test al, al
jne 0x1002a7ea
mov esi, dword [esp + 0xa4]
call fcn.1002ae50
movzx ecx, al
mov dword [esp + 0x18], ecx
cmp dword [esp + 0x18], ebp
je 0x1002a80d
push ebp
push ebx
mov dword [ebx + 0xc], 0x101a0174
mov edx, dword [esp + 0x28]
push 2
push edx
call sub.WINSPOOL.DRV_SetPrinterA
mov dword [esp + 0x18], eax
cmp eax, ebp
jne 0x1002a842
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0xa8]
push str.moveDriverPort_:_failed_to_SetPrinter_and_PortName_is_FILE:___d_
call fcn.10018690
add esp, 8
jmp 0x1002a842
mov eax, dword [esp + 0xa4]
push str.moveDriverPort_:_failed_to_GetPrinter
call fcn.10018690
add esp, 4
mov dword [esp + 0x18], ebp
cmp ebx, ebp
je 0x1002a768
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x20]
push eax
call sub.WINSPOOL.DRV_ClosePrinter
jmp 0x1002a871
mov eax, dword [esp + 0xa4]
push str.moveDriverPort_:_failed_to_OpenPrinter
call fcn.10018690
add esp, 4
mov eax, dword [esp + 0x28]
add dword [esp + 0x1c], 0x54
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x24]
jb 0x1002a556
mov esi, dword [esp + 0x50]
xor ebp, ebp
mov eax, dword [esp + 0x2c]
cmp eax, ebp
je 0x1002a8a0
push eax
call fcn.1004698d
add esp, 4
cmp dword [esp + 0x18], 1
mov eax, dword [esp + 0x40]
sete bl
cmp eax, ebp
je 0x1002a8cb
inc edi
imul edi, dword [esp + 0x4c]
push edi
push ebp
push eax
call fcn.10057070
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.10054ff5
add esp, 0x10
cmp esi, ebp
je 0x1002a8e7
mov edx, dword [esp + 0x54]
lea eax, [edx + edx]
push eax
push ebp
push esi
call fcn.10057070
push esi
call fcn.1004698d
add esp, 0x10
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x88], vtable.XStringA.0
cmp eax, ebp
je 0x1002a92c
mov ecx, dword [esp + 0x90]
inc ecx
imul ecx, dword [esp + 0x98]
push ecx
push ebp
push eax
call fcn.10057070
mov edx, dword [esp + 0x98]
push edx
call fcn.10054ff5
add esp, 0x10
mov dword [esp + 0x8c], ebp
mov eax, dword [esp + 0x9c]
cmp eax, ebp
je 0x1002a959
mov ecx, dword [esp + 0xa0]
lea edx, [ecx + ecx]
push edx
push ebp
push eax
call fcn.10057070
mov eax, dword [esp + 0xa8]
push eax
call fcn.1004698d
add esp, 0x10
mov al, bl
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 0x24