Function at 0x402992
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405843
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2128
call fcn.00405770
mov eax, dword [0x406194]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x2130], edi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2124], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2120], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x2138], eax
lea eax, [ebp - 0x2014]
push eax
mov dword [ebp - 0x2128], edi
call fcn.00402836
test eax, eax
js 0x402dff
xor ebx, ebx
mov esi, ebx
push dword [esi*8 + 0x4010e0]
lea eax, [ebp - 0x2014]
push eax
call dword [sym.imp.api_ms_win_core_string_obsolete_l1_1_0.dll_lstrcmpiW]
test eax, eax
je 0x402a33
inc esi
cmp esi, 4
jb 0x402a0b
mov eax, 0x80020009
jmp 0x402dff
movzx esi, word [esi*8 + 0x4010e4]
mov ecx, edi
call fcn.00402809
lea eax, [ebp - 0x2014]
mov ecx, edi
push eax
call fcn.00402836
test eax, eax
js 0x402dff
mov eax, esi
push 2
pop edi
sub eax, 8
je 0x402d9c
sub eax, 9
je 0x402c22
sub eax, edi
je 0x402baa
sub eax, 0x3ff5
jne 0x402de8
lea ecx, [ebp - 0x2014]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, edi
cmp ax, bx
jne 0x402a8b
sub ecx, edx
mov dword [ebp - 0x2118], ebx
sar ecx, 1
lea eax, [ecx + 2]
mul edi
mov dword [ebp - 4], ebx
mov byte [ebp - 4], 1
cmp edx, ebx
ja 0x402e1d
jb 0x402abe
cmp eax, 0xffffffff
ja 0x402e1d
cmp eax, 0x100
jbe 0x402ad9
push eax
lea ecx, [ebp - 0x2118]
call fcn.004045ae
mov esi, dword [ebp - 0x2118]
jmp 0x402ae5
lea esi, [ebp - 0x2114]
mov dword [ebp - 0x2118], esi
mov dword [ebp - 4], ebx
jmp 0x402b0a
test esi, esi
je 0x402b89
cmp word [ebp - 0x2014], 0
lea eax, [ebp - 0x2014]
mov dword [ebp - 0x211c], eax
je 0x402b64
push eax
call dword [sym.imp.api_ms_win_core_string_l2_1_0.dll_CharNextW]
mov ecx, eax
mov eax, dword [ebp - 0x211c]
movzx edx, word [eax]
cmp edx, 0x5c
jne 0x402b57
push 0x30
pop eax
cmp word [ecx], ax
mov eax, dword [ebp - 0x211c]
jne 0x402b57
xor eax, eax
push ecx
mov word [esi], ax
call dword [sym.imp.api_ms_win_core_string_l2_1_0.dll_CharNextW]
jmp 0x402b5c
mov word [esi], dx
add eax, edi
add esi, 2
cmp word [eax], bx
jmp 0x402b1c
mov ecx, dword [ebp - 0x2124]
xor eax, eax
mov dword [esi], eax
push dword [ebp - 0x2118]
push dword [ebp - 0x2120]
call fcn.00402063
mov esi, dword [ebp - 0x2118]
mov edi, eax
jmp 0x402b8c
push 0xe
pop edi
lea eax, [ebp - 0x2114]
cmp esi, eax
je 0x402ddb
lea ecx, [ebp - 0x2118]
call fcn.004045a4
jmp 0x402ddb
lea eax, [ebp - 0x211c]
mov dword [ebp - 0x211c], ebx
push eax
push ebx
push ebx
lea eax, [ebp - 0x2014]
mov dword [ebp - 0x2128], ebx
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov esi, eax
test esi, esi
jns 0x402be4
lea ecx, [ebp - 0x2128]
call fcn.00404588
mov eax, esi
jmp 0x402dff
mov eax, dword [ebp - 0x211c]
push 4
mov dword [ebp - 0x212c], eax
lea eax, [ebp - 0x212c]
push eax
mov eax, dword [ebp - 0x2124]
push 4
push ebx
push dword [ebp - 0x2120]
push dword [eax]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
lea ecx, [ebp - 0x2128]
mov edi, eax
call fcn.00404588
jmp 0x402ddb
lea ecx, [ebp - 0x2014]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, edi
cmp ax, bx
jne 0x402c2b
sub ecx, edx
sar ecx, 1
mov dword [ebp - 0x211c], ecx
mov dword [ebp - 0x2134], ecx
test cl, 1
jne 0x402cd3
mov eax, ecx
mov dword [ebp - 0x2118], ebx
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov dword [ebp - 0x212c], edi
mov dword [ebp - 4], 3
mov byte [ebp - 4], 4
cmp edi, 0x100
jbe 0x402cb2
push edi
lea ecx, [ebp - 0x2118]
call fcn.004045ae
mov eax, dword [ebp - 0x2118]
jmp 0x402cbe
lea eax, [ebp - 0x2114]
mov dword [ebp - 0x2118], eax
mov esi, dword [ebp - 0x211c]
test eax, eax
jne 0x402cdd
lea ecx, [ebp - 0x2118]
call fcn.004045a4
mov eax, 0x80004005
jmp 0x402dff
push edi
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
test esi, esi
jle 0x402d61
mov edi, ebx
movzx ecx, word [ebp + edi*2 - 0x2014]
mov eax, edi
cdq
sub eax, edx
mov edx, ecx
sar eax, 1
add eax, dword [ebp - 0x2118]
mov dword [ebp - 0x2134], eax
mov eax, ecx
push 0x30
pop ecx
cmp ax, cx
jb 0x402d3d
cmp eax, 0x39
jbe 0x402d38
cmp eax, 0x40
jbe 0x402d3d
cmp eax, 0x46
jbe 0x402d33
cmp eax, 0x60
jbe 0x402d3d
cmp edx, 0x66
ja 0x402d3d
sub dl, 0x57
jmp 0x402d3f
sub dl, 0x37
jmp 0x402d3f
sub dl, 0x30
jmp 0x402d3f
mov dl, bl
mov eax, edi
and eax, 1
shl eax, 2
push 4
pop ecx
sub ecx, eax
mov eax, dword [ebp - 0x2134]
shl dl, cl
or byte [eax], dl
inc edi
cmp edi, esi
jl 0x402cee
mov edi, dword [ebp - 0x212c]
mov eax, dword [ebp - 0x2124]
push edi
push dword [ebp - 0x2118]
push 3
push ebx
push dword [ebp - 0x2120]
push dword [eax]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov edi, eax
lea eax, [ebp - 0x2114]
cmp dword [ebp - 0x2118], eax
je 0x402ddb
lea ecx, [ebp - 0x2118]
call fcn.004045a4
jmp 0x402ddb
lea ecx, [ebp - 0x2014]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, edi
cmp ax, bx
jne 0x402da5
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x2014]
push eax
mov eax, dword [ebp - 0x2124]
push 1
push ebx
push dword [ebp - 0x2120]
push dword [eax]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov edi, eax
test edi, edi
je 0x402de8
mov ecx, edi
call fcn.00401dc9
jmp 0x402dff
push dword [ebp - 0x2138]
mov ecx, dword [ebp - 0x2130]
call fcn.00402836
test eax, eax
js 0x402dff
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00404ea0
mov esp, ebp
pop ebp
ret 0xc
mov ecx, 0x80070057
call fcn.00401d1f
int3