Function at 0x408510
Capabilities:
Get geographical location

Disassembly:
push 0xffffffffffffffff
push 0x460799
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x240
push ebx
push ebp
push edi
mov edi, dword [esp + 0x25c]
xor ebp, ebp
mov ebx, ecx
mov eax, edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], eax
cmp edi, ebp
jne 0x408554
call fcn.004091d0
mov dword [esp + 0x20], eax
cmp eax, 1
jne 0x408560
xor al, al
jmp 0x408956
push esi
push eax
call fcn.00409320
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x40879e
lea eax, [esi + 0xc]
push eax
lea ecx, [esp + 0x20]
call fcn.00406540
mov dword [esp + 0x258], ebp
lea ecx, [esi + 4]
push ecx
lea ecx, [esp + 0x24]
call fcn.00406540
mov byte [esp + 0x258], 1
lea ecx, [esp + 0x14]
call fcn.00406280
mov byte [esp + 0x258], 2
push 0x4684a4
lea ecx, [esp + 0x14]
call fcn.004062d0
mov byte [esp + 0x258], 3
cmp edi, ebp
je 0x4086cb
movzx eax, word [esi + 8]
cmp ax, bp
je 0x40874d
mov dx, word [esi + 0xa]
shl dx, 0xa
movzx esi, dx
movzx eax, ax
or esi, eax
push esi
or ebp, 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetThreadLocale]
mov edi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push 0x100
lea edx, [esp + 0x54]
push edx
push 0x1001
xor ecx, ecx
push esi
mov word [esp + 0x60], cx
call edi
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x18]
call fcn.004063f0
push 0x100
lea ecx, [esp + 0x54]
push ecx
push 0x1002
push esi
call edi
test eax, eax
jle 0x408644
push 0x4684a8
lea ecx, [esp + 0x18]
call fcn.0040d3c0
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x18]
call fcn.0040d3c0
push 0x100
lea eax, [esp + 0x54]
push eax
push 0x1004
push esi
call edi
test eax, eax
jle 0x408697
lea ecx, [esp + 0x50]
push ecx
call fcn.00442f2b
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x408689
push 0x4684ac
lea ecx, [esp + 0x18]
call fcn.0040d3c0
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x18]
call fcn.0040d3c0
mov eax, dword [esp + 0x14]
cmp dword [eax - 0xc], 0
je 0x408757
push eax
push 0
call fcn.00447988
add esp, 8
push eax
lea ecx, [esp + 0x14]
call fcn.004063f0
test ebp, ebp
jne 0x40874d
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], ebp
jmp 0x40873d
push 0x468428
push ebp
call fcn.00447988
add esp, 8
push eax
lea ecx, [esp + 0x14]
call fcn.004063f0
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 0xc], ebp
jne 0x40874d
push 0x10
lea edx, [esp + 0x34]
push edx
push 0x1004
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x40874d
mov ecx, 0x4684b0
lea eax, [esp + 0x30]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x408736
cmp dx, bp
je 0x408732
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x408736
add eax, 4
add ecx, 4
cmp dx, bp
jne 0x408710
xor eax, eax
jmp 0x40873b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
jne 0x40874d
push 0x4684a4
lea ecx, [esp + 0x14]
call fcn.004063f0
mov eax, dword [esp + 0x10]
xor ebp, ebp
cmp eax, ebp
jne 0x4087a5
mov byte [esp + 0x258], 2
lea ecx, [esp + 0x10]
call fcn.00406380
mov byte [esp + 0x258], 1
lea ecx, [esp + 0x14]
call fcn.00406380
mov byte [esp + 0x258], 0
lea ecx, [esp + 0x20]
call fcn.00406380
mov dword [esp + 0x258], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.00406380
xor al, al
jmp 0x408955
push eax
call fcn.00447b84
mov esi, eax
add esp, 4
lea eax, [esp + 0x1c]
lea ecx, [ebx + 0x14]
push eax
call fcn.00406650
lea ecx, [esp + 0x20]
lea edi, [ebx + 0xc]
push ecx
mov ecx, edi
call fcn.00406650
mov dword [ebx + 0x18], 1
cmp esi, ebp
jne 0x4087e4
mov eax, dword [edi]
push eax
call fcn.00447b84
add esp, 4
mov esi, eax
mov eax, dword [ebx + 0x1c]
cmp eax, ebp
je 0x4087f7
push eax
call fcn.00442f89
add esp, 4
mov dword [ebx + 0x1c], ebp
push esi
push ebp
call fcn.00447988
add esp, 8
cmp eax, ebp
je 0x408813
push eax
call fcn.00447b84
add esp, 4
mov dword [ebx + 0x1c], eax
jmp 0x408816
mov dword [ebx + 0x1c], ebp
mov edx, dword [edi]
cmp dword [edx - 0xc], ebp
jne 0x408856
cmp esi, ebp
je 0x408856
movzx eax, word [esi]
cmp ax, bp
je 0x408856
push eax
call fcn.00447975
movzx eax, ax
add esp, 4
push eax
call fcn.0040d400
movzx eax, word [esi + 2]
cmp ax, bp
je 0x408856
push eax
call fcn.00447975
movzx ecx, ax
add esp, 4
push ecx
call fcn.0040d400
push esi
call fcn.00442f89
mov esi, dword [ebx + 4]
add esp, 4
xor bl, bl
test esi, esi
je 0x4088f7
lea esp, [esp]
test bl, bl
jne 0x4088ab
lea edx, [esp + 0x2c]
push edx
push esi
call fcn.00407d70
mov byte [esp + 0x258], 4
mov ecx, dword [edi]
mov edx, dword [esp + 0x28]
mov edx, dword [edx + 0x10]
mov eax, dword [eax]
mov ebx, dword [esi]
or dword [esp + 0x18], 1
push ecx
push edx
push eax
mov eax, dword [ebx + 4]
mov ecx, esi
call eax
test al, al
jne 0x4088ab
xor bl, bl
jmp 0x4088ad
mov bl, 1
mov dword [esp + 0x258], 3
test byte [esp + 0x18], 1
je 0x4088ec
and dword [esp + 0x18], 0xfffffffe
mov byte [esp + 0x258], 3
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4088ec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esi + 4]
test esi, esi
jne 0x408870
mov eax, dword [esp + 0x28]
cmp dword [eax + 0x1c], 0
je 0x40890c
test bl, bl
je 0x40890c
mov ecx, dword [esp + 0x24]
mov dword [eax + 0x18], ecx
mov byte [esp + 0x258], 2
lea ecx, [esp + 0x10]
call fcn.00406380
mov byte [esp + 0x258], 1
lea ecx, [esp + 0x14]
call fcn.00406380
mov byte [esp + 0x258], 0
lea ecx, [esp + 0x20]
call fcn.00406380
mov dword [esp + 0x258], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.00406380
mov al, bl
pop esi
mov ecx, dword [esp + 0x24c]
pop edi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x24c
ret 4