Function at 0x50781320
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x30
test eax, eax
push ebx
push esi
push edi
je 0x507816fe
cmp dword [0x5078a2cc], 1
jne 0x507816fe
mov eax, dword [eax]
test eax, eax
jbe 0x507816fe
cmp eax, dword [0x5078a2d4]
ja 0x507816fe
mov edi, dword [esp + 0x44]
cmp dword [edi + 8], 4
je 0x5078136d
pop edi
pop esi
mov eax, 5
pop ebx
add esp, 0x30
ret 0xc
mov eax, dword [0x5078a2c8]
test eax, eax
je 0x50781384
pop edi
pop esi
mov eax, 0x920002
pop ebx
add esp, 0x30
ret 0xc
mov eax, dword [edi]
push eax
call fcn.50782db2
mov esi, eax
inc esi
push esi
call fcn.50782978
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [esp + 0x10], ebx
jne 0x507813b0
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x30
ret 0xc
mov edx, dword [edi]
lea ecx, [esp + 0x44]
push ecx
push 0x507880f0
push esi
push ebx
push esi
push edx
push 0
push 0
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
test eax, eax
je 0x507816e7
mov eax, dword [esp + 0x44]
test eax, eax
jne 0x507816e7
mov si, word [edi + 0xc]
push 0x50789130
push ebx
mov dword [esp + 0x14], esi
call fcn.50782d9f
add esp, 8
mov dword [0x5078a2c8], eax
test eax, eax
je 0x507816d0
push eax
push 1
lea eax, [esp + 0x28]
push 0x1c
push eax
call fcn.50784da2
mov eax, dword [esp + 0x30]
add esp, 0x10
cmp eax, 0x779ff321
jne 0x507816b4
cmp dword [esp + 0x28], 0x40
jne 0x507816b4
mov ecx, dword [esp + 0x24]
xor edx, edx
shr ecx, 0x10
mov dl, ch
cmp dl, 3
jne 0x507816b4
mov eax, dword [0x5078a2c8]
push 0
push 0x193
push eax
call fcn.50784da2
mov ecx, dword [0x5078a2c8]
mov dword [0x50789ebc], 0
push ecx
call fcn.50782b6d
mov ebx, dword [0x50789ebc]
mov edx, dword [0x5078a2c8]
and eax, 0xff
push edx
shl eax, 0x10
or ebx, eax
mov dword [0x50789ebc], ebx
call fcn.50782b6d
mov ebx, dword [0x50789ebc]
mov edx, dword [0x5078a2c8]
xor ecx, ecx
push edx
mov ch, al
or ebx, ecx
mov dword [0x50789ebc], ebx
call fcn.50782b6d
mov ebx, dword [0x50789ebc]
and eax, 0xff
or ebx, eax
mov eax, dword [0x5078a2c8]
push 0
push 0x10
push eax
mov dword [0x50789ebc], ebx
call fcn.50784da2
mov ecx, dword [0x5078a2c8]
mov dword [0x50789e84], 0
push ecx
call fcn.50782b6d
mov ebx, dword [0x50789e84]
mov edx, dword [0x5078a2c8]
and eax, 0xff
push edx
shl eax, 0x10
or ebx, eax
mov dword [0x50789e84], ebx
call fcn.50782b6d
mov edx, dword [0x5078a2c8]
xor ecx, ecx
mov ch, al
mov eax, dword [0x50789e84]
or eax, ecx
push edx
mov dword [0x50789e84], eax
call fcn.50782b6d
mov ecx, dword [0x50789e84]
and eax, 0xff
add esp, 0x30
or ecx, eax
mov eax, dword [0x50789ebc]
mov dword [0x50789e84], ecx
mov ebx, 0
lea edi, [eax + eax*2 + 0x196]
mov dword [0x50789e80], edi
jbe 0x507815be
mov esi, 0x50789ec8
mov eax, dword [0x5078a2c8]
mov dword [esi - 4], edi
push eax
mov dword [esi], 0
call fcn.50782b6d
mov ecx, dword [esi]
and eax, 0xff
shl eax, 0x10
or ecx, eax
mov dword [esi], ecx
mov ecx, dword [0x5078a2c8]
push ecx
call fcn.50782b6d
xor edx, edx
mov dh, al
mov eax, dword [esi]
or eax, edx
mov dword [esi], eax
mov eax, dword [0x5078a2c8]
push eax
call fcn.50782b6d
mov ecx, dword [esi]
and eax, 0xff
or ecx, eax
add esp, 0xc
mov eax, ecx
mov dword [esi], ecx
add edi, eax
mov eax, dword [0x50789e84]
inc ebx
add esi, 8
cmp ebx, eax
jb 0x50781553
mov eax, dword [0x50789ebc]
mov esi, dword [esp + 0xc]
shr eax, 1
push eax
call fcn.50782630
mov ecx, dword [0x50789ebc]
mov dword [0x50789ea8], eax
shr ecx, 2
push ecx
call fcn.50782630
mov dword [0x50789eac], eax
mov eax, dword [0x50789ebc]
shr eax, 2
lea edx, [eax + eax*2]
push edx
call fcn.50782630
mov ecx, dword [0x50789ea8]
mov dword [0x50789eb0], eax
mov eax, dword [0x50789e98]
push eax
push ecx
call fcn.507826a0
mov edx, dword [0x50789e9c]
mov eax, dword [0x50789eac]
push edx
push eax
call fcn.507826a0
mov ecx, dword [0x50789ea0]
mov edx, dword [0x50789eb0]
push ecx
push edx
call fcn.507826a0
push 4
call fcn.50782a04
mov ecx, dword [esp + 0x70]
add esp, 0x28
mov dword [ecx + 4], eax
mov dword [eax], 1
mov eax, dword [ecx]
mov dword [ecx + 0x10], 1
test eax, eax
je 0x5078165c
mov edx, dword [ecx + 8]
test edx, edx
jbe 0x5078165c
mov word [eax], 0
mov edi, dword [esp + 0x40]
mov dword [ecx + 0xc], 0
mov word [ecx + 0x14], si
lea eax, [esp + 0x14]
mov word [edi + 8], si
push 0xa
push eax
and esi, 0xffff
push 0x1004
push esi
call dword [sym.imp.kernel32.dll_GetLocaleInfoA]
test eax, eax
jle 0x5078169c
lea ecx, [esp + 0x14]
push ecx
call fcn.50782b62
add esp, 4
mov dword [edi + 4], eax
mov edx, dword [esp + 0x10]
push edx
call fcn.50782a12
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x30
ret 0xc
mov eax, dword [0x5078a2c8]
push eax
call fcn.50782a5a
add esp, 4
mov eax, 0x860003
pop edi
pop esi
pop ebx
add esp, 0x30
ret 0xc
push ebx
call fcn.50782a12
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebx
add esp, 0x30
ret 0xc
push ebx
call fcn.50782a12
add esp, 4
mov eax, 0x8e0002
pop edi
pop esi
pop ebx
add esp, 0x30
ret 0xc
pop edi
pop esi
mov eax, 0x810002
pop ebx
add esp, 0x30
ret 0xc