Function at 0x440158
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x1f8
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov rax, qword [0x00460ad8]
mov qword [rsp + 0x1e0], rax
mov rbp, rcx
mov word [rsp + 0x30], 0
xor ebx, ebx
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rsi, rax
lea rdx, str.GetUserDefaultUILanguage
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x44022c
call rax
mov word [rsp + 0x30], ax
movzx ecx, ax
mov edx, ecx
mov edi, 0x3ff
and edx, edi
movzx ebx, dx
and ecx, 0xfc00
or ecx, ebx
call qword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [rsp + 0x58], eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [rsp + 0x5c], eax
lea rdx, str.GetSystemDefaultUILanguage
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov word [rsp + 0x30], ax
movzx ecx, ax
mov eax, ecx
and eax, edi
movzx ebx, ax
and cx, 0xfc00
movzx ecx, cx
or ecx, ebx
call qword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [rsp + 0x60], eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [rsp + 0x64], eax
mov ebx, 4
jmp 0x440392
call qword [sym.imp.KERNEL32.dll_GetVersion]
bt eax, 0x1f
jae 0x440317
mov qword [rsp + 0x50], rbx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.Control_PanelDesktopResourceLocale
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x440392
mov dword [rsp + 0x34], reloc.OLEAUT32.dll_SafeArrayGetDim
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x4c]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x44030a
cmp dword [rsp + 0x4c], 1
jne 0x44030a
lea r8, [rsp + 0x48]
lea rdx, [0x00447f4c]
lea rcx, [rsp + 0xb0]
call fcn.00419ba0
cmp eax, 1
jne 0x44030a
mov eax, dword [rsp + 0x48]
mov word [rsp + 0x30], ax
movzx ecx, ax
mov eax, ecx
mov edi, 0x3ff
and eax, edi
movzx ebx, ax
and cx, 0xfc00
movzx ecx, cx
or ecx, ebx
call qword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [rsp + 0x58], eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [rsp + 0x5c], eax
mov ebx, 2
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x440392
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
je 0x440392
mov word [rsp + 0x30], bx
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x20], rcx
lea r9, [0x0043fbe0]
mov edx, reloc.OLEAUT32.dll_SafeArrayGetDim
lea r8d, [rdx - 0xf]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EnumResourceLanguagesA]
movzx r11d, word [rsp + 0x30]
test r11w, r11w
je 0x440392
movzx ecx, r11w
mov eax, ecx
mov edi, 0x3ff
and eax, edi
movzx ebx, ax
and cx, 0xfc00
movzx ecx, cx
or ecx, ebx
call qword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [rsp + 0x58], eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [rsp + 0x5c], eax
mov ebx, 2
movsxd rax, ebx
mov dword [rsp + rax*4 + 0x58], 0x800
inc ebx
mov edi, 0x38
mov r8, rdi
xor edx, edx
lea rcx, [rsp + 0x78]
call fcn.00418b40
mov dword [rsp + 0x78], edi
lea rax, [0x00447f38]
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x98], 0x3e8
lea rax, [0x00400000]
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0x7c], 0x88
lea rdx, [rdi - 0x39]
lea rcx, [rsp + 0x38]
call fcn.0043fbf8
nop
mov rdx, qword [0x00462530]
test rdx, rdx
je 0x440428
mov rax, qword [rsp + 0x38]
cmp rax, 0xffffffffffffffff
jne 0x440457
lea rcx, [rsp + 0x78]
call rdx
mov qword [rsp + 0x38], rax
cmp rax, 0xffffffffffffffff
setne cl
test cl, cl
je 0x440457
jmp 0x44042d
mov rax, qword [rsp + 0x38]
mov r8, qword [0x00462540]
test r8, r8
je 0x440457
cmp rax, 0xffffffffffffffff
je 0x440457
cmp qword [rsp + 0x40], 0
jne 0x440457
lea rdx, [rsp + 0x40]
mov rcx, rax
call r8
mov rax, qword [rsp + 0x38]
xor edi, edi
movsxd rsi, ebx
test ebx, ebx
jle 0x44053e
mov ecx, dword [rsp + rdi*4 + 0x58]
cmp ecx, 0x800
jne 0x440484
lea rdx, [0x00447b9c]
lea rcx, [rsp + 0x34]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x44049d
mov r9d, 4
lea r8, [rsp + 0x34]
lea edx, [r9 - 1]
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x4404dd
lea r9, [rsp + 0x34]
mov r8, rbp
mov edx, 0x112
lea rcx, [rsp + 0xc0]
call fcn.004196e0
cmp eax, 0xffffffff
je 0x4404d6
cmp eax, 0x112
jae 0x4404d6
lea rcx, [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
jmp 0x4404d8
xor ebx, ebx
test rbx, rbx
jne 0x4404f0
inc rdi
cmp rdi, rsi
jl 0x440464
mov rax, qword [rsp + 0x38]
jmp 0x44053e
mov rax, qword [0x00462538]
test rax, rax
je 0x440539
mov rcx, qword [rsp + 0x38]
cmp rcx, 0xffffffffffffffff
je 0x440539
mov r8, qword [0x00462548]
test r8, r8
je 0x440537
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x440537
mov qword [rsp + 0x40], 0
xor ecx, ecx
call r8
mov rax, qword [0x00462538]
mov rcx, qword [rsp + 0x38]
call rax
mov rax, rbx
jmp 0x440588
mov r8, qword [0x00462538]
test r8, r8
je 0x440586
cmp rax, 0xffffffffffffffff
je 0x440586
mov r9, qword [0x00462548]
test r9, r9
je 0x440580
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x440580
mov qword [rsp + 0x40], 0
xor ecx, ecx
call r9
mov r8, qword [0x00462538]
mov rax, qword [rsp + 0x38]
mov rcx, rax
call r8
xor eax, eax
mov rcx, qword [rsp + 0x1e0]
call fcn.004306c0
add rsp, 0x1f8
pop rdi
pop rsi
pop rbp
pop rbx
ret