Function at 0x406d60
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x563110
mov eax, dword fs:[0]
push eax
sub esp, 0x270
mov eax, dword [0x5c0020]
xor eax, esp
mov dword [esp + 0x268], eax
push ebx
push esi
push edi
mov eax, dword [0x5c0020]
xor eax, esp
push eax
lea eax, [esp + 0x280]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x38], ebx
xor eax, eax
mov dword [esp + 0x70], 7
mov dword [esp + 0x6c], 0
mov word [esp + 0x5c], ax
push 0x1c
push str.SOFTWARERobustaPortForward
lea ecx, [esp + 0x64]
mov dword [esp + 0x290], eax
call fcn.00401710
push 1
push 0x5995d0
lea ecx, [esp + 0x64]
call fcn.00401710
push 5
push str.Rules
lea ecx, [esp + 0x64]
call fcn.00401710
cmp byte [ebp + 8], 0
lea ecx, [esp + 0x50]
mov dword [esp + 0x58], 0
lea eax, [esp + 0x5c]
push ecx
je 0x407172
cmp dword [esp + 0x74], 8
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmovae eax, dword [esp + 0x60]
push 0x20019
push 0
push eax
push SysReAllocString
call esi
test eax, eax
jne 0x4074d9
lea ecx, [ebx + 4]
call fcn.00407520
xor edi, edi
push 0
push 0
push 0
push 0
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x88]
push eax
push edi
push dword [esp + 0x6c]
mov dword [esp + 0x74], 0xff
mov dword [esp + 0x6c], 0
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov ebx, eax
mov dword [esp + 0x34], ebx
test ebx, ebx
jne 0x407114
lea eax, [esp + 0x4c]
push eax
push 0x20019
push ebx
lea eax, [esp + 0x80]
push eax
push dword [esp + 0x60]
call esi
test eax, eax
jne 0x406e40
push 0x48
call fcn.004140a7
add esp, 4
mov dword [esp + 0x2c], eax
mov byte [esp + 0x288], 1
test eax, eax
je 0x406ec0
mov ecx, eax
call fcn.00402930
mov esi, eax
jmp 0x406ec2
xor esi, esi
mov byte [esp + 0x288], 0
mov dword [esp + 0x2c], esi
test esi, esi
je 0x407104
push str.ProtoTCP
lea ecx, [esp + 0x18]
lea ebx, [esi + 0x40]
call fcn.00401580
cmp dword [esp + 0x28], 8
lea ecx, [esp + 0x10]
push ecx
push ebx
lea ecx, [esp + 0x50]
push ecx
lea eax, [esp + 0x20]
cmovae eax, dword [esp + 0x20]
push 0
push eax
push dword [esp + 0x60]
mov dword [esp + 0x28], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x406f1f
mov dword [ebx], 1
cmp dword [esp + 0x28], 8
jb 0x406f32
push dword [esp + 0x14]
call fcn.004140d4
add esp, 4
push str.AutoDetectLocal
lea ecx, [esp + 0x18]
lea ebx, [esi + 0x34]
call fcn.00401580
cmp dword [esp + 0x28], 8
lea ecx, [esp + 0x10]
push ecx
push ebx
lea ecx, [esp + 0x4c]
push ecx
lea eax, [esp + 0x20]
cmovae eax, dword [esp + 0x20]
push 0
push eax
push dword [esp + 0x60]
mov dword [esp + 0x28], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x406f7b
mov dword [ebx], 1
cmp dword [esp + 0x28], 8
jb 0x406f8e
push dword [esp + 0x14]
call fcn.004140d4
add esp, 4
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x59a1fc
call fcn.00401580
lea eax, [esi + 4]
push eax
sub esp, 0x18
mov ecx, esp
push str.Alias
mov byte [esp + 0x2c0], 2
call fcn.00401580
push dword [esp + 0x80]
mov byte [esp + 0x2c0], 0
call fcn.00409b90
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x58], esp
push 0x59a1fc
call fcn.00401580
lea eax, [esi + 0x1c]
push eax
sub esp, 0x18
mov ecx, esp
push str.LocalAddress
mov byte [esp + 0x2c0], 3
call fcn.00401580
push dword [esp + 0x80]
mov byte [esp + 0x2c0], 0
call fcn.00409b90
push str.ExternalPort
lea ecx, [esp + 0x18]
lea ebx, [esi + 0x38]
call fcn.00401580
cmp dword [esp + 0x28], 8
lea ecx, [esp + 0x10]
push ecx
push ebx
lea ecx, [esp + 0x44]
push ecx
lea eax, [esp + 0x20]
cmovae eax, dword [esp + 0x20]
push 0
push eax
push dword [esp + 0x60]
mov dword [esp + 0x28], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40705b
mov dword [ebx], 0
cmp dword [esp + 0x28], 8
jb 0x40706e
push dword [esp + 0x14]
call fcn.004140d4
add esp, 4
push str.InternalPort
lea ecx, [esp + 0x18]
lea ebx, [esi + 0x3c]
call fcn.00401580
cmp dword [esp + 0x28], 8
lea ecx, [esp + 0x10]
push ecx
push ebx
lea ecx, [esp + 0x38]
push ecx
lea eax, [esp + 0x20]
cmovae eax, dword [esp + 0x20]
push 0
push eax
push dword [esp + 0x60]
mov dword [esp + 0x28], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x4070b7
mov dword [ebx], 0
cmp dword [esp + 0x28], 8
jb 0x4070ca
push dword [esp + 0x14]
call fcn.004140d4
add esp, 4
mov ebx, dword [esp + 0x38]
mov dword [esi], edi
mov esi, dword [ebx + 4]
lea eax, [esp + 0x2c]
push eax
push dword [esi + 4]
push esi
call fcn.004060c0
mov edx, eax
mov eax, dword [ebx + 8]
mov ecx, 0x15555554
sub ecx, eax
cmp ecx, 1
jb 0x407168
lea ecx, [eax + 1]
mov dword [ebx + 8], ecx
mov ebx, dword [esp + 0x34]
mov dword [esi + 4], edx
mov eax, dword [edx + 4]
mov dword [eax], edx
push dword [esp + 0x4c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
inc edi
cmp ebx, 0x103
jne 0x406e40
push dword [esp + 0x50]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov bl, 1
cmp dword [esp + 0x70], 8
jb 0x407140
push dword [esp + 0x5c]
call fcn.004140d4
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x280]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0053786f
mov esp, ebp
pop ebp
ret 4
push str.list_T__too_long
call fcn.0055318d
cmp dword [esp + 0x74], 8
push 0x2001f
cmovae eax, dword [esp + 0x64]
push 0
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40719e
push eax
push dword [esp + 0x54]
call dword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
cmp dword [esp + 0x70], 8
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esp + 0x54]
push ecx
push 0
push 0x20006
push 0
push 0
lea eax, [esp + 0x74]
cmovae eax, dword [esp + 0x74]
push 0
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x4071da
xor bl, bl
jmp 0x40712d
mov eax, dword [ebx + 4]
xor ebx, ebx
mov esi, dword [eax]
cmp esi, eax
je 0x407121
lea esp, [esp]
mov eax, dword [esi + 8]
cmp dword [eax + 0x44], 0
jne 0x4074a3
mov dword [esp + 0x4c], 0
call fcn.004273a1
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x4074e0
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x54], eax
push ebx
lea eax, [esp + 0x58]
push str.Rule__d
push eax
mov byte [esp + 0x294], 4
call fcn.00406720
mov edi, dword [esp + 0x60]
add esp, 0xc
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x50]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push edi
push dword [esp + 0x70]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4074b7
mov eax, dword [esi + 8]
push dword [eax + 0x40]
xor eax, eax
sub esp, 0x18
mov ecx, esp
push 8
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push str.ProtoTCP
mov word [ecx], ax
call fcn.004017f0
push dword [esp + 0x68]
call fcn.00409ce0
mov eax, dword [esi + 8]
push dword [eax + 0x34]
xor eax, eax
sub esp, 0x18
mov ecx, esp
push 0xf
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push str.AutoDetectLocal
mov word [ecx], ax
call fcn.004017f0
push dword [esp + 0x68]
call fcn.00409ce0
mov eax, dword [esi + 8]
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x48], esp
xor edx, edx
push 0xffffffffffffffff
add eax, 4
push edx
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], dx
call fcn.00401af0
sub esp, 0x18
mov ecx, esp
mov byte [esp + 0x2b8], 5
push 5
xor eax, eax
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push str.Alias
mov word [ecx], ax
call fcn.004017f0
push dword [esp + 0x7c]
mov byte [esp + 0x2bc], 4
call fcn.00409b10
mov eax, dword [esi + 8]
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x48], esp
xor edx, edx
push 0xffffffffffffffff
add eax, 0x1c
push edx
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], dx
call fcn.00401af0
sub esp, 0x18
mov ecx, esp
mov byte [esp + 0x2b8], 6
push 0xc
xor eax, eax
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push str.LocalAddress
mov word [ecx], ax
call fcn.004017f0
push dword [esp + 0x7c]
mov byte [esp + 0x2bc], 4
call fcn.00409b10
mov dword [esp + 0x28], 7
push 0xc
xor eax, eax
push str.ExternalPort
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
call fcn.004017f0
mov eax, dword [esi + 8]
cmp dword [esp + 0x28], 8
mov eax, dword [eax + 0x38]
push 4
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x3c], eax
push 4
lea eax, [esp + 0x20]
cmovae eax, dword [esp + 0x20]
push 0
push eax
push dword [esp + 0x60]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp dword [esp + 0x28], 8
jb 0x40740e
push dword [esp + 0x14]
call fcn.004140d4
add esp, 4
push 0xc
xor eax, eax
push str.InternalPort
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
call fcn.004017f0
mov eax, dword [esi + 8]
cmp dword [esp + 0x28], 8
mov eax, dword [eax + 0x3c]
push 4
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x34], eax
push 4
lea eax, [esp + 0x20]
cmovae eax, dword [esp + 0x20]
push 0
push eax
push dword [esp + 0x60]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp dword [esp + 0x28], 8
jb 0x407476
push dword [esp + 0x14]
call fcn.004140d4
add esp, 4
push dword [esp + 0x4c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add edi, 0xfffffff0
inc ebx
mov byte [esp + 0x288], 0
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4074a3
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esp + 0x38]
mov esi, dword [esi]
cmp esi, dword [eax + 4]
jne 0x4071f0
jmp 0x407121
add edi, 0xfffffff0
mov byte [esp + 0x288], 0
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4074d9
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
xor bl, bl
jmp 0x40712d
push 0x80004005
call fcn.00406bc0
int3