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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4e6022
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x480
movzx eax, word [0x51e010]
mov ecx, dword [ebp + 0x18]
push ebx
push esi
push edi
push ecx
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 2]
mov dword [esp + 0x18], eax
xor ebx, ebx
lea eax, [edi + edi + 4]
push ebx
call fcn.00445f60
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x45954a
mov word [esi + edi*2 + 2], bx
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 0x18]
mov ecx, dword [esp + 0x20]
push edi
push esi
push edx
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
cmp edi, ebx
jge 0x459569
xor edi, edi
lea eax, [edi + edi + 4]
push esi
mov word [esi + edi*2], bx
call fcn.00445f60
add esp, 4
cmp eax, ebx
mov dword [esp + 0x28], eax
je 0x459587
mov word [eax + edi*2 + 2], bx
movzx edx, word [0x51e010]
mov eax, dword [ebp + 0x14]
push eax
mov dword [esp + 0x498], ebx
mov dword [esp + 0x24], edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 2]
mov dword [esp + 0x18], eax
lea eax, [edi + edi + 4]
push ebx
call fcn.00445f60
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4595c2
mov word [esi + edi*2 + 2], bx
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0x14]
mov eax, dword [esp + 0x20]
push edi
push esi
push ecx
push edx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
cmp edi, ebx
jge 0x4595e1
xor edi, edi
lea eax, [edi + edi + 4]
push esi
mov word [esi + edi*2], bx
call fcn.00445f60
add esp, 4
cmp eax, ebx
mov dword [esp + 0x2c], eax
je 0x4595ff
mov word [eax + edi*2 + 2], bx
movzx ecx, word [0x51e010]
mov edx, dword [ebp + 0x10]
push edx
mov dword [esp + 0x24], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 2]
mov dword [esp + 0x18], eax
lea eax, [edi + edi + 4]
push ebx
call fcn.00445f60
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x459633
mov word [esi + edi*2 + 2], bx
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x20]
push edi
push esi
push eax
push ecx
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
cmp edi, ebx
jge 0x459652
xor edi, edi
lea eax, [edi + edi + 4]
push esi
mov word [esi + edi*2], bx
call fcn.00445f60
add esp, 4
cmp eax, ebx
mov dword [esp + 0x30], eax
je 0x459670
mov word [eax + edi*2 + 2], bx
movzx eax, word [0x51e010]
mov ecx, dword [ebp + 0xc]
push ecx
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 2]
mov dword [esp + 0x18], eax
lea eax, [edi + edi + 4]
push ebx
call fcn.00445f60
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4596a4
mov word [esi + edi*2 + 2], bx
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x20]
push edi
push esi
push edx
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
cmp edi, ebx
jge 0x4596c3
xor edi, edi
lea eax, [edi + edi + 4]
push esi
mov word [esi + edi*2], bx
call fcn.00445f60
add esp, 4
cmp eax, ebx
mov dword [esp + 0x34], eax
je 0x4596e1
mov word [eax + edi*2 + 2], bx
movzx edx, word [0x51e010]
mov eax, dword [ebp + 8]
push eax
mov dword [esp + 0x24], edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 2]
mov dword [esp + 0x18], eax
lea eax, [edi + edi + 4]
push ebx
call fcn.00445f60
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x459715
mov word [esi + edi*2 + 2], bx
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x20]
push edi
push esi
push ecx
push edx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
cmp edi, ebx
jge 0x459734
xor edi, edi
lea eax, [edi + edi + 4]
push esi
mov word [esi + edi*2], bx
call fcn.00445f60
mov esi, eax
add esp, 4
cmp esi, ebx
mov dword [esp + 0x3c], esi
je 0x459754
mov word [esi + edi*2 + 2], bx
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
push ecx
push edx
push eax
push edi
push esi
push str._r_nRegSetIP__s__s__s__s__s__r_n
push 0x519150
mov byte [esp + 0x4b0], 4
call fcn.0041e97e
add esp, 0x1c
cmp esi, ebx
je 0x45979d
mov ecx, dword [0x51927c]
add esi, 0xfffffff8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push ecx
call esi
jmp 0x4597a3
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp edi, ebx
je 0x4597b5
mov edx, dword [0x51927c]
add edi, 0xfffffff8
push edi
push ebx
push edx
call esi
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x4597ca
add eax, 0xfffffff8
push eax
mov eax, dword [0x51927c]
push ebx
push eax
call esi
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x4597e0
mov ecx, dword [0x51927c]
add eax, 0xfffffff8
push eax
push ebx
push ecx
call esi
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x4597f6
mov edx, dword [0x51927c]
add eax, 0xfffffff8
push eax
push ebx
push edx
call esi
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x2a
push str.SYSTEMCurrentControlSetServicesTcpipParametersInterfaces_
sete byte [esp + 0x2b]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
push esi
call fcn.00445f00
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, str.SYSTEMCurrentControlSetServicesTcpipParametersInterfaces_
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
add esp, 4
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x30], eax
mov esi, dword [ebp + 8]
push esi
lea ecx, [esp + 0x34]
mov dword [esp + 0x498], 5
call fcn.004460e0
mov edi, dword [esp + 0x30]
lea eax, [esp + 0x14]
push eax
mov al, byte [esp + 0x2b]
xor ecx, ecx
cmp al, bl
setne cl
dec ecx
and ecx, 0x20006
or ecx, 1
push ecx
push ebx
push edi
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4598a8
cmp edi, ebx
je 0x459891
mov edx, dword [0x51927c]
add edi, 0xfffffff8
push edi
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov ecx, dword [esp + 0x48c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x2d
jne 0x4598d4
mov ecx, dword [ebp + 0x18]
lea eax, [esp + 0x14]
push esi
push eax
call fcn.004592d0
add esp, 8
cmp edi, ebx
mov esi, eax
je 0x459d9d
add edi, 0xfffffff8
push edi
jmp 0x459d8f
cmp byte [esp + 0x27], bl
mov dword [esp + 0x1c], ebx
je 0x4599d7
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
inc eax
lea edx, [esp + 0x10]
push edx
push eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x24]
push eax
push ebx
push str.IPAddress
push ecx
mov dword [esp + 0x28], 0x320
call esi
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
call fcn.00440820
mov eax, dword [ebp + 0x10]
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
push ebx
push str.SubnetMask
push edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x28], 0x320
call esi
mov eax, dword [esp + 0x10]
mov edx, dword [ebp + 0x10]
call fcn.00440820
mov ecx, dword [ebp + 0x14]
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
push ebx
push str.DefaultGateway
push eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x28], 0x320
call esi
mov eax, dword [esp + 0x10]
mov edx, dword [ebp + 0x14]
call fcn.00440820
mov edx, dword [ebp + 0x18]
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push eax
push ebx
push str.NameServer
push ecx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x28], 0x320
call esi
cmp edi, ebx
je 0x4599bd
mov edx, dword [0x51927c]
add edi, 0xfffffff8
push edi
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, 1
mov ecx, dword [esp + 0x48c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov byte [esp + 0x108], bl
mov ecx, 0x36
lea edi, [esp + 0x109]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x1e8], bl
mov ecx, 0x36
lea edi, [esp + 0x1e9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x3a8], bl
mov ecx, 0x36
lea edi, [esp + 0x3a9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x2c8], bl
mov ecx, 0x36
lea edi, [esp + 0x2c9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x3ac]
push ecx
lea edx, [esp + 0x24]
push edx
push ebx
push str.IPAddress
mov edi, 0xc8
push eax
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x3a8]
call fcn.00440820
mov ecx, dword [esp + 0x10]
mov esi, eax
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x2cc]
push eax
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x24]
push ecx
push ebx
push str.SubnetMask
push edx
shl esi, 0x10
mov dword [esp + 0x34], ebx
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x2c8]
call fcn.00440820
shl eax, 0x10
add esi, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x20], eax
mov byte [esp + 0x40], bl
xor eax, eax
mov ecx, 0x31
lea edi, [esp + 0x41]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x10]
mov dword [esp + 0x2c], esi
stosb byte es:[edi], al
mov dword [esp + 0x38], ebx
mov dword [esp + 0x10], 4
push ecx
lea edx, [esp + 0x3c]
mov ecx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push eax
push ebx
push str.EnableDHCP
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp dword [esp + 0x38], ebx
jle 0x459b24
add esi, 0x10000
mov dword [esp + 0x2c], esi
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x2d
jne 0x459b31
mov eax, 0x4ec037
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0xc6
push eax
lea edx, [esp + 0x110]
push edx
call esi
mov eax, dword [ebp + 0x10]
cmp byte [eax], 0x2d
jne 0x459b54
mov eax, 0x4ec037
push 0xc6
push eax
lea eax, [esp + 0x1f0]
push eax
call esi
mov eax, dword [ebp + 0x14]
cmp byte [eax], 0x2d
jne 0x459b71
mov eax, 0x4ec037
cmp byte [eax], 0x30
je 0x459b83
push 0xc6
push eax
lea ecx, [esp + 0x48]
push ecx
call esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x108]
push edx
call esi
mov edi, eax
lea eax, [esp + 0x1e8]
push eax
add edi, 2
call esi
mov esi, eax
lea ecx, [esp + 0x40]
add esi, 2
push ecx
mov dword [esp + 0x40], esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebp + 0xc]
add eax, 2
push edx
mov dword [esp + 0x38], eax
call dword [0x519338]
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x1e8]
mov byte [esp + eax + 0x3f], bl
mov byte [esp + esi + 0x1e7], bl
mov byte [esp + edi + 0x107], bl
call fcn.004407f0
lea edx, [esp + 0x108]
mov esi, eax
call fcn.004407f0
add eax, dword [esp + 0x2c]
add eax, esi
lea edx, [esp + 0x40]
mov dword [esp + 0x2c], eax
call fcn.004407f0
mov esi, dword [ebp + 0x18]
xor ecx, ecx
cmp esi, ebx
sete cl
cmp esi, ebx
mov dword [esp + 0x28], esi
mov dword [esp + 0x38], ecx
je 0x459c3a
mov al, byte [esi]
cmp al, 0x2d
jne 0x459c2e
mov dword [esp + 0x28], 0x4ec037
cmp al, 0x30
jne 0x459c3a
mov dword [esp + 0x28], 0x4ec037
mov edx, dword [ebp + 0xc]
cmp byte [edx], bl
je 0x459c61
mov ecx, dword [esp + 0x14]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea eax, [esp + 0x10c]
push eax
push 7
push ebx
push str.IPAddress
push ecx
call edi
jmp 0x459c67
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp + 0x10]
cmp byte [edx], bl
je 0x459c8a
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x1ec]
push ecx
push 7
push ebx
push str.SubnetMask
push edx
call edi
mov eax, dword [ebp + 0x14]
cmp byte [eax], bl
je 0x459caa
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x44]
push edx
push 7
push ebx
push str.DefaultGateway
push eax
call edi
cmp byte [esi], bl
je 0x459cce
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x18]
push edx
push 1
push ebx
push str.NameServer
push eax
call edi
mov edx, dword [esp + 0x14]
push 4
lea ecx, [esp + 0x3c]
push ecx
push 4
push ebx
push str.EnableDHCP
push edx
call edi
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp + 0x10]
cmp byte [edi], bl
jne 0x459d32
cmp byte [esp + 0x2c8], bl
je 0x459d32
mov ecx, dword [esp + 0x20]
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x2c8]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
add edx, 0xfffffffe
xor eax, eax
cmp edx, ebx
rep movsb byte es:[edi], byte [esi]
jle 0x459d32
mov ecx, dword [ebp + 0x10]
cmp byte [eax + ecx], bl
jne 0x459d2d
mov byte [eax + ecx], 0x3b
inc eax
cmp eax, edx
jl 0x459d21
mov eax, dword [ebp + 0xc]
cmp byte [eax], bl
jne 0x459d7e
cmp byte [esp + 0x3a8], bl
je 0x459d7e
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0xc]
mov eax, ecx
shr ecx, 2
lea esi, [esp + 0x3a8]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
add ecx, 0xfffffffe
xor eax, eax
cmp ecx, ebx
jle 0x459d7e
jmp 0x459d70
cmp byte [eax + edx], bl
jne 0x459d79
mov byte [eax + edx], 0x3b
inc eax
cmp eax, ecx
jl 0x459d70
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
inc esi
cmp eax, ebx
je 0x459d9d
add eax, 0xfffffff8
push eax
mov ecx, dword [0x51927c]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x48c]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret