Function at 0x51049c
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 esi, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
xor eax, eax
test esi, esi
mov dword [ebp - 0x10], eax
mov edi, 0x6143a8
je 0x5104c6
push esi
call fcn.0050a8c4
pop ecx
mov ebx, eax
call fcn.00510998
mov eax, dword [edi]
test eax, eax
je 0x5104d8
cmp eax, 0x61437c
jne 0x510512
cmp eax, 0x61437c
jne 0x5104e6
mov dword [ebp - 0xc], 1
push 0x2c
push 1
call fcn.005082e4
add esp, 8
mov dword [edi], eax
test eax, eax
jne 0x510512
push 0xe
call sub.KERNEL32.DLL_SetLastError
push ebx
call fcn.00508be0
pop ecx
call fcn.005109a4
xor eax, eax
jmp 0x51098e
mov edx, dword [edi]
mov eax, dword [edx + 0x24]
test eax, eax
je 0x510529
push eax
call fcn.00508be0
pop ecx
mov edx, dword [edi]
xor ecx, ecx
mov dword [edx + 0x24], ecx
test ebx, ebx
je 0x510536
cmp byte [ebx], 0
jne 0x51062f
test ebx, ebx
jne 0x5105fe
cmp dword [ebp - 0xc], 0
je 0x510561
mov eax, dword [edi]
push eax
call fcn.00510e64
pop ecx
mov edx, dword [edi]
push edx
call fcn.00508be0
pop ecx
mov dword [edi], 0x61437c
jmp 0x510868
movsx esi, word [ebp + 8]
mov eax, esi
and eax, 4
cmp eax, 4
jne 0x51057f
push 0x6141a0
mov edx, dword [edi]
push edx
call fcn.00511444
add esp, 8
mov ecx, esi
and ecx, 0x10
cmp ecx, 0x10
jne 0x510599
push 0x6141ac
mov eax, dword [edi]
push eax
call fcn.00511444
add esp, 8
mov edx, esi
and edx, 0x20
cmp edx, 0x20
jne 0x5105b3
push 0x6141b7
mov ecx, dword [edi]
push ecx
call fcn.00511444
add esp, 8
mov eax, esi
and eax, 1
dec eax
jne 0x5105cb
push 0x6141bf
mov edx, dword [edi]
push edx
call fcn.00511444
add esp, 8
and esi, 2
cmp esi, 2
jne 0x5105e3
push 0x6141ca
mov ecx, dword [edi]
push ecx
call fcn.00511444
add esp, 8
push ebx
call fcn.00508be0
pop ecx
call fcn.00511df4
call fcn.005109a4
mov eax, dword [edi]
mov eax, dword [eax + 0x24]
jmp 0x51098e
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 eax, [ebp - 8]
push eax
call fcn.00513108
pop ecx
mov esi, dword [edi]
mov dword [esi], eax
xor eax, eax
mov dword [esi + 8], eax
jmp 0x510868
push str.en_US
push esi
call fcn.0050aaf8
add esp, 8
test eax, eax
je 0x510695
push esi
push edi
mov esi, 0x6141d9
mov edi, ebx
mov eax, edi
movsd dword es:[edi], dword [esi]
pop edi
pop esi
push 0x2e
push esi
call fcn.0050a65c
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
je 0x5107bb
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 0x5107bb
push str.en_GB
push esi
call fcn.0050aaf8
add esp, 8
test eax, eax
je 0x5106fb
push esi
push edi
mov esi, 0x6141e3
mov edi, ebx
mov eax, edi
movsd dword es:[edi], dword [esi]
pop edi
pop esi
push 0x2e
push esi
call fcn.0050a65c
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
je 0x5107bb
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 0x5107bb
push str.fr_FR
push esi
call fcn.0050aaf8
add esp, 8
test eax, eax
je 0x51075e
push esi
push edi
mov esi, 0x6141ed
mov edi, ebx
mov eax, edi
movsd dword es:[edi], dword [esi]
pop edi
pop esi
push 0x2e
push esi
call fcn.0050a65c
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
je 0x5107bb
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 0x5107bb
push str.de_DE
push esi
call fcn.0050aaf8
add esp, 8
test eax, eax
je 0x5107bb
push esi
push edi
mov esi, 0x6141f7
mov edi, ebx
mov eax, edi
movsd dword es:[edi], dword [esi]
pop edi
pop esi
push 0x2e
push esi
call fcn.0050a65c
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
je 0x5107bb
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, esi
mov edx, 0x6141fb
mov cl, byte [eax]
cmp cl, byte [edx]
jne 0x5107fa
test cl, cl
je 0x5107de
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x5107fa
add eax, 2
add edx, 2
test cl, cl
jne 0x5107c2
jne 0x5107fa
mov eax, dword [edi]
push eax
call fcn.00510e64
pop ecx
mov edx, dword [edi]
push edx
call fcn.00508be0
pop ecx
mov dword [edi], 0x61437c
jmp 0x510868
cmp byte [ebx], 0x4c
jne 0x510828
cmp byte [ebx + 1], 0x43
jne 0x510828
cmp byte [ebx + 2], 0x5f
jne 0x510828
push ebx
call fcn.00508be0
pop ecx
call fcn.005109a4
push esi
mov ecx, dword [edi]
push ecx
call fcn.00511210
add esp, 8
jmp 0x51098e
mov esi, dword [edi]
xor eax, eax
mov dword [esi + 8], eax
push ebx
push esi
call fcn.00510a50
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x510868
cmp dword [ebp - 0xc], 0
je 0x510855
mov edx, dword [edi]
push edx
call fcn.00508be0
pop ecx
mov dword [edi], 0x61437c
call fcn.005109a4
push ebx
call fcn.00508be0
pop ecx
xor eax, eax
jmp 0x51098e
mov edx, dword [edi]
mov ecx, dword [ebp - 0x10]
mov dword [edx + 4], ecx
push ebx
call fcn.00508be0
pop ecx
push 1
mov eax, dword [edi]
mov edx, dword [eax + 4]
push edx
call sub.KERNEL32.DLL_IsValidLocale
test eax, eax
jne 0x5108c4
mov ecx, dword [edi]
cmp dword [ecx + 8], 0
jne 0x5108c4
push 0x20000103
call sub.KERNEL32.DLL_SetLastError
cmp dword [ebp - 0xc], 0
je 0x5108b8
mov eax, dword [edi]
push eax
call fcn.00510e64
pop ecx
mov edx, dword [edi]
push edx
call fcn.00508be0
pop ecx
mov dword [edi], 0x61437c
call fcn.005109a4
xor eax, eax
jmp 0x51098e
mov edx, dword [edi]
mov ecx, dword [edx + 4]
push ecx
call sub.KERNEL32.DLL_SetThreadLocale
mov eax, dword [edi]
cmp dword [eax + 8], 0
jne 0x510975
push eax
call fcn.00510e64
mov dx, word [ebp + 8]
pop ecx
push edx
mov ecx, dword [edi]
push ecx
call fcn.00510ca8
add esp, 8
test eax, eax
jne 0x510927
push 0x20000102
call sub.KERNEL32.DLL_SetLastError
cmp dword [ebp - 0xc], 0
je 0x51091e
mov eax, dword [edi]
push eax
call fcn.00510e64
pop ecx
mov edx, dword [edi]
push edx
call fcn.00508be0
pop ecx
mov dword [edi], 0x61437c
call fcn.005109a4
xor eax, eax
jmp 0x51098e
mov edx, dword [edi]
mov ecx, dword [edx]
push ecx
call fcn.00514f24
pop ecx
test eax, eax
jne 0x510948
lea eax, [ebp - 0x28]
push eax
mov edx, dword [edi]
mov ecx, dword [edx]
push ecx
call sub.KERNEL32.DLL_GetCPInfo
test eax, eax
jne 0x51095b
call fcn.005109a4
push 0x20000106
call sub.KERNEL32.DLL_SetLastError
xor eax, eax
jmp 0x51098e
mov edx, dword [ebp - 0x28]
mov dword [0x614154], edx
call fcn.00511df4
call fcn.005109a4
mov ecx, dword [edi]
mov eax, dword [ecx + 0x24]
jmp 0x51098e
mov dword [0x614154], 1
call fcn.00511df4
call fcn.005109a4
mov edx, dword [edi]
mov eax, dword [edx + 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret