Function at 0x509450
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7734c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x180
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], esi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 4], 7
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x1c]
mov byte [eax], 0
mov ebx, dword [edx + 0x78]
mov dword [ebp - 4], 2
mov eax, edi
cmp edi, ebx
jae 0x5094be
cmp byte [eax], 0xa
je 0x509827
inc eax
cmp eax, ebx
jb 0x5094b0
mov dword [ebp - 0x18], ebx
cmp edi, ebx
jb 0x5094c9
mov esi, ebx
jmp 0x5094e2
mov eax, ebx
sub eax, edi
push eax
push 0x3d
push edi
call fcn.00744530
add esp, 0xc
lea esi, [eax + 1]
test eax, eax
jne 0x5094e2
mov esi, ebx
push 4
mov edx, dword [ebp + 0xc]
mov ecx, edi
push str.city
mov dword [ebp - 0x14], edx
call fcn.0051bfc0
mov edx, dword [ebp - 0x14]
movzx eax, al
test eax, eax
je 0x50951e
lea edx, [edi + 4]
cmp edx, esi
jae 0x509712
cmp byte [edx], 0x20
jne 0x509712
inc edx
cmp edx, esi
jb 0x50950b
jmp 0x509712
push 9
mov ecx, edi
push str.regionidx
call fcn.0051bfc0
movzx eax, al
test eax, eax
jne 0x509567
mov dword [ebp - 4], 1
mov dword [ebp - 4], 1
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov ebx, dword [eax + 0x78]
mov edx, edi
cmp edi, ebx
jae 0x5097a8
cmp byte [edx], 0xa
je 0x509824
inc edx
cmp edx, ebx
jb 0x509554
jmp 0x5097a8
mov edx, dword [ebp - 0x18]
cmp esi, edx
jae 0x509578
cmp byte [esi], 0x20
jne 0x509578
inc esi
cmp esi, edx
jb 0x50956e
mov ebx, esi
mov eax, edx
sub eax, esi
mov dword [ebp - 0x38], eax
xor edi, edi
xor ecx, ecx
cmp esi, edx
jae 0x5095b1
xor edx, edx
movsx eax, byte [edx + ebx]
cmp eax, 0x30
jl 0x5095b1
cmp eax, 0x39
jg 0x5095b1
lea ecx, [edi + edi*4]
lea edi, [eax + ecx*2]
add edi, 0xffffffd0
lea esi, [edx + ebx + 1]
inc edx
mov ecx, 1
cmp edx, dword [ebp - 0x38]
jb 0x50958b
test ecx, ecx
add esp, 0xfffffff0
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x48]
mov dword [esp], str.INSERT_INTO_MP_CITIES_OBS__id_city_region_id___VALUES___i___q___i__
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp + 0xc], edi
call fcn.0051fe70
add esp, 0x10
mov ebx, eax
add esp, 0xffffffec
mov edi, dword [ebp - 0x1c]
xor esi, esi
mov dword [esp + 0xc], esi
mov eax, dword [edi + 4]
mov edx, ebx
mov dword [esp + 0x10], esi
xor ecx, ecx
call fcn.005037fc
add esp, 0x14
test ebx, ebx
je 0x50966e
cmp dword [0x830380], 0
je 0x509663
mov eax, dword [0x84f788]
test eax, eax
je 0x509619
push eax
mov dword [esp], eax
call dword [0x8303c8]
pop ecx
push eax
mov dword [esp], ebx
call dword [0x8303a4]
pop ecx
mov edx, dword [0x84f3a0]
sub edx, eax
mov eax, dword [0x84f3c4]
mov dword [0x84f3a0], edx
cmp edx, eax
jge 0x50963d
mov edx, eax
push eax
mov dword [0x84f3c4], edx
mov dword [esp], ebx
call dword [0x83039c]
pop ecx
mov eax, dword [0x84f788]
test eax, eax
je 0x50966e
push eax
mov dword [esp], eax
call dword [0x8303d0]
jmp 0x50966d
push eax
mov dword [esp], ebx
call dword [0x83039c]
pop ecx
mov esi, dword [ebp - 0x48]
mov edx, dword [ebp - 0x4c]
mov ebx, edx
cmp esi, edx
je 0x509533
mov eax, 1
push eax
push edx
push esi
call fcn.00743960
add esp, 0xc
mov edx, dword [ebp - 0x4c]
sub edx, ebx
add edx, esi
mov dword [ebp - 0x4c], edx
jmp 0x509533
mov dword [ebp - 0x24], edx
mov eax, esi
sub eax, edx
mov dword [ebp - 0x30], eax
xor ecx, ecx
cmp edx, esi
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], ecx
jae 0x509762
xor eax, eax
mov ecx, dword [ebp - 0x24]
movsx ecx, byte [eax + ecx]
cmp ecx, 0x30
mov dword [ebp - 0x20], ecx
jl 0x509762
cmp dword [ebp - 0x20], 0x39
jg 0x509762
mov dword [ebp - 0x2c], 1
mov edx, dword [ebp - 0x28]
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*2]
add ecx, 0xffffffd0
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x24]
lea edx, [eax + edx + 1]
inc eax
cmp eax, dword [ebp - 0x30]
jb 0x50972a
cmp dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x28]
cmp ebx, esi
mov dword [ebp - 0x34], eax
jae 0x509786
xor ebx, ebx
add ebx, esi
lea ecx, [ebp - 0x5c]
push ebx
push esi
call fcn.00583ef0
mov edx, dword [ebp + 0xc]
jmp 0x50951e
sub ebx, esi
je 0x509772
movsx eax, byte [ebx + esi - 1]
cmp eax, 0xd
je 0x5097a3
cmp eax, 0xa
je 0x5097a3
cmp eax, 0x20
je 0x5097a3
cmp eax, 9
jne 0x509772
dec ebx
jne 0x50978a
jmp 0x509772
mov edx, ebx
push 4
mov ecx, edi
push str._end
call fcn.0051bfc0
movzx eax, al
test eax, eax
je 0x5094a3
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x48]
lea eax, [ebp - 0x5c]
cmp edx, eax
je 0x5097ee
test edx, edx
je 0x5097ee
mov eax, dword [ebp - 0x5c]
sub eax, edx
cmp eax, 0x80
jbe 0x509810
push edx
call fcn.007424fc
pop ecx
mov edi, dword [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov edi, dword [ebp - 0x44]
mov esi, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
add esp, 0xfffffff8
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.005d3210
add esp, 8
jmp 0x5097eb
inc edx
jmp 0x5097aa
lea ebx, [eax + 1]
jmp 0x5094be