Function at 0x521510
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c82d6
mov eax, dword fs:[0]
push eax
sub esp, 0x254
mov eax, dword [0x72cec4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x21c], esi
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x220], eax
push 0xff
lea eax, [ebp - 0x210]
mov byte [ebp - 4], 1
push eax
push 1
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
or edi, 0xffffffff
test eax, eax
je 0x52161c
push edi
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.004b6680
mov ecx, dword [ebp - 0x228]
mov edx, eax
add esp, 0xc
mov eax, dword [edx]
mov dword [ebp - 0x228], eax
mov eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [ebp - 0x224]
mov dword [ebp - 0x224], eax
mov eax, dword [edx + 8]
mov dword [edx + 4], ecx
mov ecx, dword [ebp - 0x220]
mov dword [ebp - 0x220], eax
mov dword [edx + 8], ecx
mov ecx, dword [ebp - 0x234]
test ecx, ecx
je 0x52161c
mov eax, edi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x52161c
push 4
push 2
push dword [ebp - 0x234]
call fcn.00461780
add esp, 0xc
cmp dword [ebp - 0x220], 0
je 0x521721
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00497dd0
mov eax, dword [ebp - 0x230]
mov ecx, 0x5e4db8
test eax, eax
mov byte [ebp - 4], 2
push 0x10
push dword [ebp - 0x22c]
cmovne ecx, eax
lea eax, [ebp - 0x260]
push ecx
push eax
call fcn.004c36c0
add esp, 0x18
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x250], xmm0
psrldq xmm0, 8
movd ecx, xmm0
cmp ecx, dword [ebp - 0x22c]
jge 0x521694
test ecx, ecx
jle 0x5216d9
mov eax, dword [ebp - 0x230]
mov al, byte [eax + ecx]
test al, al
jne 0x5216d9
cmp dword [ebp - 0x250], 0x814
jne 0x5216d9
cmp dword [ebp - 0x24c], 0
jne 0x5216d9
xor eax, eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x240], eax
mov eax, 0x66a660
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x23c], eax
mov eax, 2
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x238], eax
mov ecx, dword [ebp - 0x234]
mov byte [ebp - 4], 1
test ecx, ecx
je 0x521703
mov eax, edi
lock xadd dword [ecx], eax
cmp eax, 1
jne 0x521703
push 4
push eax
push dword [ebp - 0x234]
call fcn.00461780
add esp, 0xc
mov eax, dword [ebp - 0x218]
test eax, eax
je 0x521721
mov edx, dword [ebp - 0x214]
mov dword [esi], 0
mov dword [esi + 4], edx
jmp 0x5217c2
push 0xff
lea eax, [ebp - 0x210]
push eax
push 0x59
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x5217ab
push 0xffffffffffffffff
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.004b6680
add esp, 0xc
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ebp - 0x21c], ecx
mov ecx, dword [ebp - 0x214]
mov dword [eax + 4], ecx
mov ecx, dword [eax + 8]
mov dword [eax], 0
mov dword [ebp - 0x218], ecx
mov dword [eax + 8], 0
mov ecx, dword [ebp - 0x234]
mov dword [ebp - 0x214], edx
test ecx, ecx
je 0x5217ab
mov eax, edi
lock xadd dword [ecx], eax
cmp eax, 1
jne 0x5217ab
push 4
push 2
push dword [ebp - 0x234]
call fcn.00461780
add esp, 0xc
mov eax, dword [ebp - 0x21c]
mov dword [esi], eax
mov eax, dword [ebp - 0x214]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x218]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x5217ea
lock xadd dword [eax], edi
cmp edi, 1
jne 0x5217ea
push 4
push 2
push dword [ebp - 0x228]
call fcn.00461780
add esp, 0xc
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00596709
mov esp, ebp
pop ebp
ret