Function at 0x140051438
Capabilities:
Get geographical location

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov rax, qword [0x140097240]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rdi, r8
mov r15, rdx
mov r14, rcx
call fcn.140046564
mov rsi, rax
xor eax, eax
mov qword [rbp - 0x20], rax
mov dword [rbp - 0x18], eax
call fcn.140046564
lea rcx, [rbp - 0x20]
xor r12d, r12d
lea rbx, [rsi + 0xa0]
mov qword [rax + 0x3a0], rcx
lea rax, [r14 + 0x80]
mov qword [rsi + 0x98], r14
mov qword [rbx], rax
test rax, rax
je 0x1400514c0
cmp word [rax], r12w
je 0x1400514c0
mov rdx, qword [0x140082310]
lea rcx, str.america
dec edx
mov r8, rbx
call fcn.1400513b0
mov dword [rbp - 0x20], r12d
mov rax, qword [rsi + 0x98]
test rax, rax
je 0x14005154a
cmp word [rax], r12w
je 0x14005154a
mov rax, qword [rbx]
test rax, rax
je 0x1400514ef
cmp word [rax], r12w
je 0x1400514ef
lea rcx, [rbp - 0x20]
call fcn.140050d3c
jmp 0x1400514f8
lea rcx, [rbp - 0x20]
call fcn.140050e0c
cmp dword [rbp - 0x20], r12d
jne 0x1400515c0
mov rdx, qword [0x140082190]
lea r8, [rsi + 0x98]
dec edx
lea rcx, str.american
call fcn.1400513b0
test al, al
je 0x1400515b6
mov rax, qword [rbx]
test rax, rax
je 0x14005153f
cmp word [rax], r12w
je 0x14005153f
lea rcx, [rbp - 0x20]
call fcn.140050d3c
jmp 0x1400515b6
lea rcx, [rbp - 0x20]
call fcn.140050e0c
jmp 0x1400515b6
mov rax, qword [rbx]
test rax, rax
je 0x1400515a3
cmp word [rax], r12w
je 0x1400515a3
call fcn.140046564
mov rdx, rax
or rcx, 0xffffffffffffffff
mov rax, qword [rax + 0xa0]
inc rcx
cmp word [rax + rcx*2], r12w
jne 0x14005156b
cmp rcx, 3
mov eax, r12d
lea rcx, [0x140050c54]
sete al
mov dword [rdx + 0xb4], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_EnumSystemLocalesW]
test byte [rbp - 0x20], 4
jne 0x1400515b6
mov dword [rbp - 0x20], r12d
jmp 0x1400515b6
mov dword [rbp - 0x20], 0x104
call qword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [rbp - 0x18], eax
mov dword [rbp - 0x1c], eax
cmp dword [rbp - 0x20], r12d
je 0x14005169b
lea rax, [r14 + 0x100]
neg r14
lea rdx, [rbp - 0x20]
sbb rcx, rcx
and rcx, rax
call fcn.140051240
mov ebx, eax
test eax, eax
je 0x14005169b
movzx ecx, bx
call qword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x14005169b
mov ecx, dword [rbp - 0x1c]
mov edx, 1
call qword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x14005169b
test r15, r15
je 0x140051612
mov dword [r15], ebx
mov ecx, dword [rbp - 0x1c]
lea rdx, [rsi + 0x2f0]
xor r9d, r9d
lea esi, [r9 + 0x55]
mov r8d, esi
call fcn.1400485d8
test rdi, rdi
je 0x140051694
mov ecx, dword [rbp - 0x1c]
lea rdx, [rdi + 0x120]
xor r9d, r9d
mov r8d, esi
call fcn.1400485d8
mov ecx, dword [rbp - 0x1c]
mov esi, 0x40
mov r9d, esi
mov r8, rdi
mov edx, 0x1001
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x14005169b
mov ecx, dword [rbp - 0x18]
lea r8, [rdi + 0x80]
mov r9d, esi
mov edx, 0x1002
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x14005169b
lea rdx, [rdi + 0x100]
mov ecx, ebx
lea r9d, [rsi - 0x36]
lea r8d, [rsi - 0x30]
call fcn.14005487c
mov eax, 1
jmp 0x14005169d
xor eax, eax
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.14002c500
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret