Function at 0x402690
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x44
mov dword [ebp - 0x34], eax
mov dword [esp + 4], 0x7d2
mov dword [esp], eax
call dword [0x41565c]
sub esp, 8
mov ebx, eax
mov dword [esp], eax
call dword [0x41568c]
mov ecx, dword [sym.imp.ucrtbase.dll_malloc]
lea edx, [eax + 1]
sub esp, 4
lea eax, [edx + edx]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], edx
mov dword [esp], eax
call ecx
mov edx, dword [ebp - 0x14]
mov dword [esp], ebx
mov edi, eax
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call dword [0x415690]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0xc]
sub esp, 0xc
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x2c], eax
call eax
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 0x10]
cmp eax, 0xb
mov dword [ebp - 0x20], eax
ja case.0x402715.0
jmp dword [eax*4 + 0x412148]
mov dword [esi + 0x10], 8
mov dword [esp], 8
call ecx
mov edx, dword [0x414008]
mov ecx, str._I64x
mov dword [esi + 0xc], eax
test edx, edx
mov edx, str._I64u
cmove edx, ecx
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call dbg.swscanf
mov dword [esp], edi
mov eax, dword [ebp - 0x2c]
call eax
mov eax, dword [esi + 8]
mov ebx, dword [esi + 0x10]
mov edi, dword [esi + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov eax, dword [esi + 4]
mov dword [esp + 4], eax
mov eax, dword [esi]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
sub esp, 0x18
mov ebx, eax
test eax, eax
jne 0x402900
xor eax, eax
test ebx, ebx
sete al
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [ebp - 0x1c]
lea eax, [ebx + ebx + 4]
mov dword [esp], eax
call ecx
mov ecx, eax
test ebx, ebx
je 0x402970
mov dword [ebp - 0x24], edi
xor ebx, ebx
xor edx, edx
mov edi, eax
mov dword [ebp - 0x38], esi
jmp 0x4027f2
movzx ebx, word [ebp - 0x10]
lea ecx, [edi + eax]
mov edx, dword [ebp - 0x18]
lea eax, [edi + eax + 4]
mov word [ecx], bx
mov ebx, dword [ebp - 0x14]
cmp dword [ebp - 0x1c], edx
jbe 0x402922
lea eax, [edx + edx]
mov ecx, eax
mov eax, dword [ebp - 0x24]
movzx esi, word [eax + edx*2]
lea eax, [edx + 1]
mov dword [ebp - 0x18], eax
lea eax, [ebx + ebx]
mov word [ebp - 0x10], si
lea esi, [edi + eax]
cmp word [ebp - 0x10], 0xd
mov dword [ebp - 0x30], esi
lea esi, [ebx + 1]
mov dword [ebp - 0x14], esi
lea esi, [edi + eax + 2]
mov dword [ebp - 0x28], esi
jne 0x4027d5
mov esi, dword [ebp - 0x24]
cmp word [esi + ecx + 2], 0xa
jne 0x4027d5
add edx, 2
cmp word [edi + eax - 2], 0
je 0x402960
lea ecx, [edi + eax]
xor ebx, ebx
lea eax, [edi + eax + 4]
mov word [ecx], bx
mov ebx, dword [ebp - 0x14]
jmp 0x4027e9
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0xc], edi
lea ebx, [eax + eax + 2]
mov dword [esi + 0x10], ebx
jmp 0x40276c
mov dword [esi + 0x10], 4
mov dword [esp], 4
call ecx
mov ecx, dword [0x414008]
mov edx, 0x412120
mov dword [esi + 0xc], eax
test ecx, ecx
mov ecx, 0x412128
jmp 0x402745
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x2c]
mov dword [esp], edi
call eax
mov edx, dword [0x4156fc]
mov dword [esp], ebx
mov dword [esp + 0xc], 0
mov dword [ebp - 0x10], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x401
call edx
mov ecx, dword [ebp - 0x14]
sub esp, 0x10
mov edi, eax
mov dword [esi + 0x10], eax
mov dword [esp], eax
call ecx
mov edx, dword [ebp - 0x10]
mov dword [esi + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x401
call edx
mov eax, dword [esi + 8]
mov ebx, dword [esi + 0x10]
sub esp, 0x10
mov edi, dword [esi + 0xc]
mov dword [ebp - 0x20], eax
jmp 0x40276c
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], 0x7da
mov dword [esp], eax
call dbg.error_code_messagebox
xor eax, eax
test ebx, ebx
sete al
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, edi
mov esi, dword [ebp - 0x38]
mov edi, dword [ebp - 0x24]
lea ebx, [ebx + ebx + 4]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x28]
xor edx, edx
mov word [ecx], dx
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x2c]
mov dword [esp], edi
call eax
mov ecx, dword [ebp - 0x10]
mov dword [esi + 0x10], ebx
mov dword [esi + 0xc], ecx
mov edi, ecx
jmp 0x40276c
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x28], ecx
jmp 0x4027e9
lea eax, [eax + 2]
mov dword [ebp - 0x28], ecx
mov ebx, 4
jmp 0x40292e