Function at 0x40e670
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x60c721
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x298
push ebx
push esi
mov esi, dword [esp + 0x2bc]
push edi
xor ebx, ebx
xor edi, edi
neg esi
mov ecx, dword [esp + 0x2b4]
lea eax, [esp + 0x14]
sbb esi, esi
push eax
and esi, 0x100
mov dword [esp + 0x20], edi
add esi, 0x20019
push esi
push ebx
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40e8fd
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
lea eax, [esp + 0x38]
push edx
push eax
push ebx
push ebx
push 0x6bd028
push ecx
mov dword [esp + 0x28], 0x64
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40e8f2
lea edx, [esp + 0x38]
push ebp
mov ebp, dword [esp + 0x2c0]
push edx
push 0x6bc090
push ebp
call fcn.005f368b
mov eax, dword [ebp]
push 0x20
push eax
call fcn.005de150
add esp, 0x14
cmp eax, ebx
je 0x40e74c
mov byte [eax], 0
mov edx, dword [ebp]
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [edx + ecx - 1], 0x2e
jne 0x40e748
dec ecx
push ebx
push ecx
mov ecx, ebp
call fcn.005facc5
mov edi, dword [esp + 0x20]
mov eax, dword [0x6e7b6c]
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x10]
push ecx
push 0x6bd020
push edx
mov dword [esp + 0x2bc], ebx
call fcn.005f368b
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
push esi
push ebx
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40e8dd
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
lea ecx, [esp + 0xa0]
push eax
push ecx
push ebx
push ebx
push 0x6bd00c
push edx
mov dword [esp + 0x2c], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40e8d2
mov eax, 0x6bc090
test eax, eax
je 0x40e8cd
lea ecx, [esp + 0xa0]
test ecx, ecx
je 0x40e8cd
lea edx, [esp + 0xa0]
lea ecx, [esp + 0x24]
push edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
mov word [esp + 0x2c], bx
call fcn.004023e0
mov ebp, dword [esp + 0x2bc]
mov byte [esp + 0x2b0], 1
mov ecx, ebp
call fcn.00401070
push ebx
push 0x6bc090
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], ebx
mov word [esp + 0x3c], bx
call fcn.00402d00
mov eax, dword [esp + 0x24]
mov byte [esp + 0x2b0], 2
cmp eax, ebx
jne 0x40e841
lea eax, [esp + 0x28]
mov esi, dword [esp + 0x38]
push eax
call fcn.005de123
lea ebx, [eax + esi + 2]
lea esi, [ebx + ebx]
push esi
call fcn.005f6c5c
mov edi, eax
add esp, 8
test edi, edi
mov dword [ebp], edi
je 0x40e8ab
mov ecx, esi
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x24]
test eax, eax
mov ecx, eax
jne 0x40e884
lea ecx, [esp + 0x28]
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x40e890
lea eax, [esp + 0x34]
push ecx
push eax
mov eax, dword [ebp]
push ebx
push eax
call fcn.005de0b3
mov ecx, dword [ebp]
push ecx
call fcn.005de123
add esp, 0x14
mov dword [ebp + 8], eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x2b0], 1
call fcn.00401070
lea ecx, [esp + 0x24]
mov byte [esp + 0x2b0], 0
call fcn.00401070
mov edi, 1
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x10]
mov dword [esp + 0x2b0], 0xffffffff
call fcn.005fa859
pop ebp
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x2a4]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x2a4
ret