Function at 0x5022a4
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
xor eax, eax
push ebx
push esi
push edi
xor ebx, ebx
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
xor eax, eax
test edi, edi
mov dword [ebp - 0x10], eax
mov esi, 0x5186a4
je 0x5022ce
push edi
call fcn.004fd6e8
pop ecx
mov ebx, eax
call fcn.005027a8
mov eax, dword [esi]
test eax, eax
je 0x5022e0
cmp eax, 0x518678
jne 0x50231a
cmp eax, 0x518678
jne 0x5022ee
mov dword [ebp - 0xc], 1
push 0x2c
push 1
call fcn.004fc750
add esp, 8
mov dword [esi], eax
test eax, eax
jne 0x50231a
push 0xe
call sub.KERNEL32.DLL_SetLastError
push ebx
call fcn.004fc7fc
pop ecx
call fcn.005027b4
xor eax, eax
jmp 0x50279f
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
test eax, eax
je 0x502331
push eax
call fcn.004fc7fc
pop ecx
mov edx, dword [esi]
xor ecx, ecx
mov dword [edx + 0x24], ecx
test ebx, ebx
je 0x50233e
cmp byte [ebx], 0
jne 0x50243c
test ebx, ebx
jne 0x50240b
cmp dword [ebp - 0xc], 0
je 0x502369
mov ecx, dword [esi]
push ecx
call fcn.00502c74
pop ecx
mov eax, dword [esi]
push eax
call fcn.004fc7fc
pop ecx
mov dword [esi], 0x518678
jmp 0x502677
movsx edi, word [ebp + 8]
mov eax, edi
and eax, 4
cmp eax, 4
jne 0x502387
push 0x51849c
mov edx, dword [esi]
push edx
call fcn.00503254
add esp, 8
mov ecx, edi
and ecx, 0x10
cmp ecx, 0x10
jne 0x5023a1
push 0x5184a8
mov ecx, dword [esi]
push ecx
call fcn.00503254
add esp, 8
mov eax, edi
and eax, 0x20
cmp eax, 0x20
jne 0x5023bb
push 0x5184b3
mov edx, dword [esi]
push edx
call fcn.00503254
add esp, 8
mov ecx, edi
and ecx, 1
dec ecx
jne 0x5023d3
push 0x5184bb
mov eax, dword [esi]
push eax
call fcn.00503254
add esp, 8
and edi, 2
cmp edi, 2
jne 0x5023eb
push 0x5184c6
mov edx, dword [esi]
push edx
call fcn.00503254
add esp, 8
push ebx
call fcn.004fc7fc
pop ecx
call fcn.00503c0c
call fcn.005027b4
mov eax, dword [esi]
mov eax, dword [eax + 0x24]
jmp 0x50279f
call sub.KERNEL32.DLL_GetUserDefaultLCID
mov dword [ebp - 0x10], eax
push 7
lea edx, [ebp - 8]
push edx
push 0xb
mov ecx, dword [ebp - 0x10]
push ecx
call sub.KERNEL32.DLL_GetLocaleInfoA
lea ecx, [ebp - 8]
push ecx
call fcn.00504934
pop ecx
mov edi, dword [esi]
mov dword [edi], eax
xor eax, eax
mov dword [edi + 8], eax
jmp 0x502677
push str.en_US
push edi
call fcn.004fd76c
add esp, 8
test eax, eax
je 0x5024a2
push esi
push edi
mov esi, 0x5184d5
mov edi, ebx
mov eax, edi
movsd dword es:[edi], dword [esi]
pop edi
pop esi
push 0x2e
push edi
call fcn.004fd4f4
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
je 0x5025c8
mov ecx, dword [ebp - 0x14]
push esi
push edi
mov edi, ecx
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea edx, [ebx + 3]
sub edi, ecx
mov esi, edx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
jmp 0x5025c8
push str.en_GB
push edi
call fcn.004fd76c
add esp, 8
test eax, eax
je 0x502508
push esi
push edi
mov esi, 0x5184df
mov edi, ebx
mov eax, edi
movsd dword es:[edi], dword [esi]
pop edi
pop esi
push 0x2e
push edi
call fcn.004fd4f4
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
je 0x5025c8
mov ecx, dword [ebp - 0x14]
push esi
push edi
mov edi, ecx
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea edx, [ebx + 3]
sub edi, ecx
mov esi, edx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
jmp 0x5025c8
push str.fr_FR
push edi
call fcn.004fd76c
add esp, 8
test eax, eax
je 0x50256b
push esi
push edi
mov esi, 0x5184e9
mov edi, ebx
mov eax, edi
movsd dword es:[edi], dword [esi]
pop edi
pop esi
push 0x2e
push edi
call fcn.004fd4f4
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
je 0x5025c8
mov ecx, dword [ebp - 0x14]
push esi
push edi
mov edi, ecx
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea edx, [ebx + 3]
sub edi, ecx
mov esi, edx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
jmp 0x5025c8
push str.de_DE
push edi
call fcn.004fd76c
add esp, 8
test eax, eax
je 0x5025c8
push esi
push edi
mov esi, 0x5184f3
mov edi, ebx
mov eax, edi
movsd dword es:[edi], dword [esi]
pop edi
pop esi
push 0x2e
push edi
call fcn.004fd4f4
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
je 0x5025c8
mov ecx, dword [ebp - 0x14]
push esi
push edi
mov edi, ecx
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea edx, [ebx + 3]
sub edi, ecx
mov esi, edx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
mov eax, edi
mov edx, 0x5184f7
mov cl, byte [eax]
cmp cl, byte [edx]
jne 0x502607
test cl, cl
je 0x5025eb
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x502607
add eax, 2
add edx, 2
test cl, cl
jne 0x5025cf
jne 0x502607
mov ecx, dword [esi]
push ecx
call fcn.00502c74
pop ecx
mov eax, dword [esi]
push eax
call fcn.004fc7fc
pop ecx
mov dword [esi], 0x518678
jmp 0x502677
cmp byte [ebx], 0x4c
jne 0x502637
cmp byte [ebx + 1], 0x43
jne 0x502637
cmp byte [ebx + 2], 0x5f
jne 0x502637
push ebx
call fcn.004fc7fc
pop ecx
call fcn.005027b4
push edi
mov edx, dword [esi]
push edx
call fcn.00503020
add esp, 8
jmp 0x50279f
mov edi, dword [esi]
xor eax, eax
mov dword [edi + 8], eax
push ebx
push edi
call fcn.00502860
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x502677
cmp dword [ebp - 0xc], 0
je 0x502664
mov edx, dword [esi]
push edx
call fcn.004fc7fc
pop ecx
mov dword [esi], 0x518678
call fcn.005027b4
push ebx
call fcn.004fc7fc
pop ecx
xor eax, eax
jmp 0x50279f
mov edx, dword [esi]
mov ecx, dword [ebp - 0x10]
mov dword [edx + 4], ecx
push ebx
call fcn.004fc7fc
pop ecx
push 1
mov edi, dword [esi]
mov eax, dword [edi + 4]
push eax
call sub.KERNEL32.DLL_IsValidLocale
test eax, eax
jne 0x5026d3
mov edx, dword [esi]
cmp dword [edx + 8], 0
jne 0x5026d3
push 0x20000103
call sub.KERNEL32.DLL_SetLastError
cmp dword [ebp - 0xc], 0
je 0x5026c7
mov ecx, dword [esi]
push ecx
call fcn.00502c74
pop ecx
mov eax, dword [esi]
push eax
call fcn.004fc7fc
pop ecx
mov dword [esi], 0x518678
call fcn.005027b4
xor eax, eax
jmp 0x50279f
mov edx, dword [esi]
mov ecx, dword [edx + 4]
push ecx
call sub.KERNEL32.DLL_SetThreadLocale
mov eax, dword [esi]
cmp dword [eax + 8], 0
jne 0x502786
push eax
call fcn.00502c74
mov dx, word [ebp + 8]
pop ecx
push edx
mov ecx, dword [esi]
push ecx
call fcn.00502ab8
add esp, 8
test eax, eax
jne 0x502736
push 0x20000102
call sub.KERNEL32.DLL_SetLastError
cmp dword [ebp - 0xc], 0
je 0x50272d
mov eax, dword [esi]
push eax
call fcn.00502c74
pop ecx
mov edx, dword [esi]
push edx
call fcn.004fc7fc
pop ecx
mov dword [esi], 0x518678
call fcn.005027b4
xor eax, eax
jmp 0x50279f
mov edx, dword [esi]
mov ecx, dword [edx]
push ecx
call fcn.00506628
pop ecx
test eax, eax
jne 0x502757
lea edi, [ebp - 0x28]
push edi
mov eax, dword [esi]
mov edx, dword [eax]
push edx
call sub.KERNEL32.DLL_GetCPInfo
test eax, eax
jne 0x50276a
call fcn.005027b4
push 0x20000106
call sub.KERNEL32.DLL_SetLastError
xor eax, eax
jmp 0x50279f
mov edx, dword [ebp - 0x28]
mov dword [0x518450], edx
call fcn.00503c0c
call fcn.005027b4
mov ecx, dword [esi]
mov eax, dword [ecx + 0x24]
jmp 0x50279f
mov dword [0x518450], 1
call fcn.00503c0c
call fcn.005027b4
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret