Function at 0x520f50
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0x24
mov edx, dword [ebp + 0xc]
push ebx
push esi
or esi, 0xffffffff
cmp eax, 0xc
jl 0x52101a
mov esi, dword [edx + 4]
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
test esi, esi
js 0x520f7b
mov ebx, dword [edx]
mov dword [ebp - 0x1c], ebx
cmp esi, 5
jl 0x521041
mov edx, dword [edx + 8]
mov eax, ebx
mov ecx, ebx
shr eax, 1
and eax, 0xffffff01
shr ecx, 5
mov dword [ebp - 0x24], eax
and ecx, 0xffffff01
mov eax, ebx
mov dword [ebp - 0x10], ecx
shr eax, 2
and eax, 0xffffff01
mov dword [ebp - 0x14], eax
mov eax, ebx
shr eax, 3
and eax, 0xffffff01
mov dword [ebp - 8], eax
mov eax, ebx
shr eax, 4
and eax, 0xffffff01
mov dword [ebp + 0x10], eax
mov eax, ebx
shr eax, 6
and eax, 0xffffff01
mov dword [ebp - 0xc], eax
mov eax, ebx
shr eax, 7
and eax, 0xffffff01
mov dword [ebp - 0x18], eax
mov eax, ebx
shr eax, 8
and eax, 0xffffff01
mov dword [ebp - 0x20], eax
cmp esi, 5
jl 0x520ffd
mov byte [ebp - 1], 1
test dl, 2
jne 0x521001
mov byte [ebp - 1], 0
cmp esi, 6
jl 0x5211a0
test dl, 4
je 0x5211a0
mov al, 1
jmp 0x5211a2
cmp eax, 8
jl 0x521031
mov esi, dword [edx + 4]
mov eax, 4
cmp esi, eax
cmovg esi, eax
jmp 0x520f6d
cmp eax, 4
jl 0x520f6d
xor esi, esi
jmp 0x520f76
xor edx, edx
cmp esi, 1
jge 0x520f87
push edi
mov edi, dword [ebp + 0x14]
add edi, 0x238
push str.race
push edi
call fcn.00623d60
add esp, 8
test eax, eax
jne 0x521081
push str.fastcap
push edi
call fcn.00623d60
add esp, 8
test eax, eax
jne 0x521081
xor al, al
mov byte [ebp + 0x13], al
jmp 0x521085
mov byte [ebp + 0x13], 1
push str.fastcap
push edi
call fcn.00623d60
test eax, eax
push 0x6b0f24
push edi
setne byte [ebp - 0x14]
call fcn.00623d60
test eax, eax
push 0x6b0f10
push edi
setne byte [ebp - 8]
call fcn.00623d60
add esp, 0x18
test eax, eax
jne 0x5210d2
push str.mkrace
push edi
call fcn.00623d60
add esp, 8
test eax, eax
jne 0x5210d2
xor al, al
mov byte [ebp - 3], al
jmp 0x5210d6
mov byte [ebp - 3], 1
push str.ddracenet
push edi
call fcn.00623d60
add esp, 8
test eax, eax
jne 0x5210fe
push str.ddnet
push edi
call fcn.00623d60
add esp, 8
mov byte [ebp - 0x10], 0
test eax, eax
je 0x521102
mov byte [ebp - 0x10], 1
push str.bw
push edi
call fcn.006242d0
add esp, 8
test eax, eax
jne 0x52112a
push 0x6b7460
push edi
call fcn.00623be0
add esp, 8
mov byte [ebp - 0xc], 0
test eax, eax
jne 0x52112e
mov byte [ebp - 0xc], 1
push str.city
push edi
call fcn.00623d60
test eax, eax
push 0x6b2448
push edi
setne byte [ebp - 1]
call fcn.00623ad0
add esp, 0x10
test eax, eax
je 0x521179
push 0x6b244c
push edi
call fcn.00623ad0
add esp, 8
test eax, eax
je 0x521179
push 0x6b2450
push edi
call fcn.00623ad0
add esp, 8
mov byte [ebp - 0x18], 0
test eax, eax
jne 0x52117d
mov byte [ebp - 0x18], 1
push 0x67bf00
push edi
call fcn.00623d20
add esp, 8
mov byte [ebp - 2], 0
test eax, eax
mov al, byte [ebp - 3]
mov ah, byte [ebp + 0x13]
setne byte [ebp - 0x20]
xor edx, edx
pop edi
jmp 0x5211f8
xor al, al
cmp byte [ebp + 0x10], 0
mov byte [ebp - 2], al
jne 0x5211b3
test cl, cl
jne 0x5211b3
test al, al
je 0x5211b5
mov al, 1
cmp byte [ebp - 0x24], 0
jne 0x5211f3
cmp byte [ebp - 0x14], 0
jne 0x5211f3
test al, al
jne 0x5211f3
mov ecx, dword [ebp + 8]
xor ah, ah
mov ebx, dword [ebp - 0x14]
mov byte [ebp + 0x13], ah
mov byte [ecx], bl
mov word [ecx + 1], 0
cmp byte [ebp - 0x10], 0
mov byte [ecx + 3], 0
mov ecx, dword [ebp + 8]
jne 0x521216
test ah, ah
je 0x5211ed
test al, al
je 0x521216
mov byte [ebp + 0xb], 0
jmp 0x52121a
mov ah, 1
mov byte [ebp + 0x13], ah
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp - 0x14]
mov byte [ecx], bl
mov byte [ecx + 1], ah
mov byte [ecx + 2], ah
test al, al
je 0x5211d8
cmp byte [ebp - 0x10], 0
jne 0x5211d8
mov byte [ecx + 3], 1
jmp 0x5211e5
mov byte [ebp + 0xb], 1
mov bl, byte [ebp + 0xb]
mov byte [ecx + 4], bl
test al, al
jne 0x521233
cmp byte [ebp - 8], al
jne 0x521233
cmp byte [ebp - 0xc], al
jne 0x521233
mov byte [ecx + 5], al
jmp 0x521240
mov byte [ecx + 5], 1
test al, al
jne 0x521252
cmp byte [ebp - 0xc], al
jne 0x521252
cmp byte [ebp - 1], 0
jne 0x521252
cmp byte [ebp - 0x20], 0
jne 0x521252
mov byte [ebp + 0xb], 0
jmp 0x521259
mov ah, byte [ebp + 0x13]
mov byte [ebp + 0xb], 1
mov bl, byte [ebp + 0xb]
mov byte [ecx + 6], bl
mov ebx, dword [ebp - 8]
mov byte [ecx + 7], al
test ah, ah
jne 0x52127e
cmp byte [ebp - 0xc], 0
jne 0x52127e
cmp byte [ebp - 1], 0
jne 0x52127e
mov ah, byte [ebp + 0x13]
mov byte [ebp + 0xb], 0
jmp 0x521282
mov byte [ebp + 0xb], 1
mov ah, byte [ebp + 0xb]
mov byte [ecx + 0xb], bl
mov ebx, dword [ebp - 0x18]
mov byte [ecx + 0xc], bl
mov ebx, dword [ebp - 8]
mov byte [ecx + 8], ah
mov ah, byte [ebp + 0x13]
mov byte [ecx + 0xd], bl
mov ebx, dword [ebp - 0x18]
mov byte [ecx + 9], al
mov byte [ecx + 0xa], al
mov byte [ecx + 0xe], al
test al, al
je 0x5212b6
cmp byte [ebp - 0xc], 0
jne 0x5212b6
mov byte [ebp + 0xb], 1
jmp 0x5212ba
mov byte [ebp + 0xb], 0
mov ah, byte [ebp + 0xb]
mov byte [ecx + 0xf], ah
mov ah, byte [ebp + 0x13]
test bl, bl
jne 0x5212d1
cmp byte [ebp - 0x14], 0
jne 0x5212d1
xor bl, bl
jmp 0x5212d3
mov bl, 1
mov byte [ecx + 0x12], al
mov byte [ecx + 0x13], ah
mov eax, dword [ebp - 8]
mov byte [ecx + 0x14], al
mov eax, dword [ebp - 0x18]
mov byte [ecx + 0x15], al
mov eax, dword [ebp - 0xc]
mov byte [ecx + 0x16], al
mov al, byte [ebp + 0x13]
mov byte [ecx + 0x10], bl
mov ebx, dword [ebp - 0x10]
mov byte [ecx + 0x18], al
mov eax, ebx
xor al, 1
mov byte [ecx + 0x11], bl
mov ebx, dword [ebp - 0x1c]
mov byte [ecx + 0x19], al
mov al, byte [ebp - 2]
mov dword [ecx + 0x1a], 0x10100
mov byte [ecx + 0x17], al
mov word [ecx + 0x1e], 0
test esi, esi
js 0x521322
mov al, bl
and al, 1
mov byte [ecx + 1], al
cmp esi, 2
jl 0x5213f2
mov eax, ebx
shr eax, 9
and al, 1
mov byte [ecx], al
mov eax, ebx
shr eax, 0xb
and al, 1
mov byte [ecx + 2], al
mov eax, ebx
shr eax, 0xc
and al, 1
mov byte [ecx + 3], al
mov eax, ebx
shr eax, 0xd
and al, 1
mov byte [ecx + 4], al
mov eax, ebx
shr eax, 0xe
and al, 1
mov byte [ecx + 6], al
mov eax, ebx
shr eax, 0xf
and al, 1
mov byte [ecx + 7], al
mov eax, ebx
shr eax, 0x10
and al, 1
mov byte [ecx + 8], al
mov eax, ebx
shr eax, 0x11
and al, 1
mov byte [ecx + 9], al
mov eax, ebx
shr eax, 0x12
and al, 1
mov byte [ecx + 0xa], al
mov eax, ebx
shr eax, 0x13
and al, 1
mov byte [ecx + 0xb], al
mov eax, ebx
shr eax, 0x14
and al, 1
mov byte [ecx + 0xc], al
mov eax, ebx
shr eax, 0x15
and al, 1
mov byte [ecx + 0xd], al
mov eax, ebx
shr eax, 0x16
and al, 1
mov byte [ecx + 0xe], al
mov eax, ebx
shr eax, 0x17
and al, 1
mov byte [ecx + 0xf], al
mov eax, ebx
shr eax, 0x18
and al, 1
mov byte [ecx + 0x10], al
mov eax, ebx
shr eax, 0x19
and al, 1
mov byte [ecx + 0x11], al
mov eax, ebx
shr eax, 0x1a
and al, 1
mov byte [ecx + 0x12], al
mov eax, ebx
shr eax, 0x1b
and al, 1
mov byte [ecx + 0x13], al
mov eax, ebx
shr eax, 0x1c
and al, 1
mov byte [ecx + 0x14], al
mov eax, ebx
shr eax, 0x1d
and al, 1
mov byte [ecx + 0x15], al
cmp esi, 3
jl 0x52140b
mov eax, ebx
shr eax, 0xa
and al, 1
mov byte [ecx + 0x18], al
mov eax, ebx
shr eax, 0x1e
and al, 1
mov byte [ecx + 0x19], al
cmp esi, 4
jl 0x521416
shr ebx, 0x1f
mov byte [ecx + 0x16], bl
cmp esi, 5
jl 0x521422
mov al, dl
and al, 1
mov byte [ecx + 0x1a], al
cmp esi, 6
jl 0x521431
mov eax, edx
shr eax, 3
and al, 1
mov byte [ecx + 0x17], al
cmp esi, 7
jl 0x521454
mov eax, edx
shr eax, 4
and al, 1
mov byte [ecx + 0x1b], al
mov eax, edx
shr eax, 5
and al, 1
mov byte [ecx + 0x1c], al
mov eax, edx
shr eax, 6
and al, 1
mov byte [ecx + 0x1d], al
cmp esi, 8
jl 0x521463
mov eax, edx
shr eax, 7
and al, 1
mov byte [ecx + 0x1e], al
cmp esi, 9
mov eax, ecx
pop esi
pop ebx
jl 0x521475
shr edx, 8
and dl, 1
mov byte [ecx + 0x1f], dl
mov esp, ebp
pop ebp
ret