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

Disassembly:
push 0xffffffffffffffff
push 0x10159498
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push ebx
push ebp
push esi
push edi
mov eax, dword [0x101b0cd0]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x80], ebx
mov edi, 1
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], 0xf000c
xor ebp, ebp
mov dword [esp + 0x18], edi
call fcn.10049d82
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x1002a9e7
push 0x80004005
call fcn.1001a320
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
push edi
mov dword [esp + 0x44], vtable.XStringA.0
mov dword [esp + 0x54], edi
call fcn.10054f2b
add esp, 4
mov dword [esp + 0x44], eax
mov byte [eax], bl
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov byte [esp + 0x80], 2
cmp dword [esi + 0x10], ebx
je 0x1002ad15
add esi, 4
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x30], esi
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x34]
push eax
call fcn.1004aef4
mov ebx, dword [esp + 0x28]
lea esi, [esp + 0x5c]
call fcn.100200f0
mov ebx, eax
lea ecx, [esp + 0x40]
cmp ecx, ebx
je 0x1002aa9f
mov eax, dword [ebx + 8]
cdq
idiv dword [ebx + 0x10]
mov esi, ecx
test eax, eax
jle 0x1002aa98
push eax
call fcn.100184f0
mov edi, dword [ebx + 8]
mov ebx, dword [ebx + 4]
test edi, edi
jle 0x1002aa9f
push ebx
mov eax, esi
call fcn.10018600
jmp 0x1002aa9f
push 0
call fcn.100184f0
mov eax, dword [esp + 0x60]
xor edi, edi
mov dword [esp + 0x5c], vtable.XStringA.0
cmp eax, edi
je 0x1002aad4
mov edx, dword [esp + 0x64]
inc edx
imul edx, dword [esp + 0x6c]
push edx
push edi
push eax
call fcn.10057070
mov eax, dword [esp + 0x6c]
push eax
call fcn.10054ff5
add esp, 0x10
mov dword [esp + 0x60], edi
mov eax, dword [esp + 0x70]
cmp eax, edi
je 0x1002aaf8
mov ecx, dword [esp + 0x74]
lea edx, [ecx + ecx]
push edx
push edi
push eax
call fcn.10057070
mov eax, dword [esp + 0x7c]
push eax
call fcn.1004698d
add esp, 0x10
mov edx, dword [esp + 0x48]
cmp edx, edi
jle 0x1002abd2
mov ecx, dword [esp + 0x50]
xor eax, eax
lea ebx, [ebx]
mov esi, dword [esp + 0x44]
cmp byte [esi + eax], 0x3a
je 0x1002ab25
add eax, ecx
cmp eax, edx
jl 0x1002ab10
jmp 0x1002abd2
cdq
idiv ecx
cmp eax, edi
jle 0x1002abd2
lea ecx, [esp + 0x5c]
mov esi, eax
push ecx
lea eax, [esp + 0x44]
call fcn.10018cb0
mov ebx, eax
lea edx, [esp + 0x40]
cmp edx, ebx
je 0x1002ab79
mov eax, dword [ebx + 8]
cdq
idiv dword [ebx + 0x10]
lea esi, [esp + 0x40]
cmp eax, edi
jle 0x1002ab73
push eax
call fcn.100184f0
mov edi, dword [ebx + 8]
mov ebx, dword [ebx + 4]
test edi, edi
jle 0x1002ab79
push ebx
mov eax, esi
call fcn.10018600
jmp 0x1002ab79
push edi
call fcn.100184f0
mov eax, dword [esp + 0x60]
xor edi, edi
mov dword [esp + 0x5c], vtable.XStringA.0
cmp eax, edi
je 0x1002abae
mov ecx, dword [esp + 0x64]
inc ecx
imul ecx, dword [esp + 0x6c]
push ecx
push edi
push eax
call fcn.10057070
mov edx, dword [esp + 0x6c]
push edx
call fcn.10054ff5
add esp, 0x10
mov dword [esp + 0x60], edi
mov eax, dword [esp + 0x70]
cmp eax, edi
je 0x1002abd2
mov ecx, dword [esp + 0x74]
lea edx, [ecx + ecx]
push edx
push edi
push eax
call fcn.10057070
mov eax, dword [esp + 0x7c]
push eax
call fcn.1004698d
add esp, 0x10
mov ecx, dword [esp + 0x8c]
mov eax, dword [esp + 0x44]
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1002ac00
test dl, dl
je 0x1002abfc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1002ac00
add eax, 2
add ecx, 2
test dl, dl
jne 0x1002abe0
xor eax, eax
jmp 0x1002ac05
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
jne 0x1002acfb
mov edx, dword [esp + 0x1c]
mov esi, dword [edx - 0xc]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x1002ac33
push esi
lea ecx, [esp + 0x20]
call fcn.1001a0c0
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x34]
push ecx
lea eax, [esp + 0x24]
push eax
push edx
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
je 0x1002acfb
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x24]
push ecx
push edi
push ebp
push 2
push edx
call sub.WINSPOOL.DRV_GetPrinterA
test eax, eax
jne 0x1002ac73
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1002ac73
mov dword [esp + 0x18], edi
jmp 0x1002acf1
cmp dword [esp + 0x18], 1
jne 0x1002acf1
mov eax, dword [esp + 0x24]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
xor eax, eax
cmp ebp, edi
setne al
mov dword [esp + 0x18], eax
cmp eax, 1
jne 0x1002acf1
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x24]
push ecx
push edx
push ebp
push 2
push eax
call sub.WINSPOOL.DRV_GetPrinterA
test eax, eax
je 0x1002ace0
mov ebx, dword [esp + 0x28]
lea esi, [esp + 0x5c]
call fcn.100200f0
mov ecx, dword [esp + 0x60]
push 0
push ebp
mov dword [ebp + 0xc], ecx
mov edx, dword [esp + 0x28]
push 2
push edx
call sub.WINSPOOL.DRV_SetPrinterA
mov ecx, esi
call fcn.10018140
jmp 0x1002ace4
mov dword [esp + 0x18], edi
xor edi, edi
cmp ebp, edi
je 0x1002acf1
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x20]
push eax
call sub.WINSPOOL.DRV_ClosePrinter
cmp dword [esp + 0x2c], edi
jne 0x1002aa42
mov ecx, dword [esp + 0x30]
call fcn.1004ae64
xor ebx, ebx
mov edi, 1
cmp dword [esp + 0x18], edi
lea ecx, [esp + 0x40]
sete byte [esp + 0x17]
call fcn.10018140
mov byte [esp + 0x80], bl
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x1002ad4e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x88]
call fcn.10018140
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 0x1c