Function at 0x42d7f0
Capabilities:
Create service
Persist via windows service
Set current directory
Set registry value

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x258
mov eax, dword [0x5d60c4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x104
lea eax, [ebp - 0x250]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x148]
push 0x104
push eax
call fcn.0053193e
lea eax, [ebp - 0x148]
push 0x5c
push eax
call fcn.0052cf50
add esp, 0x14
test eax, eax
je 0x42d85d
mov byte [eax + 1], 0
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x42d8ff
push 0x5c292c
push 0x104
push 0x5d93c0
call fcn.0053193e
lea eax, [ebp - 0x250]
push eax
push 0x104
push 0x5d93c0
call fcn.00531998
push 0x5c292c
push 0x104
push 0x5d93c0
call fcn.00531998
add esp, 0x24
cmp dword [0x5d913c], 0
je 0x42d8e8
push str.__inifile
push 0x104
push 0x5d93c0
call fcn.00531998
push dword [0x5d913c]
push 0x104
push 0x5d93c0
call fcn.00531998
add esp, 0x18
push str.__service
push 0x104
push 0x5d93c0
call fcn.00531998
add esp, 0xc
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x42d93b
push 0x10
push str.UltraVNC
mov edx, str.Failed_to_open_service_control_manager
call fcn.00425890
add esp, 8
lea eax, [edi + 1]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052b789
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push 0
push 0
push str.Tcpip
push 0
push 0
push 0x5d93c0
push 1
push 2
push 0x10
push 0xf01ff
push str.uvnc_service
push str.uvnc_service
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
jne 0x42d9e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x42d9ad
push 0x10
push str.UltraVNC
mov edx, str.Failed:_Permission_denied
call fcn.00425890
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052b789
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
cmp eax, 0x431
je 0x42d98e
push 0x10
push str.UltraVNC
mov edx, str.Failed_to_create_a_new_service
call fcn.00425890
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052b789
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov eax, dword [0x5c2834]
movups xmm0, xmmword [str.Provides_secure_remote_desktop_sharing]
mov dword [ebp - 0x20], eax
mov ax, word [0x5c2838]
mov word [ebp - 0x1c], ax
mov al, byte [0x5c283a]
push str.uvnc_service
movups xmmword [ebp - 0x40], xmm0
push str.SYSTEMCurrentControlSetServices_s
movups xmm0, xmmword [0x5c2824]
mov byte [ebp - 0x1a], al
lea eax, [ebp - 0x148]
push 0x100
push eax
movups xmmword [ebp - 0x30], xmm0
call fcn.0042fe70
add esp, 0x10
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x254]
push eax
push 0
push 0x2001f
push 0
push 0
push 0
lea eax, [ebp - 0x148]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea ecx, [ebp - 0x40]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42da68
sub ecx, edx
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x40]
push eax
push 1
push 0
push str.Description
push dword [ebp - 0x254]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x254]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.0052b789
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret