Function at 0x407954
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x174
mov eax, dword [0x4261d4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x160], esi
push edi
mov edi, edx
test ecx, ecx
jne 0x4132db
lea eax, [ebp - 0x158]
push eax
call dword [sym.imp.api_ms_win_core_sysinfo_l1_2_1.dll_GetSystemTime]
lea eax, [ebp - 0x16c]
push eax
lea eax, [ebp - 0x158]
push eax
call dword [sym.imp.api_ms_win_core_timezone_l1_1_0.dll_SystemTimeToFileTime]
lea eax, [ebp - 0x174]
push eax
lea eax, [ebp - 0x16c]
push eax
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_FileTimeToLocalFileTime]
lea eax, [ebp - 0x158]
push eax
lea eax, [ebp - 0x174]
push eax
call dword [sym.imp.api_ms_win_core_timezone_l1_1_0.dll_FileTimeToSystemTime]
cmp edi, 1
jne 0x412c50
movzx eax, word [ebp - 0x14a]
push 0xa
pop ecx
cdq
idiv ecx
mov ecx, 0x426520
push eax
movzx eax, word [ebp - 0x14c]
push 0x426540
push eax
movzx eax, word [ebp - 0x14e]
push ecx
push eax
movzx eax, word [ebp - 0x150]
push ecx
push eax
push 0x407a48
test esi, esi
je 0x41649e
push dword [ebp + 0xc]
push esi
call fcn.004026f3
add esp, 0x28
lea edx, [esi + 2]
xor ecx, ecx
push 2
pop ebx
mov ax, word [esi]
add esi, ebx
cmp ax, cx
jne 0x407a24
sub esi, edx
sar esi, 1
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401200
mov esp, ebp
pop ebp
ret 8
push 2
xor edi, edi
cmp byte [0x426004], 0
pop ebx
je 0x417797
lea edi, [ebx + 0x7e]
push edi
lea eax, [ebp - 0x148]
push eax
push 0x1003
call fcn.00409976
push eax
call dword [sym.imp.api_ms_win_core_localization_l1_2_1.dll_GetLocaleInfoW]
test eax, eax
je 0x41775a
cmp word [ebp - 0x148], 0
lea edi, [ebp - 0x148]
je 0x412d2d
xor edx, edx
mov esi, edx
jmp 0x412cdc
mov ax, word [ecx]
add ecx, ebx
cmp ax, dx
jne 0x412ca0
sub ecx, dword [ebp - 0x15c]
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 2]
push edi
push eax
call dword [sym.imp.msvcrt.dll_memmove]
mov eax, dword [ebp - 0x164]
add esp, 0xc
mov word [edi], ax
xor edx, edx
add edi, ebx
add edi, ebx
cmp word [edi], dx
je 0x412d27
movzx eax, word [edi]
mov dword [ebp - 0x164], eax
cmp eax, 0x27
je 0x417771
test esi, esi
jne 0x412cd3
cmp eax, 0x68
je 0x412d01
cmp eax, 0x48
je 0x412d01
cmp eax, 0x6d
jne 0x412cd5
mov ecx, edx
add edi, ebx
inc ecx
cmp word [edi], ax
je 0x412d03
mov eax, ecx
neg eax
lea edi, [edi + eax*2]
cmp ecx, 1
jne 0x412cd3
mov ecx, edi
lea eax, [ecx + 2]
mov dword [ebp - 0x15c], eax
jmp 0x412ca0
mov esi, dword [ebp - 0x160]
push 0x20
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x158]
push eax
push ebx
call fcn.00409976
push eax
call dword [sym.imp.api_ms_win_core_datetime_l1_1_1.dll_GetTimeFormatW]
test eax, eax
je 0x41777f
xor edi, edi
test esi, esi
je 0x417788
mov edx, dword [ebp + 0xc]
lea eax, [ebp - 0x48]
push eax
mov ecx, esi
call fcn.00401da3
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, ebx
cmp ax, di
jne 0x412d71
sub esi, ecx
jmp 0x407a30
lea edx, [ebp - 0x16c]
call fcn.004132f0
jmp 0x4079a0
call fcn.00406992
add esp, 0x20
jmp 0x417790
push 0x417b4c
mov edx, edi
lea ecx, [ebp - 0x148]
call fcn.00401da3
jmp 0x412c86
xor eax, eax
test esi, esi
sete al
mov esi, eax
jmp 0x412cd3
mov word [ebp - 0x48], ax
jmp 0x412d56
lea ecx, [ebp - 0x48]
call fcn.0041555b
mov esi, eax
jmp 0x407a32
mov eax, 0x417b64
movzx ecx, word [ebp - 0x150]
cmp dword [0x426020], edi
je 0x4177c5
push 0xc
pop edx
cmp ecx, edx
jb 0x4177bd
jbe 0x4177b6
sub ecx, edx
mov eax, 0x417b68
jmp 0x4177ca
test ecx, ecx
jne 0x4177ca
mov ecx, edx
jmp 0x4177ca
mov eax, 0x40223c
push eax
movzx eax, word [ebp - 0x14e]
push eax
push 0x426520
push ecx
push 0x417b6c
lea eax, [ebp - 0x48]
push 0x20
push eax
call fcn.004026f3
add esp, 0x1c
jmp 0x412d58