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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
xor ebx, ebx
mov dword [ebp - 0x20], 1
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
call fcn.00567af0
test ax, ax
je 0x567a93
push esi
lea eax, [ebp - 0x10]
push edi
push eax
lea eax, [ebp - 0x12c]
mov esi, 0x101
push eax
mov dword [ebp - 0x10], esi
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov edi, eax
cmp edi, ebx
jne 0x5678a7
lea eax, [ebp - 0xc]
push eax
push 1
push ebx
push str.SystemCurrentControlSetControl
push reloc.CoolType.dll_Ordinal_2
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x567a8d
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 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 0x567896
push 1
pop edi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
je 0x567a8d
mov eax, dword [ebp - 0x10]
mov byte [ebp + eax - 0x12c], bl
lea eax, [ebp - 0x14]
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.005988ea
mov edi, eax
pop ecx
cmp edi, ebx
mov dword [ebp - 0x28], edi
je 0x567a8d
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 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 - 0x14], ebx
mov dword [ebp - 0xc], ebx
jbe 0x567a86
lea esi, [edi + 4]
mov dword [ebp - 0x24], esi
cmp word [ebp - 0x20], 1
jne 0x567a86
mov eax, dword [esi]
mov dword [ebp - 0x18], ebx
cmp eax, ebx
je 0x567a71
test byte [esi + 0x31], 4
jne 0x567a71
push str.PDFWriter
push eax
call fcn.0044d7b0
pop ecx
test eax, eax
pop ecx
jne 0x567a71
mov eax, dword [esi + 0x44]
dec eax
dec eax
je 0x567a71
sub eax, 6
je 0x567a71
sub eax, 0x38
je 0x567a71
lea eax, [ebp - 0x18]
push ebx
push eax
push dword [esi]
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
je 0x567a71
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 - 0x18]
call sub.WINSPOOL.DRV_EnumJobsA
mov eax, dword [ebp - 4]
cmp eax, ebx
jbe 0x567a69
cmp eax, 0x1b80
jae 0x567a69
inc eax
push eax
call fcn.005988ea
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 - 0x18]
call sub.WINSPOOL.DRV_EnumJobsA
cmp dword [ebp - 8], 0x64
ja 0x567a5f
cmp dword [ebp - 8], ebx
mov dword [ebp - 0x1c], ebx
jbe 0x567a5f
lea esi, [edi + 0xc]
mov eax, dword [esi + 0x10]
dec eax
dec eax
je 0x567a49
dec eax
dec eax
je 0x567a49
sub eax, 0x1c
je 0x567a49
cmp dword [esi], ebx
je 0x567a49
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x567a49
push eax
call fcn.005edd7d
push dword [esi]
call fcn.005edd7d
lea eax, [ebp - 0x12c]
push eax
call fcn.005edd7d
lea eax, [ebp - 0x12c]
push eax
push dword [esi]
call fcn.0044d7b0
add esp, 0x14
test eax, eax
je 0x567a49
push str..PDF
push dword [esi + 4]
call fcn.0044d7b0
pop ecx
test eax, eax
pop ecx
je 0x567a49
lea eax, [esi + 0x24]
push eax
call fcn.00567a96
test ax, ax
pop ecx
je 0x567a59
inc dword [ebp - 0x1c]
add esi, 0x40
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 8]
jb 0x5679de
jmp 0x567a5c
mov dword [ebp - 0x20], ebx
mov esi, dword [ebp - 0x24]
push edi
call fcn.005989b0
mov edi, dword [ebp - 0x28]
pop ecx
push dword [ebp - 0x18]
call sub.WINSPOOL.DRV_ClosePrinter
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
add esi, 0x54
cmp eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], esi
jb 0x567907
push edi
call fcn.005989b0
pop ecx
mov ax, word [ebp - 0x20]
pop edi
pop esi
pop ebx
leave
ret