Function at 0x402090
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b7ec
mov eax, dword fs:[0]
push eax
sub esp, 0x43c
mov eax, dword [0x438040]
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 ebx, ecx
mov dword [ebp - 0x420], ebx
cmp byte [ebx + 0x14], 0
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x40211d
mov eax, dword [ebx + 4]
cmp dword [eax - 0xc], 0
jle 0x402113
lea ecx, [ebp - 0x414]
mov dword [ebp - 0x414], 0
push ecx
push eax
push dword [ebx + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x402113
mov ecx, dword [ebx]
test ecx, ecx
je 0x402103
push ecx
call esi
mov ecx, dword [ebp - 0x414]
mov dword [ebx], ecx
test eax, eax
jne 0x402113
mov byte [ebx + 0x14], 1
cmp byte [ebx + 0x14], 0
je 0x4025b1
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x444], 0
mov dword [ebp - 0x440], 0
mov dword [ebp - 4], 0
mov eax, dword [ebx + 4]
cmp dword [eax - 0xc], 0
jle 0x402517
lea eax, [ebp - 0x418]
mov dword [ebp - 0x418], 0
push eax
push 0x2001f
push 0
push 0x433e5c
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402517
mov eax, dword [ebp - 0x418]
xor edi, edi
mov dword [ebp - 0x448], eax
mov eax, dword [ebx + 0xc]
sub eax, dword [ebx + 8]
sar eax, 2
mov dword [ebp - 0x444], 0
mov dword [ebp - 0x414], edi
test eax, eax
jle 0x402501
nop dword [eax + eax]
call fcn.00401920
mov ecx, eax
test ecx, ecx
je 0x4025d7
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x41c], esi
mov byte [ebp - 4], 1
lea eax, [ebp - 0x410]
test edi, edi
jle 0x4021f1
push edi
push str.Directory_d
push 0x3ff
push eax
call fcn.00404220
add esp, 0x10
jmp 0x402204
push str.Directory
push 0x3ff
push eax
call fcn.00404220
add esp, 0xc
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x428]
call fcn.00403330
lea edx, [ebp - 0x428]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x434]
call fcn.00401100
mov edi, eax
mov byte [ebp - 4], 3
mov edx, 1
mov ecx, dword [esi - 8]
sub edx, dword [esi - 4]
sub ecx, 0x3ff
or ecx, edx
jge 0x40225c
push 0x3ff
lea ecx, [ebp - 0x41c]
call fcn.00401430
mov esi, dword [ebp - 0x41c]
lea eax, [ebp - 0x424]
mov dword [ebp - 0x424], 0x7fe
push eax
push esi
lea eax, [ebp - 0x430]
push eax
push 0
push dword [edi]
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test edi, edi
jne 0x4022cc
mov eax, dword [ebp - 0x430]
cmp eax, 1
je 0x4022a2
cmp eax, 2
je 0x4022a2
mov edi, 0xd
jmp 0x4022cc
test esi, esi
je 0x4022ca
mov eax, dword [ebp - 0x424]
test eax, eax
je 0x4022c5
test al, 1
jne 0x4022be
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x4022ca
mov edi, 0xd
jmp 0x4022cc
xor eax, eax
mov word [esi], ax
xor edi, edi
mov byte [ebp - 4], 2
or eax, 0xffffffff
mov edx, dword [ebp - 0x434]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4022ee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp - 0x428]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x402310
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
jne 0x4023c5
push dword [esi - 8]
push esi
call fcn.004146d4
add esp, 8
test eax, eax
js 0x4025cd
cmp eax, dword [esi - 8]
jg 0x4025cd
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea ecx, [ebp - 0x41c]
call fcn.00401c20
mov eax, dword [ebx + 8]
mov ecx, dword [ebp - 0x414]
mov esi, dword [ebp - 0x41c]
lea ecx, [eax + ecx*4]
mov edi, dword [ecx]
sub edi, 0x10
mov dword [ebp - 0x438], ecx
lea edx, [esi - 0x10]
cmp edx, edi
je 0x4024c1
cmp dword [edi + 0xc], 0
jl 0x4023b7
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x4023b7
mov ecx, edx
call fcn.00401350
mov dword [ebp - 0x424], eax
lea edx, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4023a7
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x438]
add eax, 0x10
mov dword [ecx], eax
jmp 0x4024c1
push dword [esi - 0xc]
push esi
call fcn.00403530
jmp 0x4024c1
mov eax, dword [ebx + 8]
mov ecx, dword [ebp - 0x414]
push 0
push 0
push 0xffffffffffffffff
push 0x433e6c
push 0
push 3
lea ebx, [eax + ecx*4]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edi, [eax - 1]
test edi, edi
jle 0x402434
mov ecx, dword [ebx]
mov edx, 1
mov eax, dword [ecx - 8]
sub edx, dword [ecx - 4]
sub eax, edi
or eax, edx
jge 0x402408
push edi
mov ecx, ebx
call fcn.00401430
push edi
push dword [ebx]
push 0xffffffffffffffff
push 0x433e6c
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [ebx]
cmp edi, dword [eax - 8]
jg 0x4025cd
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [ebx]
mov word [eax + edi*2], cx
jmp 0x40243b
mov ecx, ebx
call fcn.00403490
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x42c]
call fcn.00403330
lea edx, [ebp - 0x42c]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x43c]
call fcn.00401100
push 2
push 0x433f20
push 1
push 0
push dword [eax]
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [ebp - 0x43c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x402499
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp - 0x42c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4024bb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x420]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4024dd
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebx + 0xc]
mov edi, dword [ebp - 0x414]
sub eax, dword [ebx + 8]
inc edi
sar eax, 2
mov dword [ebp - 0x414], edi
cmp edi, eax
jl 0x4021b0
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x418]
test eax, eax
je 0x4025b1
push eax
call esi
jmp 0x4025b1
mov eax, dword [ebp - 0x420]
xor ebx, ebx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
sub eax, ecx
test eax, 0xfffffffc
jle 0x4025b1
push 0
push 0
push 0xffffffffffffffff
push 0x433e6c
push 0
push 3
lea edi, [ecx + ebx*4]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea esi, [eax - 1]
test esi, esi
jle 0x402594
mov ecx, dword [edi]
mov edx, 1
sub edx, dword [ecx - 4]
mov ecx, dword [ecx - 8]
sub ecx, esi
or edx, ecx
jge 0x40256c
push esi
mov ecx, edi
call fcn.00401430
push esi
push dword [edi]
push 0xffffffffffffffff
push 0x433e6c
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [edi]
cmp esi, dword [eax - 8]
jg 0x4025cd
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [edi]
mov word [eax + esi*2], cx
jmp 0x40259b
mov ecx, edi
call fcn.00403490
mov eax, dword [ebp - 0x420]
inc ebx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jl 0x402532
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.0040f7c4
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004016f0
push 0x80004005
call fcn.004016f0
int3