Function at 0x140022ba0
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x60
xor r13d, r13d
cmp dword [0x1400d1b20], 1
movzx edi, r8b
mov ebx, edx
mov r12, rcx
lea rsi, [0x1400d57e8]
lea rbp, [0x1400d5818]
je 0x140022d21
mov ecx, 2
xor eax, eax
lock cmpxchg dword [0x1400d1b20], ecx
test eax, eax
je 0x140022c17
sub eax, 1
je 0x140022d21
cmp eax, 1
jne 0x140022d21
lea rcx, [0x1400d1b28]
xor edx, edx
call sym.ProcessHacker.exe_PhfWaitForEvent
jmp 0x140022d21
mov r9d, 4
mov r8, rsi
mov ecx, 0x400
lea edx, [r9 + 0xa]
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jne 0x140022c47
mov eax, 0x2e
mov word [0x1400d57ea], r13w
mov word [0x1400d57e8], ax
mov r9d, 4
mov r8, rbp
mov ecx, 0x400
lea edx, [r9 + 0xb]
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jne 0x140022c7c
mov eax, 0x2c
movzx ecx, r13w
mov word [0x1400d5818], ax
mov word [0x1400d581a], cx
jmp 0x140022c8a
mov cx, word [0x1400d581a]
mov ax, word [0x1400d5818]
cmp word [0x1400d57e8], r13w
je 0x140022caf
cmp word [0x1400d57ea], r13w
jne 0x140022caf
test ax, ax
je 0x140022caf
mov byte [0x1400d5810], 1
test cx, cx
je 0x140022cb6
mov byte [0x1400d5810], r13b
mov eax, 1
xchg dword [0x1400d1b20], eax
mov edx, dword [0x1400d1b28]
test dl, 1
jne 0x140022d21
lea ecx, [rdx + 1]
mov eax, edx
lock cmpxchg dword [0x1400d1b28], ecx
cmp eax, edx
jne 0x140022cc1
mov rcx, qword [0x1400d1b30]
test rcx, rcx
je 0x140022cf1
xor edx, edx
call qword [sym.imp.ntdll.dll_NtSetEvent]
mov eax, 0xfffffffe
lock xadd dword [0x1400d1b28], eax
sub eax, 2
test eax, 0xfffffffe
jne 0x140022d21
mov rcx, qword [0x1400d1b30]
test rcx, rcx
je 0x140022d21
call qword [sym.imp.ntdll.dll_NtClose]
mov qword [0x1400d1b30], r13
cmp byte [0x1400d5810], r13b
je 0x140022d4e
test dil, dil
je 0x140022d4e
movzx r9d, word [0x1400d5818]
movzx r8d, word [0x1400d57e8]
mov edx, ebx
mov rcx, r12
call fcn.140022900
jmp 0x140022e38
neg dil
lea r9, [rsp + 0x30]
mov r8, r12
sbb eax, eax
mov ecx, 0x400
xor edx, edx
and eax, 3
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x34], r13d
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rbp
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x50], 1
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_GetNumberFormatW]
mov rbx, qword [0x1400d91a8]
xor r8d, r8d
lea ecx, [rax + rax]
mov ebp, eax
lea rdi, [rcx + 0x12]
mov esi, ecx
mov rcx, rbx
mov rdx, rdi
call fcn.14001fbe0
lock add dword [rbx + 0x18], 1
mov qword [rax + 0x10], rbx
lea rbx, [rax + 0x20]
mov qword [rax + 8], rdi
mov dword [rax], 1
mov word [rbx], si
mov word [rbx + 2], si
lea rdi, [rbx + 0x10]
shr rsi, 1
lea r9, [rsp + 0x30]
mov qword [rbx + 8], rdi
mov r8, r12
xor edx, edx
mov ecx, 0x400
mov dword [rsp + 0x28], ebp
mov word [rbx + rsi*2 + 0x10], r13w
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_GetNumberFormatW]
or rcx, 0xffffffffffffffff
test eax, eax
jne 0x140022e20
lock xadd dword [rbx - 0x20], ecx
add ecx, 0xffffffff
jne 0x140022e1c
lea rcx, [rbx - 0x20]
call fcn.14001fcd0
xor eax, eax
jmp 0x140022e38
xor eax, eax
repne scasw ax, word [rdi]
mov rax, rbx
not rcx
dec rcx
add cx, cx
mov word [rbx + 2], cx
mov word [rbx], cx
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r13
pop r12
pop rdi
ret