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

Disassembly:
sub esp, 0x4c
push ebx
push ebp
push esi
lea eax, [esp + 0x10]
push edi
push eax
push 0x2001f
push 0
push 0x42e2dc
push reloc.WS2_32.dll_bind
mov byte [esp + 0x27], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebp, dword [esp + 0x60]
test eax, eax
jne 0x402e2e
mov al, byte [esp + 0x64]
test al, al
je 0x402d3f
mov eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
test eax, eax
jne 0x402d1b
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
inc ecx
push ecx
mov ecx, dword [esp + 0x18]
push eax
push 1
push 0
push 0x42e2d4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x402e17
jmp 0x402e12
lea edx, [esp + 0x60]
lea eax, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0
push 0x42e2d4
push edx
mov dword [esp + 0x78], 0x40
mov dword [esp + 0x30], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402e17
mov eax, dword [esp + 0x60]
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
mov byte [esp + eax + 0x1c], 0
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
cmp ebx, 0xfffffffd
jbe 0x402d9c
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x402dc2
mov al, byte [ecx - 1]
test al, al
je 0x402dc2
cmp al, 0xff
je 0x402dc2
test ebx, ebx
jne 0x402de8
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x402e12
test ebx, ebx
jne 0x402dd2
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x402e12
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x402dde
cmp eax, ebx
jae 0x402df1
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
mov byte [esp + 0x13], 1
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [esp + 0x13]
test al, al
jne 0x402ee3
mov al, byte [esp + 0x64]
mov esi, 0x430390
test al, al
jne 0x402e40
mov esi, 0x42e2cc
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
cmp ebx, 0xfffffffd
jbe 0x402e59
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x402e89
mov al, byte [ecx - 1]
test al, al
je 0x402e89
cmp al, 0xff
je 0x402e89
test ebx, ebx
jne 0x402eb9
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
test ebx, ebx
jne 0x402ea3
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x402eaf
cmp eax, ebx
jae 0x402ec2
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret