Function at 0x401500
Capabilities:
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x210
mov eax, dword [0x41c690]
xor eax, esp
mov dword [esp + 0x20c], eax
mov eax, dword [str.SYSTEMCurrentControlSetServicesEventLogApplication_]
lea edx, [esp + 0xc]
push esi
mov esi, dword [esp + 0x218]
mov dword [esp + 4], 0
sub edx, eax
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x401530
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
push 0x100
lea eax, [esp + 0x14]
push eax
mov eax, dword [edx + 4]
push eax
call fcn.004010d0
add esp, 0xc
lea ecx, [esp + 4]
push ecx
lea edx, [esp + 0x14]
push edx
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x4015d0
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401580
mov ecx, dword [esp + 4]
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 2
push 0
push str.EventMessageFile
push ecx
call esi
mov eax, dword [esp + 4]
push 4
lea edx, [esp + 0x220]
push edx
push 4
push 0
push str.TypesSupported
push eax
call esi
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [str.SYSTEMCurrentControlSetServicesEventLogApplication_]
lea edx, [esp + 4]
push edx
push 0xf003f
push 0
push eax
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40172f
mov edx, dword [esp + 4]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [esp + 8]
push ecx
push eax
push eax
push eax
push str.Sources
push edx
call esi
test eax, eax
jne 0x401724
mov eax, dword [0x41c04c]
mov ecx, dword [eax + 8]
mov eax, dword [ecx + 4]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401625
push ebp
sub eax, edx
mov edx, dword [esp + 0xc]
sar eax, 1
push edi
lea ebp, [edx + eax*2 + 2]
push ebp
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edx, dword [esp + 0xc]
mov edi, eax
lea eax, [esp + 0x10]
push eax
push edi
lea ecx, [esp + 0x1c]
push ecx
push 0
push str.Sources
push edx
call esi
test eax, eax
jne 0x40171b
push ebx
mov esi, edi
cmp word [edi], ax
je 0x4016dc
mov eax, dword [0x41c04c]
mov ecx, dword [eax + 8]
mov ebx, dword [ecx + 4]
lea ecx, [ecx]
mov ecx, ebx
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4016aa
test dx, dx
je 0x4016a6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4016aa
add eax, 4
add ecx, 4
test dx, dx
jne 0x401684
xor eax, eax
jmp 0x4016af
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4016dc
mov eax, esi
lea edx, [eax + 2]
jmp 0x4016c0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4016c0
sub eax, edx
sar eax, 1
cmp word [esi + eax*2 + 2], cx
lea esi, [esi + eax*2 + 2]
jne 0x401680
jmp 0x4016e2
cmp word [esi], 0
jne 0x40171a
mov edx, dword [0x41c04c]
mov eax, dword [edx + 8]
mov ecx, dword [eax + 4]
mov edx, esi
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x4016f0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
push ebp
push edi
push ecx
push 0
push str.Sources
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop ebx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop ebp
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x210]
pop esi
xor ecx, esp
call fcn.00408f97
add esp, 0x210
ret