Function at 0x406400
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45f380
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x482524]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x30]
push edi
push eax
push 1
mov dword [ebp - 0x30], 0
call fcn.00405fa0
test al, al
je 0x406642
cmp dword [ebp - 0x30], 0
jne 0x40645f
mov al, 1
jmp 0x406642
xor eax, eax
mov dword [ebp - 0x18], 0
push eax
push 0x1388
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.00404230
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x14], 8
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
cmp dword [esi + 0x14], 8
jb 0x4064a1
mov esi, dword [esi]
lea ecx, [ebp - 0x2c]
push ecx
push eax
push 0
push 0
push esi
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x30]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, 2
je 0x406608
test esi, esi
je 0x406586
mov edx, esi
lea ecx, [ebp - 0x68]
call fcn.00406e30
push eax
mov edx, str.RegQueryValue_failed_with_error
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x50]
call fcn.00406a40
add esp, 4
mov ecx, edi
push eax
call fcn.00402970
mov edx, dword [ebp - 0x3c]
cmp edx, 8
jb 0x406531
mov ecx, dword [ebp - 0x50]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406527
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406660
push edx
push ecx
call fcn.00438535
add esp, 8
mov edx, dword [ebp - 0x54]
xor eax, eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 7
mov word [ebp - 0x50], ax
cmp edx, 8
jb 0x40657f
mov ecx, dword [ebp - 0x68]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406575
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406665
push edx
push ecx
call fcn.00438535
add esp, 8
xor bl, bl
jmp 0x40660a
mov ecx, dword [ebp - 0x2c]
cmp ecx, 2
jbe 0x406608
mov esi, dword [ebp - 0x18]
shr ecx, 1
dec ecx
cmp ecx, esi
ja 0x4065ae
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov dword [ebp - 0x18], ecx
cmovae eax, dword [ebp - 0x28]
xor edx, edx
mov word [eax + ecx*2], dx
jmp 0x4065fc
mov edi, dword [ebp - 0x14]
mov edx, ecx
mov eax, edi
sub edx, esi
sub eax, esi
cmp edx, eax
ja 0x4065e9
cmp edi, 8
mov dword [ebp - 0x18], ecx
lea ebx, [ebp - 0x28]
cmovae ebx, dword [ebp - 0x28]
lea edi, [ebx + esi*2]
test edx, edx
je 0x4065de
xor eax, eax
mov ecx, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
lea eax, [esi + edx]
xor ecx, ecx
mov word [ebx + eax*2], cx
jmp 0x4065fc
push 0
push edx
mov byte [ebp - 0x34], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x34]
push edx
call fcn.00406c90
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x28]
push eax
call fcn.00406ee0
mov bl, 1
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x406640
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406636
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40666a
push edx
push ecx
call fcn.00438535
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00438524
mov esp, ebp
pop ebp
ret 0xc
call fcn.004447fc
call fcn.004447fc
call fcn.004447fc
int3