Function at 0x140166230
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x360
mov rax, qword [0x1401f22c8]
xor rax, rsp
mov qword [rsp + 0x350], rax
cmp edx, 1
mov rbx, r8
mov rsi, rcx
jne 0x1401662a5
xor edi, edi
lea rax, [rsp + 0x40]
lea rcx, [rsp + 0x30]
mov rdx, rbx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x34], 0x104
call fcn.1401641f0
test rdi, rdi
mov r8, qword [rsp + 0x38]
mov rcx, rsi
je 0x140166598
lea rdx, str._s__s
mov r9, rdi
call fcn.140162e20
jmp 0x1401665a4
cmp edx, 2
jne 0x1401662c5
mov rax, qword [0x1401e5d78]
add rbx, 0x3ff
mov rdi, qword [rax + 0x390]
shr rbx, 0xa
jmp 0x140166261
cmp edx, 3
jne 0x1401662e8
mov rax, qword [0x1401e5d78]
add rbx, 0xfffff
mov rdi, qword [rax + 0xda8]
shr rbx, 0x14
jmp 0x140166261
cmp edx, 4
jne 0x14016630b
mov rax, qword [0x1401e5d78]
add rbx, 0x3fffffff
mov rdi, qword [rax + 0xdb0]
shr rbx, 0x1e
jmp 0x140166261
lea r8, [rsp + 0x150]
mov r9d, 0x100
mov edx, recv
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jne 0x14016633f
mov word [rsp + 0x150], gethostbyname
mov word [rsp + 0x152], ax
cmp rbx, 0x3e8
jae 0x14016636d
mov r9, qword [0x1401e5d78]
lea rdx, str._I64u__s
mov r8, rbx
mov r9, qword [r9 + 0x2498]
mov rcx, rsi
call fcn.140162e20
jmp 0x1401665b8
mov rax, rbx
and rax, 0xfffffffffffffc00
cmp rax, 0xfa000
jae 0x140166399
mov rax, qword [0x1401e5d78]
imul rbx, rbx, 0x64
mov rdi, qword [rax + 0x390]
shr rbx, 0xa
jmp 0x140166424
mov rax, rbx
and rax, 0xfffffffffff00000
cmp rax, 0x3e800000
jae 0x1401663c2
mov rax, qword [0x1401e5d78]
imul rbx, rbx, 0x64
mov rdi, qword [rax + 0xda8]
shr rbx, 0x14
jmp 0x140166424
mov rax, rbx
movabs rcx, 0xfa00000000
and rax, 0xffffffffc0000000
cmp rax, rcx
jae 0x1401663f2
mov rax, qword [0x1401e5d78]
imul rbx, rbx, 0x64
mov rdi, qword [rax + 0xdb0]
shr rbx, 0x1e
jmp 0x140166424
mov rax, rbx
imul rbx, rbx, 0x64
shr rax, 0x28
cmp rax, 0x3e8
mov rax, qword [0x1401e5d78]
jae 0x140166419
mov rdi, qword [rax + 0x2760]
shr rbx, 0x28
jmp 0x140166424
mov rdi, qword [rax + 0x2768]
shr rbx, 0x32
test rbx, rbx
jne 0x140166440
lea rdx, str.0__s
mov r8, rdi
mov rcx, rsi
call fcn.140162e20
jmp 0x1401665b8
cmp rbx, 0xa
jae 0x14016646a
lea r8, [rsp + 0x150]
lea rdx, str.0_S0_I64u__s
mov r9, rbx
mov rcx, rsi
mov qword [rsp + 0x20], rdi
call fcn.140162e20
jmp 0x1401665b8
cmp rbx, 0x64
jae 0x140166494
lea r8, [rsp + 0x150]
lea rdx, str.0_S_I64u__s
mov r9, rbx
mov rcx, rsi
mov qword [rsp + 0x20], rdi
call fcn.140162e20
jmp 0x1401665b8
cmp rbx, 0x3e8
jae 0x1401664ea
mov r8, rbx
movabs rax, 0x47ae147ae147ae15
lea r9, [rsp + 0x150]
mov rcx, rsi
mov qword [rsp + 0x28], rdi
mul rbx
sub r8, rdx
shr r8, 1
add r8, rdx
lea rdx, str._I64u_S_02I64u__s
shr r8, 6
mov rax, r8
imul rax, rax, 0x64
sub rbx, rax
mov qword [rsp + 0x20], rbx
call fcn.140162e20
jmp 0x1401665b8
cmp rbx, 0x2710
jae 0x14016655c
movabs r8, 0xcccccccccccccccd
mov qword [rsp + 0x28], rdi
lea r9, [rsp + 0x150]
mov rax, r8
mul rbx
mov rax, r8
mov rcx, rdx
shr rcx, 3
mul rcx
shr rdx, 3
lea rax, [rdx + rdx*4]
add rax, rax
sub rcx, rax
movabs rax, 0x47ae147ae147ae15
mov qword [rsp + 0x20], rcx
mov rcx, rsi
mul rbx
sub rbx, rdx
shr rbx, 1
lea r8, [rdx + rbx]
lea rdx, str._I64u_S_I64u__s
shr r8, 6
call fcn.140162e20
jmp 0x1401665b8
cmp rbx, 0x186a0
jae 0x140166261
movabs rax, 0x47ae147ae147ae15
mov r9, rdi
mov rcx, rsi
mul rbx
sub rbx, rdx
shr rbx, 1
lea r8, [rdx + rbx]
lea rdx, str._I64u__s
shr r8, 6
call fcn.140162e20
jmp 0x1401665b8
lea rdx, [0x14019e3c0]
call fcn.140162e20
cmp dword [rsp + 0x34], 0x104
jle 0x1401665b8
mov rcx, qword [rsp + 0x38]
call fcn.1400be6d0
mov rcx, qword [rsp + 0x350]
xor rcx, rsp
call fcn.1401931f0
lea r11, [rsp + 0x360]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret