Function at 0x521d00
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x64916c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push 0x5c93e0
push esi
call fcn.005a0eb0
add esp, 8
test eax, eax
je 0x521d5d
mov eax, dword [0x6b40d4]
test eax, eax
je 0x521d39
push eax
call fcn.00565600
add esp, 4
push 0x778a1db
call fcn.00565530
mov ebx, eax
push 0x778a1db
push 0
push ebx
mov dword [ebp - 0x60], ebx
mov dword [0x6b40d4], ebx
call fcn.0059ea70
jmp 0x521d91
mov eax, dword [0x6b40d0]
test eax, eax
je 0x521d6f
push eax
call fcn.00565600
add esp, 4
push 0x778a1db
call fcn.00565530
push 0x778a1db
push 0
push eax
mov dword [ebp - 0x60], eax
mov dword [0x6b40d0], eax
call fcn.0059ea70
mov ebx, dword [ebp - 0x60]
add esp, 0x10
test ebx, ebx
je 0x522a87
push esi
call fcn.005530d0
add esp, 4
test eax, eax
je 0x522a87
push edi
push 1
push 0x5c93d4
call fcn.00552e20
mov edi, eax
add esp, 8
test edi, edi
je 0x522a81
push 0
push edi
push 1
push 0x5c07d0
call fcn.0052fc40
add esp, 0x10
test eax, eax
je 0x522a69
mov esi, eax
imul esi, esi, 0x187b
push 0
push edi
push 1
add esi, ebx
push 0x5c93cc
mov word [esi + 0x59], ax
call fcn.0052fc40
push 0x6b7d14
push edi
push 1
push 0x5c93c4
mov byte [esi + 0x20], 0
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
mov dword [esi + 0x3e], 0
call fcn.00552ee0
add esp, 0x20
test eax, eax
je 0x521e3a
push 0
push 0x6b7d14
call fcn.0052fd40
add esp, 8
mov dword [esi + 0x3e], eax
push 1
push edi
push 1
push 0x5c93bc
call fcn.0052fc40
add esp, 0x10
mov word [esi + 0x4c], ax
test ax, ax
jne 0x521e5e
mov eax, 1
mov word [esi + 0x4c], ax
push 0
push edi
push 1
push 0x5c93b0
call fcn.0052fc40
add esp, 0x10
xor ecx, ecx
test eax, eax
je 0x521e7f
inc ecx
test al, 1
jne 0x521e7f
shr eax, 1
jne 0x521e76
push 0
push edi
push 1
push 0x5c93ac
mov byte [esi + 0x4e], cl
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c93a4
mov byte [esi + 0x4f], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9398
mov word [esi + 0x916], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c938c
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
call fcn.0052fc40
add esp, 0x40
push 1
push edi
push 1
push 0x5c9384
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
call fcn.0052fc40
add esp, 0x10
cmp eax, 1
jge 0x521ef5
mov eax, 1
jmp 0x521eff
cmp eax, 3
jle 0x521eff
mov eax, 3
push 0
push edi
push 1
push 0x5c937c
mov byte [esi + 0x53], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9378
mov word [esi + 0x57], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9374
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
call fcn.0052fc40
push 1
push edi
push 1
push 0x5c9368
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
call fcn.0052fc40
add esp, 0x40
push 1
push edi
push 1
push 0x5c935c
mov word [esi + 0x168], ax
call fcn.0052fc40
push 1
push edi
push 1
push 0x5c9350
mov word [esi + 0x16a], ax
call fcn.0052fc40
push 1
push edi
push 1
push 0x5c9344
mov word [esi + 0x16c], ax
call fcn.0052fc40
push 1
push edi
push 1
push 0x5c9338
mov word [esi + 0x16e], ax
call fcn.0052fc40
add esp, 0x40
push 1
push edi
push 1
push 0x5c932c
mov word [esi + 0x170], ax
call fcn.0052fc40
push 0xa
push edi
push 1
push 0x5c931c
mov word [esi + 0x172], ax
call fcn.0052fc40
push 0x6b7d14
push edi
push 1
push 0x5c9314
mov byte [esi + 0x174], al
xor ebx, ebx
call fcn.00552ee0
add esp, 0x30
test eax, eax
je 0x522009
push ebx
push 0x6b7d14
call fcn.0052fd40
add esp, 8
mov ebx, eax
push 0
push edi
mov ecx, ebx
sar ecx, 0x10
push 1
push 0x5c930c
mov word [esi + 0x8f5], cx
mov word [esi + 0x175], bx
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9300
mov word [esi + 0x177], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c92f4
mov byte [esi + 0x17b], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c92e4
mov word [esi + 0x179], ax
call fcn.0052fc40
add esp, 0x40
push 0x6b7d14
push edi
push 1
push 0x5c92d8
mov byte [esi + 0x17c], al
xor ebx, ebx
call fcn.00552ee0
add esp, 0x10
test eax, eax
je 0x5220a5
push 0x6b7d14
call fcn.0052fc80
mov ebx, eax
add esp, 4
and ebx, 0x7ff
push 0
push edi
push 1
push 0x5c92cc
mov word [esi + 0x17d], bx
call fcn.0052fc40
add esp, 0x10
test eax, eax
je 0x5220ce
mov edx, 0x800
or word [esi + 0x17d], dx
push 0x6b7d14
push edi
push 1
push 0x5c92c0
xor ebx, ebx
call fcn.00552ee0
add esp, 0x10
test eax, eax
je 0x5220fe
push 0x6b7d14
call fcn.0052fc80
mov ebx, eax
add esp, 4
and ebx, 0xf0000
push 0
push edi
push 1
push 0x5c92b4
mov dword [esi + reloc.MSVCRT.dll_strncpy], ebx
call fcn.0052fc40
add esp, 0x10
test eax, eax
je 0x522124
or dword [esi + reloc.MSVCRT.dll_strncpy], 0x80000
push 0
push edi
push 1
push 0x5c92a4
call fcn.0052fc40
add esp, 0x10
test eax, eax
je 0x522140
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
push 0
push edi
push 1
push 0x5c9290
call fcn.0052fc40
add esp, 0x10
test eax, eax
je 0x52215c
mov byte [esi + 0x187a], al
push 0
push edi
push 1
push 0x5c9284
call fcn.0052fc40
add esp, 0x10
test eax, eax
je 0x522179
mov word [esi + 0x632], ax
push 0
push edi
push 1
push 0x5c9278
call fcn.0052fc40
add esp, 0x10
mov byte [esi + 0x15d7], al
cmp al, 1
jge 0x52219c
mov byte [esi + 0x15d7], 1
push 0x6b7d14
push edi
push 1
push 0x5c9264
mov dword [ebp - 0x58], 1
call fcn.00552ee0
add esp, 0x10
test eax, eax
je 0x52221c
lea esp, [esp]
push 0x2c
push 0x6b7d14
call fcn.0059fd2f
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x5221fd
push 0
push 0x6b7d14
mov byte [ebx], 0
call fcn.0052fbc0
push 0
inc ebx
push ebx
mov dword [ebp - 0x5c], eax
call fcn.0052fd40
mov ecx, dword [ebp - 0x5c]
add esp, 0x10
mov byte [esi + ecx + 0x17f], al
mov eax, dword [ebp - 0x58]
push 0x6b7d14
inc eax
push edi
push eax
push 0x5c9264
mov dword [ebp - 0x58], eax
call fcn.00552ee0
add esp, 0x10
test eax, eax
jne 0x5221c0
push 0x6b7d14
push edi
push 1
push 0x5c9250
mov dword [ebp - 0x58], 1
call fcn.00552ee0
add esp, 0x10
test eax, eax
je 0x52229c
lea esp, [esp]
push 0x2c
push 0x6b7d14
call fcn.0059fd2f
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x52227d
push 0
push 0x6b7d14
mov byte [ebx], 0
call fcn.0052fbc0
push 0
inc ebx
push ebx
mov dword [ebp - 0x5c], eax
call fcn.0052fd40
mov edx, dword [ebp - 0x5c]
add esp, 0x10
mov byte [esi + edx + 0x188], al
mov eax, dword [ebp - 0x58]
push 0x6b7d14
inc eax
push edi
push eax
push 0x5c9250
mov dword [ebp - 0x58], eax
call fcn.00552ee0
add esp, 0x10
test eax, eax
jne 0x522240
push 0
push edi
push 1
push 0x5c9240
call fcn.0052fc40
add esp, 0x10
test eax, eax
je 0x5222b9
mov word [esi + 0x21e], ax
push 0
push edi
push 1
push 0x5c9284
call fcn.0052fc40
add esp, 0x10
test eax, eax
je 0x5222d6
mov word [esi + 0x632], ax
push 0
push edi
push 1
push 0x5c9230
call fcn.0052fc40
add esp, 0x10
test eax, eax
je 0x5222f3
mov word [esi + 0x1aa], ax
push 0x200000
push edi
push 1
push 0x5c9228
xor ebx, ebx
call fcn.0052fc40
shr eax, 0x10
add esp, 0x10
and eax, 0x7f
je 0x522324
inc ebx
test al, 1
jne 0x52231b
shr eax, 1
jne 0x522312
test ebx, ebx
je 0x522324
cmp ebx, 8
jle 0x522329
mov ebx, 4
push 0
push edi
push 1
push 0x5c9224
mov byte [esi + 0x54], bl
call fcn.0052fc40
push 0x6b7d14
push edi
mov word [esi + 0x15a7], ax
xor eax, eax
push 1
push 0x5c9218
mov word [esi + 0x15c4], ax
call fcn.00552ee0
add esp, 0x20
test eax, eax
je 0x5223b2
push 0x50
lea ecx, [ebp - 0x54]
push 0
push ecx
call fcn.0059ea70
push 3
lea edx, [ebp - 0x54]
push edx
push 0x6b7d14
call fcn.0052ff30
add esp, 0x18
cmp eax, 3
jne 0x5223b2
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
and eax, 0xfff8
shl eax, 5
and ecx, 0xfc
add eax, ecx
sar edx, 3
and edx, 0x1f
lea eax, [edx + eax*8]
mov word [esi + 0x15c4], ax
push 0x1f4
push edi
push 1
push 0x5c9208
call fcn.0052fc40
push 0x1f4
push edi
push 1
push 0x5c91f4
mov word [esi + 0x1766], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c91e8
mov word [esi + 0x1768], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c91e0
mov word [esi + 0x176a], ax
call fcn.0052fc40
add esp, 0x40
cdq
push 0
push edi
xor eax, edx
sub eax, edx
push 1
push 0x5c91d8
mov word [esi + 0x15cb], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c91d0
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
call fcn.0052fc40
push 0x4b
push edi
push 1
push 0x5c91c4
mov byte [esi + 0x15c6], al
call fcn.0052fc40
push 0x64
push edi
push 1
push 0x5c91b8
mov word [esi + 0x15b6], ax
call fcn.0052fc40
add esp, 0x40
push 0
push edi
push 1
push 0x5c91b4
mov word [esi + 0x15b8], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c91b0
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c91a4
mov word [esi + 0x15af], ax
call fcn.0052fc40
mov ecx, dword [esi + reloc.MSVCRT.dll_strncpy]
add esp, 0x30
mov word [esi + 0x15ad], ax
test ecx, ecx
je 0x5224d1
shr ecx, 1
cmp ecx, 1
jge 0x5224cb
mov ecx, 1
mov dword [esi + reloc.MSVCRT.dll_strncpy], ecx
movzx ecx, word [esi + 0x15af]
test cx, cx
je 0x5224f0
shr ecx, 1
cmp ecx, 1
jge 0x5224e9
mov ecx, 1
mov word [esi + 0x15af], cx
test ax, ax
je 0x52250b
movzx eax, ax
shr eax, 1
cmp eax, 1
jge 0x522504
mov eax, 1
mov word [esi + 0x15ad], ax
push 0x5a
push edi
push 1
push 0x5c9198
call fcn.0052fc40
push 1
push edi
push 1
push 0x5c9188
mov byte [esi + 0x15b5], al
call fcn.0052fc40
push 1
push edi
push 1
push 0x5c9174
mov byte [esi + 0x15b1], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9168
mov byte [esi + 0x15b2], al
call fcn.0052fc40
add esp, 0x40
push 0
push edi
push 1
push 0x5c9160
mov byte [esi + 0x15b3], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9154
mov word [esi + 0x179d], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9148
mov byte [esi + 0x1788], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9138
mov byte [esi + 0x1789], al
call fcn.0052fc40
add esp, 0x40
push 0
push edi
push 1
push 0x5c9128
mov byte [esi + 0x178a], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9118
mov byte [esi + 0x178b], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c910c
mov byte [esi + 0x178c], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9104
mov byte [esi + 0x1798], al
call fcn.0052fc40
add esp, 0x40
push 0
push edi
push 1
push 0x5c90f8
mov byte [esi + 0x15b4], al
call fcn.0052fc40
mov word [esi + 0x15ba], ax
push 0
push edi
push 1
push 0x5c90ec
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c90e4
mov word [esi + 0x15bc], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c90d8
mov word [esi + 0x15c2], ax
call fcn.0052fc40
add esp, 0x40
push 0
push edi
push 1
push 0x5c90cc
mov word [esi + 0x15be], ax
call fcn.0052fc40
push 0x6b7d14
push edi
push 1
push 0x5c90c0
mov word [esi + 0x15c0], ax
xor ebx, ebx
call fcn.00552ee0
add esp, 0x20
test eax, eax
je 0x5226ac
push 0x6b7d14
call fcn.0052fc80
add esp, 4
mov ebx, eax
lea ecx, reloc.MSVCRT.dll_strncpy
push edi
push ecx
mov dword [esi + reloc.MSVCRT.dll_strncpy], ebx
call fcn.00530a50
push 0x6b7d14
push edi
push 1
push 0x5c90b0
mov dword [ebp - 0x58], 1
call fcn.00552ee0
add esp, 0x18
test eax, eax
je 0x522741
lea ebx, reloc.MSVCRT.dll_strncpy
cmp dword [ebp - 0x58], 3
jg 0x522741
push 0x50
lea edx, [ebp - 0x54]
push 0
push edx
call fcn.0059ea70
push 0xa
lea eax, [ebp - 0x54]
push eax
push 0x6b7d14
call fcn.0052ff30
add esp, 0x18
cmp eax, 2
jne 0x522741
mov cx, word [ebp - 0x54]
mov eax, dword [ebp - 0x58]
push 0x6b7d14
inc eax
mov word [ebx - 2], cx
mov dx, word [ebp - 0x50]
push edi
push eax
mov word [ebx], dx
push 0x5c90b0
mov dword [ebp - 0x58], eax
add ebx, 4
call fcn.00552ee0
add esp, 0x10
test eax, eax
jne 0x5226e5
push 0
push edi
push 1
push 0x5c909c
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9088
mov byte [esi + 0x178d], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9074
mov byte [esi + 0x178e], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9060
mov word [esi + 0x178f], ax
call fcn.0052fc40
add esp, 0x40
push 0
push edi
push 1
push 0x5c904c
mov byte [esi + 0x1791], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9038
mov byte [esi + 0x1792], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9034
mov word [esi + 0x1793], ax
call fcn.0052fc40
push 4
push edi
push 1
push 0x5c9024
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
call fcn.0052fc40
add esp, 0x40
push 0
push edi
push 1
push 0x5c9014
mov byte [esi + 0x1774], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c9008
mov byte [esi + 0x1775], al
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c8ff8
mov word [esi + 0x15d1], ax
call fcn.0052fc40
push 0x10001
push edi
push 1
push 0x5c8fe8
mov byte [esi + 0x1776], al
call fcn.0052fdd0
add esp, 0x40
push 0
mov ecx, eax
sar ecx, 0x10
push edi
mov word [esi + 0x1777], cx
mov word [esi + 0x1779], ax
push 1
push 0x5c8fe0
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c8fd0
mov word [esi + 0x1762], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c8fc4
mov word [esi + 0x1764], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c8fb8
mov word [esi + 0x177b], ax
call fcn.0052fc40
add esp, 0x40
push 0
push edi
push 1
push 0x5c8fac
mov word [esi + 0x177d], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c8fa0
mov word [esi + 0x177f], ax
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c8f94
mov word [esi + 0x1781], ax
call fcn.0052fc40
push 0x6b7d14
push edi
push 1
push 0x5c8f84
mov word [esi + 0x1783], ax
call fcn.00552ee0
add esp, 0x40
test eax, eax
je 0x522992
push 0x50
xor ebx, ebx
lea edx, [ebp - 0x54]
push ebx
push edx
call fcn.0059ea70
push 0xa
lea eax, [ebp - 0x54]
push eax
push 0x6b7d14
call fcn.0052ff30
add esp, 0x18
mov dword [ebp - 0x58], eax
cmp eax, 5
jle 0x522944
mov eax, 5
mov dword [ebp - 0x58], eax
xor edx, edx
test eax, eax
jle 0x52297f
lea ecx, reloc.MSVCRT.dll_strncpy
cmp word [ecx - 0xf1], 0
je 0x52297f
movzx eax, word [ebp + edx*4 - 0x54]
mov word [ecx], ax
test ax, ax
jne 0x52296f
mov eax, 1
mov word [ecx], ax
movzx eax, word [ecx]
add ebx, eax
mov eax, dword [ebp - 0x58]
inc edx
add ecx, 2
cmp edx, eax
jl 0x522950
mov word [esi + 0x1785], bx
cmp eax, 1
jle 0x522992
or byte [esi + 0x179f], 0x80
push 0x1e
push edi
push 1
push 0x5c8f74
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c8f60
mov byte [esi + 0x1787], al
call fcn.0052fc40
add esp, 0x20
mov byte [esi + 0x1796], al
cmp al, 0x64
jbe 0x5229ca
mov byte [esi + 0x1796], 0x64
push 0
push edi
push 1
push 0x5c8f4c
call fcn.0052fc40
add esp, 0x10
mov byte [esi + 0x1795], al
cmp al, 0x3c
jbe 0x5229ed
mov byte [esi + 0x1795], 0x3c
push 0
push edi
push 1
push 0x5c8f40
call fcn.0052fc40
add esp, 0x10
mov byte [esi + 0x1797], al
cmp al, 0x64
jbe 0x522a10
mov byte [esi + 0x1797], 0x64
push 0
push edi
push 1
push 0x5c8f30
call fcn.0052fc40
push 0
push edi
push 1
push 0x5c8f20
mov word [esi + 0x1799], ax
call fcn.0052fc40
mov ebx, dword [ebp - 0x60]
mov word [esi + 0x179b], ax
or eax, reloc.MSVCRT.dll_strncpy
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
add esp, 0x20
or eax, eax
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
mov dword [esi + reloc.MSVCRT.dll_strncpy], eax
mov dword [esi + reloc.MSVCRT.dll_strncpy], 0
push edi
push 0x5c93d4
call fcn.00552e80
mov edi, eax
add esp, 8
test edi, edi
jne 0x521dc7
call fcn.005532c0
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0059ea5e
mov esp, ebp
pop ebp
ret