Function at 0x4070e0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x5020
call fcn.00578400
mov eax, dword [0x5e1040]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov esi, edx
mov dword [ebp - 0x501c], eax
mov eax, edi
mov dword [edi + 0x10], 0
cmp dword [edi + 0x14], 7
jbe 0x40711c
mov eax, dword [edi]
xor ecx, ecx
mov word [eax], cx
mov eax, esi
cmp dword [esi + 0x14], 7
mov dword [ebp - 0x5018], ecx
jbe 0x407131
mov eax, dword [esi]
lea ecx, [ebp - 0x5018]
push ecx
push 1
push 0
push eax
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x407178
cmp dword [esi + 0x14], 7
mov eax, esi
jbe 0x407156
mov eax, dword [esi]
lea ecx, [ebp - 0x5018]
push ecx
push 0x101
push 0
push eax
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40739c
push 0x5000
lea eax, [ebp - 0x500c]
push 0
push eax
call fcn.00547c40
mov eax, dword [ebp - 0x501c]
add esp, 0xc
cmp dword [ebx + 0x14], 7
mov dword [ebp - 0x5010], 0x2800
mov eax, dword [eax]
mov dword [ebp - 0x5014], eax
mov eax, ebx
jbe 0x4071b0
mov eax, dword [ebx]
lea ecx, [ebp - 0x5010]
push ecx
lea ecx, [ebp - 0x500c]
push ecx
lea ecx, [ebp - 0x5014]
push ecx
push 0
push eax
push dword [ebp - 0x5018]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4072b4
mov eax, dword [ebp - 0x501c]
mov eax, dword [eax]
cmp eax, 1
jne 0x407207
lea edx, [ebp - 0x500c]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4071f2
sub edx, ecx
sar edx, 1
push edx
jmp 0x407287
cmp eax, 4
je 0x40724d
cmp eax, 3
je 0x40724d
cmp eax, 7
jne 0x407295
push dword [ebp - 0x5010]
lea eax, [ebp - 0x500c]
mov ecx, edi
push eax
call fcn.00403790
push dword [ebp - 0x5018]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004224b5
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x500c]
lea eax, [ebp - 0x500c]
push 0x5d0c14
push 0xffffffffffffffff
push 0x2800
push eax
call fcn.00406e40
lea ecx, [ebp - 0x500c]
add esp, 0x14
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407277
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x500c]
mov ecx, edi
push eax
call fcn.00403550
push dword [ebp - 0x5018]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004224b5
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x407390
cmp dword [esi + 0x14], 7
jbe 0x4072c5
mov esi, dword [esi]
lea eax, [ebp - 0x5018]
push eax
push 0x101
push 0
push esi
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40739c
cmp dword [ebx + 0x14], 7
jbe 0x4072ef
mov ebx, dword [ebx]
lea eax, [ebp - 0x5010]
push eax
lea eax, [ebp - 0x500c]
push eax
lea eax, [ebp - 0x5014]
push eax
push 0
push ebx
push dword [ebp - 0x5018]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407390
mov eax, dword [ebp - 0x501c]
mov eax, dword [eax]
cmp eax, 1
jne 0x407340
lea ecx, [ebp - 0x500c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407330
jmp 0x407282
cmp eax, 4
je 0x40734e
cmp eax, 3
jne 0x407211
push dword [ebp - 0x500c]
lea eax, [ebp - 0x500c]
push 0x5d0c1c
push 0xffffffffffffffff
push 0x2800
push eax
call fcn.00406e40
lea ecx, [ebp - 0x500c]
add esp, 0x14
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407380
jmp 0x407282
push dword [ebp - 0x5018]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 8]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004224b5
mov esp, ebp
pop ebp
ret