Function at 0x41020270
Capabilities:
Get common file path
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41148cab
mov eax, dword fs:[0]
push eax
sub esp, 0x428
mov eax, dword [0x411bade8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push 0x411584dc
lea ecx, [ebp - 0x42c]
mov dword [ebp - 0x428], ebx
mov dword [ebp - 0x424], ebx
call fcn.41002090
push 0x104
lea eax, [ebp - 0x420]
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.configThinPrint.evt
lea ecx, [ebp - 0x420]
push ecx
lea edx, [ebp - 0x42c]
push str._s_s
push edx
call fcn.41001b10
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, dword [ebp - 0x42c]
add esp, 0x10
push ebx
lea eax, [ebp - 0x428]
push eax
push ebx
push 0xf003f
push ebx
push 0x411584dc
push ebx
push str.SYSTEMCurrentControlSetServicesEventLogThinPrint_DiagnosticsThinPrint_AutoConnect
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x430], ebx
call esi
cmp eax, ebx
jne 0x41020454
push ebx
lea ecx, [ebp - 0x424]
push ecx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push str.SYSTEMCurrentControlSetServicesEventLogThinPrint_Diagnostics
push reloc.OLEAUT32.dll_SysReAllocString
call esi
cmp eax, ebx
jne 0x41020442
mov eax, dword [0x411bc380]
push 0x104
lea edx, [ebp - 0x218]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x41020372
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub eax, edx
sar eax, 1
lea ecx, [eax + eax + 2]
mov eax, dword [ebp - 0x428]
push ecx
lea edx, [ebp - 0x218]
push edx
push 2
push ebx
push str.EventMessageFile
push eax
call esi
mov ecx, dword [ebp - 0x424]
push 0x2c
push str.ThinPrint_AutoConnect
push 7
push ebx
push str.Sources
push ecx
call esi
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x410203c1
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
mov eax, dword [ebp - 0x424]
push edx
push edi
push 1
push ebx
push str.File
push eax
call esi
mov ecx, dword [ebp - 0x424]
push 0x144
push str.O:BAG:SYD:_D__0xf0007___AN__D__0xf0007___BG__A__0xf0007___SY__A__0xf0007___BA__A__0x2___SO__A__0x2___IU__A__0x2___SU__A__0x2___S_1_5_3__A__0x2___LS__A__0x2___NS_
push 1
push ebx
push str.CustomSD
push ecx
call esi
mov eax, dword [ebp - 0x424]
push 4
lea edx, [ebp - 0x430]
push edx
push 4
push ebx
push str.Retention
push eax
call esi
mov edx, dword [ebp - 0x428]
push 4
lea ecx, [ebp - 0x434]
push ecx
push 4
push ebx
push str.TypesSupported
push edx
mov dword [ebp - 0x434], 7
call esi
jmp 0x41020471
push ebx
push str.CreateEventlogRegKey___failed._Could_not_get_the_handler_of_the_event_log_key___d_
push 0x2000001
push 0x1046
jmp 0x41020464
push eax
push str.CreateEventlogRegKey___failed._Could_not_create_the_registry_key_for_the_event_source.___d_
push 0x2000001
push 0x104a
push str.TPAutoConnDll.cpp
call fcn.41002c10
add esp, 0x14
mov eax, dword [ebp - 0x428]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, ebx
je 0x41020484
push eax
call esi
mov eax, dword [ebp - 0x424]
cmp eax, ebx
je 0x41020491
push eax
call esi
mov eax, dword [ebp - 0x42c]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410204ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.4112e1a6
mov esp, ebp
pop ebp
ret