Function at 0x4e215a
Capabilities:
Get session user name
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
lea eax, [ebp - 0x18]
push edi
push eax
lea eax, [ebp - 0x12c]
xor ebx, ebx
mov esi, 0x101
push eax
mov dword [ebp - 0x20], 1
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], esi
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov edi, eax
cmp edi, ebx
jne 0x4e21eb
lea eax, [ebp - 0xc]
push eax
push 1
push ebx
push str.SystemCurrentControlSetControl
push reloc.AGM.dll_Ordinal_2
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4e21e3
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], esi
push eax
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x28]
push eax
push ebx
push str.Current_User
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4e21da
push 1
pop edi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
je 0x4e23d3
mov eax, dword [ebp - 0x18]
mov byte [ebp + eax - 0x12c], bl
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push 2
pop esi
push esi
push ebx
push esi
call sub.WINSPOOL.DRV_EnumPrintersA
mov eax, dword [ebp - 4]
inc eax
push eax
call fcn.004868bd
mov edi, eax
pop ecx
cmp edi, ebx
mov dword [ebp - 0x28], edi
je 0x4e23d3
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push esi
push ebx
push esi
call sub.WINSPOOL.DRV_EnumPrintersA
cmp dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
jbe 0x4e23cc
lea esi, [edi + 4]
mov dword [ebp - 0x24], esi
cmp word [ebp - 0x20], 1
jne 0x4e23cc
mov eax, dword [esi]
mov dword [ebp - 0x14], ebx
cmp eax, ebx
je 0x4e23b7
test byte [esi + 0x31], 4
jne 0x4e23b7
push str.PDFWriter
push eax
call fcn.0052b9b0
pop ecx
test eax, eax
pop ecx
jne 0x4e23b7
mov eax, dword [esi + 0x44]
dec eax
dec eax
je 0x4e23b7
sub eax, 6
je 0x4e23b7
sub eax, 0x38
je 0x4e23b7
lea eax, [ebp - 0x14]
push ebx
push eax
push dword [esi]
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
je 0x4e23b7
lea eax, [ebp - 8]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push 1
push 0x64
push ebx
push dword [ebp - 0x14]
call sub.WINSPOOL.DRV_EnumJobsA
mov eax, dword [ebp - 4]
cmp eax, ebx
jbe 0x4e23af
cmp eax, 0x1b80
jae 0x4e23af
inc eax
push eax
call fcn.004868bd
mov edi, eax
pop ecx
lea eax, [ebp - 8]
mov dword [ebp - 8], ebx
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push 1
push 0x64
push ebx
push dword [ebp - 0x14]
call sub.WINSPOOL.DRV_EnumJobsA
cmp dword [ebp - 8], 0x64
ja 0x4e23a5
cmp dword [ebp - 8], ebx
mov dword [ebp - 0x1c], ebx
jbe 0x4e23a5
lea esi, [edi + 0xc]
mov eax, dword [esi + 0x10]
dec eax
dec eax
je 0x4e238f
dec eax
dec eax
je 0x4e238f
sub eax, 0x1c
je 0x4e238f
cmp dword [esi], ebx
je 0x4e238f
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x4e238f
push eax
call fcn.0052dbe0
pop ecx
push dword [esi]
call fcn.0052dbe0
pop ecx
lea eax, [ebp - 0x12c]
push eax
call fcn.0052dbe0
pop ecx
lea eax, [ebp - 0x12c]
push eax
push dword [esi]
call fcn.0052b9b0
pop ecx
test eax, eax
pop ecx
je 0x4e238f
push str..PDF
push dword [esi + 4]
call fcn.0052b9b0
pop ecx
test eax, eax
pop ecx
je 0x4e238f
lea eax, [esi + 0x24]
push eax
call fcn.004e23dc
test ax, ax
pop ecx
je 0x4e239f
inc dword [ebp - 0x1c]
add esi, 0x40
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 8]
jb 0x4e2322
jmp 0x4e23a2
mov dword [ebp - 0x20], ebx
mov esi, dword [ebp - 0x24]
push edi
call fcn.00486983
mov edi, dword [ebp - 0x28]
pop ecx
push dword [ebp - 0x14]
call sub.WINSPOOL.DRV_ClosePrinter
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
add esi, 0x54
cmp eax, dword [ebp - 0x10]
mov dword [ebp - 0x24], esi
jb 0x4e224b
push edi
call fcn.00486983
pop ecx
mov ax, word [ebp - 0x20]
pop edi
pop esi
pop ebx
leave
ret