Function at 0x406940
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x110
mov eax, dword [0x40e028]
xor eax, esp
mov dword [esp + 0x10c], eax
push esi
push edi
push 0x400
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jl 0x406987
cmp word [ebx + eax*2], 0x2e
je 0x406981
dec eax
jns 0x406975
jmp 0x406987
and word [ebx + eax*2 + 2], 0
push 0x409d3c
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
fldz
push ecx
push ecx
mov edi, 0x409ce4
fstp qword [esp]
mov esi, ebx
call fcn.004062ca
mov ecx, dword [0x40e764]
fst qword [ecx + 0x78]
fld qword [0x40c268]
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x4069c5
fstp st(1)
fstp qword [ecx + 0x78]
jmp 0x4069da
fstp st(0)
fld qword [0x40c260]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x4069c0
fstp st(0)
fldz
push ecx
push ecx
fstp qword [esp]
mov edi, 0x409d44
call fcn.004062ca
mov ecx, dword [0x40e764]
fst qword [ecx + 0x80]
fld qword [0x40c258]
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x406a10
fstp st(1)
fstp qword [ecx + 0x80]
jmp 0x406a25
fstp st(0)
fld qword [0x40c250]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x406a08
fstp st(0)
fldz
push ecx
push ecx
fstp qword [esp]
mov edi, 0x409d58
call fcn.004062ca
mov ecx, dword [0x40e764]
fst qword [ecx + 0x98]
fld qword [0x40c248]
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x406a5b
fstp st(1)
fstp qword [ecx + 0x98]
jmp 0x406a70
fstp st(0)
fld qword [0x40c240]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x406a53
fstp st(0)
fldz
push ecx
push ecx
fstp qword [esp]
mov edi, 0x409d6c
call fcn.004062ca
mov ecx, dword [0x40e764]
fst qword [ecx + 0x90]
fldz
fcom st(1)
fnstsw ax
test ah, 0x41
je 0x406ae9
fld qword [0x40c238]
fcomp st(2)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x406aeb
fstp st(0)
fld qword [0x40c230]
push ecx
push ecx
mov edi, 0x409d7c
fstp qword [esp]
call fcn.004062ca
mov ecx, dword [0x40e764]
fst qword [ecx + 0x88]
fldz
fcom st(1)
fnstsw ax
fld qword [0x40c228]
test ah, 0x41
jne 0x406af3
fstp st(0)
fstp st(1)
fstp qword [ecx + 0x88]
jmp 0x406b02
fstp st(1)
fstp qword [ecx + 0x90]
jmp 0x406aab
fstp st(1)
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x406ae1
fstp st(0)
push 0
push 0x409d88
push ebx
call fcn.00406371
mov ecx, dword [0x40e764]
test eax, eax
setne al
push 0x100
mov byte [ecx + 0xa0], al
lea eax, [esp + 0x14]
push eax
push str.F4F3EE
push str.BackColorRGB
push ebx
call fcn.004063a5
mov esi, dword [sym.imp.MSVCR80.dll_wcstoul]
push 0x10
lea eax, [esp + 0x14]
push 0
push eax
call esi
mov ecx, eax
movzx edx, al
shr ecx, 0x10
and ecx, 0xff
shl edx, 0x10
mov edi, 0xff00
and eax, edi
add esp, 0xc
or ecx, edx
or ecx, eax
mov eax, dword [0x40e764]
push 0x100
mov dword [eax + 0xb8], ecx
lea eax, [esp + 0x14]
push eax
push str.000000
push 0x409ddc
push ebx
call fcn.004063a5
push 0x10
lea eax, [esp + 0x14]
push 0
push eax
call esi
mov ecx, eax
movzx edx, al
shr ecx, 0x10
and ecx, 0xff
shl edx, 0x10
and eax, edi
add esp, 0xc
or ecx, edx
or ecx, eax
mov eax, dword [0x40e764]
push 0x100
mov dword [eax + 0xbc], ecx
lea eax, [esp + 0x14]
push eax
push str.0000FF
push 0x409e08
push ebx
call fcn.004063a5
push 0x10
lea eax, [esp + 0x14]
push 0
push eax
call esi
mov ecx, eax
movzx edx, al
shr ecx, 0x10
and ecx, 0xff
shl edx, 0x10
and eax, edi
or ecx, edx
or ecx, eax
mov eax, dword [0x40e764]
add esp, 0xc
mov dword [eax + 0xc0], ecx
push 0x200
add eax, 0xf8
push eax
push str.Times_New_Roman
push 0x409e44
push ebx
call fcn.004063a5
push 0
push 0x409e60
push ebx
call fcn.00406371
mov ecx, dword [0x40e75c]
push 0
push 0x409e74
push ebx
mov dword [ecx + 0x9c], eax
call fcn.00406371
mov ecx, dword [0x40e75c]
mov esi, 0xc8
push esi
push 0x409e88
push ebx
mov dword [ecx + 0xa0], eax
call fcn.00406371
add eax, 0xa
push 0x14
xor edx, edx
pop ecx
div ecx
mov ecx, dword [0x40e75c]
add ecx, 0x88
imul eax, eax, 0x14
cmp eax, 0x64
mov dword [ecx], eax
jl 0x406c8e
cmp eax, 0xea60
jle 0x406c90
mov dword [ecx], esi
xor esi, esi
inc esi
push esi
push 0x409ea0
push ebx
call fcn.00406371
mov ecx, dword [0x40e75c]
push esi
push 0x409eb0
push ebx
mov dword [ecx + 0x8c], eax
call fcn.00406371
mov ecx, dword [0x40e75c]
push esi
push 0x409ec0
push ebx
mov dword [ecx + 0x90], eax
call fcn.00406371
mov ecx, dword [0x40e75c]
push esi
push 0x409ed0
push ebx
mov dword [ecx + 0x94], eax
call fcn.00406371
mov ecx, dword [0x40e75c]
mov edi, dword [sym.imp.MSVCR80.dll__swprintf]
mov dword [ecx + 0x98], eax
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0xc]
push esi
lea eax, [esp + 0x14]
push 0x409ee0
push eax
call edi
add esp, 0xc
push 0
lea eax, [esp + 0x14]
push eax
push ebx
lea esi, [esi*4 + 0x40e74c]
call fcn.00406371
mov ecx, dword [esi]
push dword [esp + 0xc]
mov dword [ecx + 0x88], eax
lea eax, [esp + 0x14]
push 0x409f00
push eax
call edi
add esp, 0xc
push 0
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00406371
mov ecx, dword [esi]
push dword [esp + 0xc]
mov dword [ecx + 0x8c], eax
lea eax, [esp + 0x14]
push 0x409f20
push eax
call edi
mov eax, dword [esp + 0x18]
add esp, 0xc
add eax, 2
push eax
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00406371
mov ecx, dword [esi]
push dword [esp + 0xc]
dec eax
mov dword [ecx + 0x94], eax
lea eax, [esp + 0x14]
push 0x409f3c
push eax
call edi
add esp, 0xc
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00406371
mov ecx, dword [esi]
push dword [esp + 0xc]
mov dword [ecx + 0x98], eax
lea eax, [esp + 0x14]
push 0x409f68
push eax
call edi
add esp, 0xc
push 0
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00406371
mov ecx, dword [esi]
push dword [esp + 0xc]
mov dword [ecx + 0x9c], eax
lea eax, [esp + 0x14]
push 0x409f90
push eax
call edi
add esp, 0xc
push 0
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00406371
mov ecx, dword [esi]
push dword [esp + 0xc]
mov dword [ecx + 0xa0], eax
lea eax, [esp + 0x14]
push 0x409fbc
push eax
call edi
add esp, 0xc
push 0x3e8
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00406371
add eax, 0xa
push 0x14
xor edx, edx
pop ecx
div ecx
mov ecx, dword [esi]
imul eax, eax, 0x14
mov dword [ecx + 0x90], eax
mov eax, dword [esi]
add eax, 0x90
mov ecx, dword [eax]
cmp ecx, 0x64
jl 0x406e4a
cmp ecx, 0xea60
jle 0x406e50
mov dword [eax], 0x3e8
push dword [esp + 0xc]
lea eax, [esp + 0x14]
push 0x409fe0
push eax
call edi
add esp, 0xc
push 1
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00406371
mov ecx, dword [esi]
push dword [esp + 0xc]
mov dword [ecx + 0xa4], eax
lea eax, [esp + 0x14]
push 0x409ff8
push eax
call edi
add esp, 0xc
push 1
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00406371
mov ecx, dword [esi]
push dword [esp + 0xc]
mov dword [ecx + 0xa8], eax
lea eax, [esp + 0x14]
push 0x40a010
push eax
call edi
add esp, 0xc
push 1
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00406371
mov ecx, dword [esi]
push dword [esp + 0xc]
mov dword [ecx + 0xac], eax
lea eax, [esp + 0x14]
push 0x40a028
push eax
call edi
add esp, 0xc
push 1
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00406371
inc dword [esp + 0xc]
cmp dword [esp + 0xc], 3
mov ecx, dword [esi]
mov dword [ecx + 0xb0], eax
jle 0x406cfd
fld qword [0x40c228]
push ecx
push ecx
mov edi, 0x40a040
fstp qword [esp]
mov esi, ebx
call fcn.004062ca
mov eax, dword [0x40e748]
fstp qword [eax + 0x88]
push ecx
fldz
push ecx
mov edi, 0x40a05c
fstp qword [esp]
call fcn.004062ca
mov eax, dword [0x40e748]
fstp qword [eax + 0x90]
push ecx
fldz
push ecx
mov edi, 0x40a078
fstp qword [esp]
call fcn.004062ca
mov eax, dword [0x40e748]
fstp qword [eax + 0x98]
push ecx
fld1
push ecx
mov edi, 0x40a094
fstp qword [esp]
call fcn.004062ca
mov eax, dword [0x40e748]
push 1
fstp qword [eax + 0xa0]
push 0x40a0b0
push ebx
call fcn.00406371
fld qword [0x40c220]
mov ecx, dword [0x40e744]
push ecx
push ecx
mov edi, 0x40a0c4
fstp qword [esp]
mov dword [ecx + 0x8c], eax
call fcn.004062ca
mov eax, dword [0x40e764]
push 0
fstp qword [eax + 0xd0]
push 0x40a0d0
push ebx
call fcn.00406371
fld1
mov ecx, dword [0x40e744]
push ecx
push ecx
mov edi, 0x40a0f4
fstp qword [esp]
mov dword [ecx + 0x88], eax
call fcn.004062ca
mov eax, dword [0x40e744]
fstp qword [eax + 0x90]
push ecx
fld qword [0x40c218]
push ecx
mov edi, 0x40a114
fstp qword [esp]
call fcn.004062ca
mov eax, dword [0x40e744]
fstp qword [eax + 0x98]
push ecx
fld qword [0x40c210]
push ecx
mov edi, 0x40a134
fstp qword [esp]
call fcn.004062ca
mov eax, dword [0x40e744]
fstp qword [eax + 0xa0]
push ecx
fld qword [0x40c210]
push ecx
fstp qword [esp]
mov edi, 0x40a154
call fcn.004062ca
mov eax, dword [0x40e744]
mov ecx, dword [esp + 0x114]
fstp qword [eax + 0xa8]
pop edi
pop esi
xor ecx, esp
mov eax, ebx
call fcn.00401c45
mov esp, ebp
pop ebp
ret