Function at 0x4165e9
Capabilities:
Identify system language via api
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov eax, 0x430144
call fcn.0042e9c0
mov eax, 0xa06c
call fcn.0042e9e0
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
add word [0x438c24], ax
mov ax, word [0x438c2c]
mov esi, dword [0x433064]
dec ax
add word [0x438c2e], ax
mov al, byte [esi]
sub al, 3
movzx eax, al
add eax, 3
and al, 0xfc
call fcn.0042e9e0
xor ebx, ebx
mov eax, esp
lea ecx, [ebp - 0x2c]
push ebx
push ecx
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push esi
push eax
call fcn.0042bd2b
pop ecx
pop ecx
push eax
push 0x80000001
push 0x10
call fcn.0040ebd2
pop ecx
call eax
test eax, eax
jne 0x416d4f
movsx eax, byte [0x438c1a]
imul eax, eax, 0x563fffff
dec word [0x438c2a]
mov esi, 0x1000
mov dword [0x438c44], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
add word [0x438c30], ax
push 0xd7adffff
call dword [sym.imp.USER32.dll_IsMenu]
add dword [0x438c40], eax
lea eax, [ebp - 0x78]
push eax
push ebx
push ebx
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0x2078]
push eax
push ebx
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x416d4f
mov edi, dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movsx eax, byte [0x438c1f]
push 0x238dffff
push eax
call fcn.0040a9a5
mov dword [0x438c3c], eax
mov byte [0x438c1d], bl
movsx eax, word [0x438c2a]
push eax
push 0xd38bffff
mov byte [0x438c1e], 0xfe
call fcn.0040ab0e
add dword [0x438c44], eax
add esp, 0x10
lea eax, [ebp - 0x10]
push eax
push 0x2001f
lea eax, [ebp - 0x2078]
push ebx
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x416ce4
movsx eax, byte [0x438c21]
push eax
push 0x5bf5ffff
call fcn.0040ab0e
mov byte [0x438c1e], al
push 0xc1bffff
movsx eax, byte [0x438c1d]
push eax
call fcn.0040a933
add word [0x438c26], ax
mov dword [ebp - 0x28], ebx
movsx eax, word [0x438c32]
push eax
push dword [0x438c4c]
call fcn.0040a9a5
push 0xcfafffff
push 0x4aebffff
mov byte [0x438c1b], al
call fcn.0040a9a5
add dword [0x438c50], eax
inc byte [0x438c1d]
push 0x9271ffff
mov dword [ebp - 0x18], esi
push dword [0x438c48]
call fcn.0040aac5
add esp, 0x28
mov byte [0x438c1c], al
mov dword [ebp - 0x14], 0x8000
call edi
add byte [0x438c1e], al
push 0x56ddffff
movsx eax, byte [0x438c1a]
push eax
call fcn.0040aac5
add byte [0x438c20], al
mov al, byte [0x438c34]
inc al
pop ecx
mov byte [0x438c1e], al
pop ecx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xa078]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x1078]
push eax
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x416cd7
movsx eax, word [0x438c30]
push eax
movsx eax, byte [0x438c1d]
push eax
call fcn.0040aa18
add word [0x438c32], ax
mov al, byte [0x438c1a]
push 0xaf07ffff
push 0x38cdffff
mov byte [0x438c1f], al
call fcn.0040aa83
add dword [0x438c4c], eax
add esp, 0x10
cmp dword [ebp - 0x30], 1
jne 0x416c60
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
add word [0x438c22], ax
push 0x91b9ffff
movsx eax, byte [0x438c1f]
push eax
call fcn.0040aa4f
add word [0x438c34], ax
pop ecx
movsx ax, byte [0x438c20]
inc eax
pop ecx
add word [0x438c24], ax
mov al, byte [ebp - 0x1d]
push ebx
lea ecx, [ebp - 0x40]
mov byte [ebp - 0x40], al
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 dword [ebp - 0x14]
lea eax, [ebp - 0xa078]
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
add dword [0x438c3c], 0x2221ffff
push 0x38f1ffff
push 0xfc25ffff
call fcn.0040aa18
add byte [0x438c1e], al
pop ecx
pop ecx
lea eax, [ebp - 0x50]
push 8
push ebx
push eax
lea ecx, [ebp - 0x40]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
push dword [0x438c38]
mov byte [ebp - 4], 1
push 0x1aefffff
call fcn.0040a9a5
pop ecx
mov byte [0x438c1e], al
pop ecx
movsx eax, al
push 0xabd1ffff
push 0x3ba9ffff
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, dword [0x433068]
mov dword [0x438c38], eax
mov al, byte [esi]
sub al, 3
movzx eax, al
add eax, 3
and al, 0xfc
call fcn.0042e9e0
mov eax, esp
push esi
push eax
call fcn.0042bd2b
mov esi, eax
push esi
call sub.MSVCRT.dll_strlen
add esp, 0xc
lea ecx, [ebp - 0x50]
push eax
push esi
push dword [ebp - 0x48]
push ebx
call dword [sym.imp.MSVCP60.dll_public:_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::compare_unsigned_int__unsigned_int__char_const___unsigned_int_const]
cmp eax, ebx
jne 0x416ad5
push dword [0x438c40]
push 0xf3dffff
call fcn.0040a8f9
mov byte [0x438c20], al
pop ecx
movsx ax, byte [0x438c1a]
pop ecx
mov ecx, eax
imul ecx, eax
add word [0x438c2c], cx
cmp dword [ebp - 0x38], 0x34
jae 0x416a87
push 1
pop esi
push 0x4f4dffff
mov dword [0x438c54], esi
push dword [0x438c48]
call fcn.0040a933
push 0xfe1ffff
push 0x7be1ffff
mov dword [0x438c38], eax
call fcn.0040aac5
mov dword [0x438c3c], eax
lea eax, [ebp - 0x60]
push ebx
push eax
call fcn.00404935
add esp, 0x18
cmp dword [0x438c48], ebx
mov byte [ebp - 4], 2
je 0x4169f0
cmp word [0x438c28], bx
je 0x4169f0
mov eax, esi
jmp 0x4169f2
xor eax, eax
inc eax
push 0x5c07ffff
push eax
mov dword [0x438c38], eax
call fcn.0040ab0e
mov word [0x438c2a], ax
lea eax, [ebp - 0x60]
push eax
call fcn.0040b75d
movsx eax, byte [0x438c1d]
push eax
movsx eax, word [0x438c22]
push eax
call fcn.0040aac5
add byte [0x438c18], al
mov eax, dword [ebp - 0x5c]
add esp, 0x14
cmp eax, ebx
jne 0x416a3c
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]
mov ecx, dword [ebp - 0x58]
inc ecx
push ecx
push eax
push esi
lea eax, [ebp - 0x1078]
push ebx
push eax
push dword [ebp - 0x10]
push 0x13
call fcn.0040ebd2
pop ecx
call eax
movsx eax, byte [0x438c21]
push eax
push dword [0x438c38]
call fcn.0040aa4f
add byte [0x438c18], al
dec byte [0x438c1b]
pop ecx
mov byte [ebp - 4], 1
pop ecx
push esi
lea ecx, [ebp - 0x60]
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 ax, word [0x438c2a]
or ax, word [0x438c2c]
add word [0x438c2a], ax
movsx eax, byte [0x438c1e]
push eax
push dword [0x438c54]
call fcn.0040ab0e
push dword [0x438c40]
mov word [0x438c22], ax
movsx eax, word [0x438c32]
push eax
call fcn.0040aa83
add esp, 0x10
add dword [0x438c48], eax
jmp 0x416c3e
mov esi, dword [0x43306c]
mov al, byte [esi]
sub al, 3
movzx eax, al
add eax, 3
and al, 0xfc
call fcn.0042e9e0
mov eax, esp
push esi
push eax
call fcn.0042bd2b
mov esi, eax
push esi
call sub.MSVCRT.dll_strlen
add esp, 0xc
lea ecx, [ebp - 0x50]
push eax
push esi
push dword [ebp - 0x48]
push ebx
call dword [sym.imp.MSVCP60.dll_public:_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::compare_unsigned_int__unsigned_int__char_const___unsigned_int_const]
cmp eax, ebx
jne 0x416c3e
mov esi, dword [sym.imp.USER32.dll_IsMenu]
push 0x1417ffff
call esi
add dword [0x438c58], eax
cmp dword [ebp - 0x38], 0x34
jae 0x416c10
push 0xf30fffff
push 0x5b29ffff
call fcn.0040a9de
add word [0x438c24], ax
mov eax, dword [0x438c44]
pop ecx
add eax, 0x4adfffff
pop ecx
mov dword [0x438c48], eax
call edi
add word [0x438c32], ax
lea eax, [ebp - 0x70]
push 1
push eax
call fcn.00404935
movsx eax, word [0x438c2e]
push 0x5d51ffff
push eax
mov byte [ebp - 4], 3
call fcn.0040a933
add dword [0x438c48], eax
lea eax, [ebp - 0x70]
push eax
call fcn.0040b75d
movsx eax, byte [0x438c1a]
imul eax, eax, 0xd0ddffff
add dword [0x438c48], eax
add esp, 0x14
push dword [0x438c44]
call esi
inc dword [0x438c5c]
mov byte [0x438c19], al
mov eax, dword [ebp - 0x6c]
cmp eax, ebx
jne 0x416bc9
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]
mov ecx, dword [ebp - 0x68]
inc ecx
push ecx
push eax
push 1
lea eax, [ebp - 0x1078]
push ebx
push eax
push dword [ebp - 0x10]
push 0x13
call fcn.0040ebd2
pop ecx
call eax
mov al, byte [0x438c58]
add dword [0x438c54], 0x16140000
or al, byte [0x438c18]
push 1
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 1
add byte [0x438c1f], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
movsx eax, byte [0x438c21]
push 0x9ffbffff
push eax
call fcn.0040a96f
push 0xc60fffff
push 0x4797ffff
mov dword [0x438c5c], eax
call fcn.0040ab0e
add esp, 0x10
mov byte [0x438c1e], al
push 1
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x40]
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 esi, 0x1000
call dword [sym.imp.USER32.dll_GetDesktopWindow]
add byte [0x438c1f], al
movsx eax, word [0x438c28]
push eax
push 0x4e67ffff
call fcn.0040a9de
mov word [0x438c2c], ax
xor eax, eax
cmp dword [0x438c54], ebx
pop ecx
pop ecx
mov dword [ebp - 0x18], esi
setne al
mov dword [0x438c5c], eax
mov eax, dword [0x438c50]
imul eax, eax, 0x2c67ffff
add dword [0x438c38], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xa078]
push eax
inc dword [ebp - 0x28]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x14], 0x8000
push eax
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x1078]
push eax
push dword [ebp - 0x28]
jmp 0x416805
push dword [ebp - 0x10]
push 0xf
call fcn.0040ebd2
pop ecx
call eax
dec word [0x438c26]
inc dword [ebp - 0x24]
cmp dword [0x438c4c], ebx
mov dword [ebp - 0x1c], esi
je 0x416d0b
cmp word [0x438c30], bx
mov word [0x438c22], 1
jne 0x416d12
mov word [0x438c22], bx
push 0x4d75ffff
push 0xd1fbffff
call fcn.0040aa83
add byte [0x438c1c], al
pop ecx
pop ecx
lea eax, [ebp - 0x78]
push eax
push ebx
push ebx
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0x2078]
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x4166d2
movsx eax, word [0x438c22]
push eax
push 0xa399ffff
call fcn.0040a9a5
cmp dword [0x438c3c], ebx
pop ecx
pop ecx
mov word [0x438c24], ax
je 0x416d81
cmp word [0x438c2c], bx
mov byte [0x438c1c], 1
jne 0x416d87
mov byte [0x438c1c], bl
movsx eax, word [0x438c2a]
push eax
push 0x887dffff
call fcn.0040ab0e
pop ecx
add word [0x438c2c], ax
pop ecx
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0xa084]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret