Function at 0x402650
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x30
mov dword [ebp - 0x20], eax
mov dword [esp + 4], 0x7d2
mov dword [esp], eax
call dword [0x41665c]
sub esp, 8
mov esi, eax
mov dword [esp], eax
call dword [0x41668c]
mov ecx, dword [sym.imp.ucrtbase.dll_malloc]
lea edx, [eax + 1]
sub esp, 4
lea eax, [edx + edx]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], edx
mov dword [esp], eax
call ecx
mov edx, dword [ebp - 0x10]
mov dword [esp], esi
mov dword [esp + 4], eax
mov edi, eax
mov dword [esp + 8], edx
call dword [0x416690]
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0xc]
sub esp, 0xc
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x1c], eax
call eax
mov eax, dword [ebx + 8]
mov ecx, dword [ebp - 0x18]
cmp eax, 7
mov dword [ebp - 0x10], eax
je 0x402858
ja 0x402780
cmp eax, 2
jbe 0x4027b0
cmp dword [ebp - 0x10], 4
jne 0x4027b8
mov dword [ebx + 0x10], 4
mov dword [esp], 4
call ecx
mov edx, dword [0x415008]
mov ecx, 0x412208
mov dword [ebx + 0xc], eax
test edx, edx
mov edx, 0x412200
cmove edx, ecx
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sym._swscanf
mov dword [esp], edi
mov eax, dword [ebp - 0x1c]
call eax
mov eax, dword [ebx + 8]
mov esi, dword [ebx + 0x10]
mov edi, dword [ebx + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov eax, dword [ebx + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
sub esp, 0x18
mov ebx, eax
test eax, eax
jne 0x402830
xor eax, eax
test ebx, ebx
sete al
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [ebp - 0x10], 0xb
jne 0x4027b8
mov dword [ebx + 0x10], 8
mov dword [esp], 8
call ecx
mov esi, dword [0x415008]
mov edx, str._I64u
mov ecx, str._I64x
mov dword [ebx + 0xc], eax
test esi, esi
jmp 0x402713
test eax, eax
jne 0x4028d0
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x1c]
mov dword [esp], edi
call eax
mov edi, dword [0x4166fc]
mov dword [esp], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x401
call edi
mov ecx, dword [ebp - 0x14]
sub esp, 0x10
mov dword [ebx + 0x10], eax
mov dword [ebp - 0x10], eax
mov dword [esp], eax
call ecx
mov edx, dword [ebp - 0x10]
mov dword [ebx + 0xc], eax
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 0x401
call edi
mov eax, dword [ebx + 8]
mov esi, dword [ebx + 0x10]
mov edi, dword [ebx + 0xc]
sub esp, 0x10
mov dword [ebp - 0x10], eax
jmp 0x40273a
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], 0x7da
mov dword [esp], eax
call sym._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 esi, dword [ebp - 0x14]
lea eax, [esi + esi + 4]
mov dword [esp], eax
call ecx
mov dword [ebp - 0x18], eax
test esi, esi
je 0x402920
mov dword [ebp - 0x24], ebx
xor edx, edx
xor eax, eax
jmp 0x402891
mov eax, dword [ebp - 0x18]
mov word [eax + edx*2], cx
mov eax, ebx
add edx, 1
cmp dword [ebp - 0x14], eax
jbe 0x4028e8
movzx ecx, word [edi + eax*2]
lea esi, [eax + eax]
lea ebx, [eax + 1]
cmp cx, 0xd
jne 0x402880
cmp word [edi + esi + 2], 0xa
jne 0x402880
add eax, 2
test edx, edx
je 0x40288c
mov esi, dword [ebp - 0x18]
lea ecx, [edx + 0x7fffffff]
lea ebx, [ecx + ecx]
cmp word [esi + ecx*2], 0
je 0x40288c
xor ecx, ecx
add edx, 1
mov word [esi + ebx + 2], cx
jmp 0x40288c
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0xc], edi
lea esi, [eax + eax + 2]
mov dword [ebx + 0x10], esi
jmp 0x40273a
mov eax, dword [ebp - 0x18]
add edx, edx
mov ebx, dword [ebp - 0x24]
lea esi, [edx + 4]
lea ecx, [eax + edx]
lea eax, [edx + 2]
xor edx, edx
mov word [ecx], dx
mov ecx, dword [ebp - 0x18]
xor edx, edx
mov word [ecx + eax], dx
mov eax, dword [ebp - 0x1c]
mov dword [esp], edi
call eax
mov ecx, dword [ebp - 0x18]
mov dword [ebx + 0x10], esi
mov dword [ebx + 0xc], ecx
mov edi, ecx
jmp 0x40273a
mov ecx, dword [ebp - 0x18]
mov esi, 4
mov eax, 2
jmp 0x4028f9