Function at 0x502d58
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff9c
mov ecx, 0x10
push ebx
push esi
push edi
xor edi, edi
mov esi, dword [ebp + 0xc]
xor eax, eax
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x10], eax
push esi
push edi
lea edi, [ebp - 0x64]
mov esi, 0x5213a4
mov ebx, 1
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [0x5213e4]
mov dword [ebp - 0x14], eax
push esi
call fcn.005041a8
pop ecx
jmp 0x502e15
mov edx, ebx
lea eax, [ebp - 0x64]
or dx, 0x400
movzx ecx, dx
or ecx, 0
mov dword [ebp - 4], ecx
push 0x40
push eax
push 0x1001
mov edx, dword [ebp - 4]
push edx
call sub.KERNEL32.DLL_GetLocaleInfoA
push 4
lea ecx, [ebp - 0x14]
push ecx
push 3
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_GetLocaleInfoA
lea edx, [ebp - 0x64]
push edx
call fcn.005041a8
pop ecx
lea ecx, [ebp - 0x14]
push ecx
call fcn.005041a8
pop ecx
lea eax, [ebp - 0x64]
push eax
push esi
call fcn.004fdd94
add esp, 8
test eax, eax
je 0x502dfc
mov edi, 1
jmp 0x502e15
lea eax, [ebp - 0x14]
push eax
push esi
call fcn.004fdd94
add esp, 8
cmp esi, eax
jne 0x502e14
mov edi, 1
jmp 0x502e15
inc ebx
test edi, edi
jne 0x502e22
cmp ebx, 0x38
jle 0x502d9b
test edi, edi
jne 0x502e55
push 0x5f
push esi
call fcn.004fda9c
add esp, 8
test eax, eax
jne 0x502e55
push 0x2e
push esi
call fcn.004fda9c
add esp, 8
test eax, eax
jne 0x502e55
push 0x20000101
call sub.KERNEL32.DLL_SetLastError
xor eax, eax
jmp 0x502fa7
test edi, edi
jne 0x502e78
mov edx, dword [ebp + 8]
cmp dword [edx + 4], 0
jne 0x502e6c
call sub.KERNEL32.DLL_GetSystemDefaultLangID
movzx ebx, ax
jmp 0x502e78
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 4]
and ebx, 0x3ff
push 0x5f
push esi
call fcn.004fda9c
add esp, 8
mov dword [ebp - 0x18], eax
test eax, eax
je 0x502f50
inc dword [ebp - 0x18]
push 0x2e
mov edx, dword [ebp - 0x18]
push edx
call fcn.004fda9c
add esp, 8
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x502eac
mov edx, dword [ebp - 0x1c]
mov byte [edx], 0
mov dword [ebp - 8], 1
xor edi, edi
jmp 0x502f26
push 0x40
lea eax, [ebp - 0x64]
push eax
push 0x1002
mov dx, word [ebp - 0xc]
shl edx, 0xa
or dx, bx
movzx ecx, dx
or ecx, 0
push ecx
call sub.KERNEL32.DLL_GetLocaleInfoA
mov dword [ebp - 8], eax
lea eax, [ebp - 0x64]
push eax
call fcn.005041a8
pop ecx
lea eax, [ebp - 0x64]
mov edx, dword [ebp - 0x18]
mov cl, byte [eax]
cmp cl, byte [edx]
jne 0x502f23
test cl, cl
je 0x502f07
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x502f23
add eax, 2
add edx, 2
test cl, cl
jne 0x502eeb
jne 0x502f23
mov ax, word [ebp - 0xc]
mov edi, 1
shl eax, 0xa
or ax, bx
movzx edx, ax
or edx, 0
mov dword [ebp - 0x10], edx
jmp 0x502f26
inc dword [ebp - 0xc]
test edi, edi
jne 0x502f30
cmp dword [ebp - 8], 0
jne 0x502eb7
test edi, edi
jne 0x502f42
push 0x20000101
call sub.KERNEL32.DLL_SetLastError
xor eax, eax
jmp 0x502fa7
cmp dword [ebp - 0x1c], 0
je 0x502f5e
mov edx, dword [ebp - 0x1c]
mov byte [edx], 0x2e
jmp 0x502f5e
or bx, 0x400
movzx ecx, bx
or ecx, 0
mov dword [ebp - 0x10], ecx
push 0x2e
push esi
call fcn.004fda9c
add esp, 8
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x502f92
push 7
lea edx, [ebp - 0x24]
push edx
push 0xb
mov ecx, dword [ebp - 0x10]
push ecx
call sub.KERNEL32.DLL_GetLocaleInfoA
lea eax, [ebp - 0x24]
push eax
call fcn.00504d7c
pop ecx
mov edx, dword [ebp + 8]
mov dword [edx], eax
jmp 0x502fa4
inc dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00504d7c
pop ecx
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret