Function at 0x40a500
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ecx
mov ebx, edx
mov esi, eax
xor eax, eax
push ebp
push 0x40a53a
push dword fs:[eax]
mov dword fs:[eax], esp
xor edi, edi
mov word [ebp - 0x16], 0
mov word [ebp - 0x18], 0
mov byte [ebp - 0x1c], 0
mov byte [ebp - 0xd], 0
mov eax, dword [0x428818]
call fcn.0040a0d4
mov byte [ebp - 0xe], al
xor eax, eax
mov dword [ebp - 4], eax
mov eax, dword [0x428818]
cmp byte [eax], 0x67
jne 0x40a2aa
mov edx, ebx
mov eax, esi
call fcn.0040a120
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebx]
dec ecx
mov edx, 1
mov eax, esi
call fcn.004049a0
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 8]
call fcn.004079e0
mov eax, dword [ebp - 8]
call fcn.0040a168
mov dword [ebp - 4], eax
jmp 0x40a2c6
mov edx, dword [0x428818]
mov eax, 0x40a554
call fcn.0040bc44
test eax, eax
jle 0x40a2c6
mov eax, dword [0x4288f8]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x19]
push eax
lea ecx, [ebp - 0x10]
mov edx, ebx
mov eax, esi
call fcn.00409f2c
test al, al
je 0x40a517
mov edx, ebx
movzx ecx, byte [0x428815]
mov eax, esi
call fcn.0040a098
test al, al
je 0x40a517
lea eax, [ebp - 0x1a]
push eax
lea ecx, [ebp - 0x12]
mov edx, ebx
mov eax, esi
call fcn.00409f2c
test al, al
je 0x40a517
mov edx, ebx
movzx ecx, byte [0x428815]
mov eax, esi
call fcn.0040a098
test al, al
je 0x40a3f8
lea eax, [ebp - 0x1b]
push eax
lea ecx, [ebp - 0x14]
mov edx, ebx
mov eax, esi
call fcn.00409f2c
test al, al
je 0x40a517
movzx eax, byte [ebp - 0xe]
sub al, 1
jb 0x40a34e
je 0x40a36b
dec al
je 0x40a388
jmp 0x40a3a3
movzx edi, word [ebp - 0x14]
movzx eax, byte [ebp - 0x1b]
mov byte [ebp - 0x1c], al
movzx eax, word [ebp - 0x10]
mov word [ebp - 0x16], ax
movzx eax, word [ebp - 0x12]
mov word [ebp - 0x18], ax
jmp 0x40a3a3
movzx edi, word [ebp - 0x14]
movzx eax, byte [ebp - 0x1b]
mov byte [ebp - 0x1c], al
movzx eax, word [ebp - 0x12]
mov word [ebp - 0x16], ax
movzx eax, word [ebp - 0x10]
mov word [ebp - 0x18], ax
jmp 0x40a3a3
movzx edi, word [ebp - 0x10]
movzx eax, byte [ebp - 0x19]
mov byte [ebp - 0x1c], al
movzx eax, word [ebp - 0x12]
mov word [ebp - 0x16], ax
movzx eax, word [ebp - 0x14]
mov word [ebp - 0x18], ax
cmp dword [ebp - 4], 0
jle 0x40a3b7
push ebp
movzx eax, di
call fcn.0040a1bc
pop ecx
mov edi, eax
jmp 0x40a427
cmp byte [ebp - 0x1c], 2
ja 0x40a427
call fcn.004092fc
movzx ecx, ax
movzx eax, word [0x4257d4]
sub ecx, eax
mov eax, ecx
push ecx
mov ecx, 0x64
cdq
idiv ecx
pop ecx
imul ax, ax, 0x64
add di, ax
cmp word [0x4257d4], 0
jbe 0x40a427
movzx eax, di
cmp ecx, eax
jle 0x40a427
add di, 0x64
jmp 0x40a427
call fcn.004092fc
mov edi, eax
cmp byte [ebp - 0xe], 1
jne 0x40a417
movzx eax, word [ebp - 0x10]
mov word [ebp - 0x18], ax
movzx eax, word [ebp - 0x12]
mov word [ebp - 0x16], ax
jmp 0x40a427
movzx eax, word [ebp - 0x10]
mov word [ebp - 0x16], ax
movzx eax, word [ebp - 0x12]
mov word [ebp - 0x18], ax
mov edx, ebx
movzx ecx, byte [0x428815]
mov eax, esi
call fcn.0040a098
mov edx, ebx
mov eax, esi
call fcn.00409f08
cmp byte [0x4288d8], 0
je 0x40a501
mov edx, dword [0x428818]
mov eax, 0x40a560
call fcn.00404a28
test eax, eax
je 0x40a501
mov eax, dword [0x42882c]
movzx eax, byte [eax]
add al, 0xd0
sub al, 0xa
jae 0x40a485
mov edx, ebx
mov eax, esi
call fcn.0040a120
jmp 0x40a501
inc dword [ebx]
mov eax, esi
call fcn.0040473c
cmp eax, dword [ebx]
jl 0x40a499
mov eax, dword [ebx]
cmp byte [esi + eax - 1], 0x20
jne 0x40a483
mov edx, ebx
mov eax, esi
call fcn.00409f08
mov eax, esi
call fcn.0040473c
cmp eax, dword [ebx]
jl 0x40a501
lea eax, [ebp - 0x24]
push eax
mov eax, dword [0x428824]
call fcn.0040473c
mov ecx, eax
mov edx, dword [ebx]
mov eax, esi
call fcn.004049a0
mov edx, dword [ebp - 0x24]
mov eax, dword [0x428824]
call fcn.0040799c
test eax, eax
je 0x40a501
lea eax, [ebp - 0x28]
push eax
mov eax, dword [0x428828]
call fcn.0040473c
mov ecx, eax
mov edx, dword [ebx]
mov eax, esi
call fcn.004049a0
mov edx, dword [ebp - 0x28]
mov eax, dword [0x428828]
call fcn.0040799c
test eax, eax
jne 0x40a485
mov eax, dword [ebp - 0xc]
push eax
movzx ecx, word [ebp - 0x18]
movzx edx, word [ebp - 0x16]
mov eax, edi
call fcn.0040909c
mov byte [ebp - 0xd], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40a541
lea eax, [ebp - 0x28]
mov edx, 3
call fcn.004044a0
lea eax, [ebp - 8]
call fcn.0040447c
ret