Function at 0x40a020
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x4421c3
mov eax, dword fs:[0]
push eax
sub esp, 0x13c
mov eax, dword [0x45878c]
xor eax, esp
mov dword [esp + 0x138], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45878c]
xor eax, esp
push eax
lea eax, [esp + 0x150]
mov dword fs:[0], eax
mov edi, dword [esp + 0x160]
xor ebp, ebp
mov dword [esp + 0x158], ebp
mov dword [esp + 0x30], edi
mov dword [esp + 0x28], ebp
call fcn.0041068e
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x40a08d
push 0x80004005
call fcn.00401150
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [edi], eax
mov esi, 1
mov dword [esp + 0x158], ebp
mov dword [esp + 0x28], esi
call fcn.0041068e
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x40a0c5
push 0x80004005
call fcn.00401150
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x34]
mov dword [esp + 0x158], esi
call fcn.0041da94
lea ecx, [esp + 0x20]
push ecx
push str.SystemCurrentControlSetControlSession_ManagerMemory_Management
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [esp + 0x164], 2
mov dword [esp + 0x24], ebp
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40a21c
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x34]
push ecx
push ebp
push str.PagingFiles
push edx
mov dword [esp + 0x34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40a211
cmp dword [esp + 0x1c], ebp
jbe 0x40a205
mov edx, dword [esp + 0x18]
lea edx, [esp + edx + 0x48]
cmp edx, ebp
jne 0x40a158
xor eax, eax
jmp 0x40a16b
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a160
sub eax, esi
push eax
push edx
mov ecx, edi
call fcn.00401740
mov eax, dword [edi]
cmp dword [eax - 0xc], ebp
jle 0x40a1df
push 0x20
push eax
call fcn.0042e420
add esp, 8
cmp eax, ebp
je 0x40a1df
sub eax, dword [edi]
mov esi, eax
cmp esi, ebp
jle 0x40a1df
lea eax, [esi + 1]
push eax
lea ecx, [esp + 0x18]
push ecx
mov ecx, edi
call fcn.004083a0
mov eax, dword [eax]
push 0x446978
push eax
call fcn.0042d8b2
add esp, 8
cmp eax, ebp
mov eax, dword [esp + 0x14]
setne bl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a1d7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x40a281
mov eax, dword [edi]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a1e4
mov ecx, dword [esp + 0x18]
sub eax, edx
lea eax, [ecx + eax + 1]
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
jb 0x40a148
push 0x445678
mov ecx, edi
call fcn.004018e0
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x34]
mov byte [esp + 0x158], 1
call fcn.0041dc45
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x158], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a255
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x150]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.0042d47b
add esp, 0x148
ret 4
push esi
push ebp
lea edx, [esp + 0x1c]
push edx
mov ecx, edi
call fcn.00407e40
push eax
mov ecx, edi
mov byte [esp + 0x15c], 3
call fcn.004025f0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x158], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a211
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40a211