Function at 0x408602
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x17c
mov eax, dword [0x4310b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x168], esi
push edi
mov edi, edx
test ecx, ecx
jne 0x41ebb0
lea eax, [ebp - 0x158]
push eax
call dword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetSystemTime]
lea eax, [ebp - 0x170]
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 - 0x178]
push eax
lea eax, [ebp - 0x170]
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FileTimeToLocalFileTime]
lea eax, [ebp - 0x158]
push eax
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.api_ms_win_core_timezone_l1_1_0.dll_FileTimeToSystemTime]
cmp edi, 1
jne 0x41ebcd
movzx eax, word [ebp - 0x14a]
xor edx, edx
push 0xa
pop ecx
div ecx
mov ecx, 0x43fa50
push eax
movzx eax, word [ebp - 0x14c]
push 0x43fa30
push eax
movzx eax, word [ebp - 0x14e]
push ecx
push eax
movzx eax, word [ebp - 0x150]
push ecx
push eax
push 0x402314
test esi, esi
je 0x41ebc0
push dword [ebp + 0xc]
push esi
call fcn.00409041
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 0x4086d3
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.00417b90
leave
ret 8
lea edx, [ebp - 0x170]
call fcn.00427ead
jmp 0x40864e
call fcn.00408ec2
add esp, 0x20
jmp 0x41ed55
push 2
xor edi, edi
cmp byte [0x4397cd], 0
pop ebx
je 0x41ed5c
mov dword [ebp - 0x15c], edi
lea eax, [ebp - 0x148]
lea edi, [ebx + 0x7e]
push edi
push eax
push 0x1003
call fcn.00407cf2
push eax
call dword [sym.imp.api_ms_win_core_localization_l1_2_0.dll_GetLocaleInfoW]
test eax, eax
jne 0x41ec3c
lea ecx, [ebp - 0x148]
mov edx, 0x403da4
mov eax, ecx
sub edx, eax
lea eax, [edi + 0x7fffff7e]
test eax, eax
je 0x41ec37
movzx eax, word [edx + ecx]
test ax, ax
je 0x41ec31
mov word [ecx], ax
add ecx, ebx
sub edi, 1
jne 0x41ec14
test edi, edi
jne 0x41ec37
sub ecx, ebx
xor eax, eax
mov word [ecx], ax
mov ax, word [ebp - 0x148]
lea edi, [ebp - 0x148]
test ax, ax
je 0x41ed0a
movzx ecx, ax
xor esi, esi
mov dword [ebp - 0x164], ecx
cmp cx, 0x27
jne 0x41ec78
xor eax, eax
add edi, ebx
cmp dword [ebp - 0x15c], eax
sete al
mov dword [ebp - 0x15c], eax
jmp 0x41ecee
cmp dword [ebp - 0x15c], esi
je 0x41ec84
add edi, ebx
jmp 0x41ecee
cmp cx, 0x68
je 0x41ec96
cmp cx, 0x48
je 0x41ec96
cmp cx, 0x6d
jne 0x41ecee
mov edx, esi
add edi, ebx
inc edx
cmp word [edi], cx
je 0x41ec98
mov eax, edx
neg eax
lea eax, [edi + eax*2]
mov dword [ebp - 0x160], eax
lea edi, [eax + 2]
cmp edx, 1
jne 0x41ecee
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, ebx
cmp ax, si
jne 0x41ecba
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push dword [ebp - 0x160]
push edi
call sub.msvcrt.dll_memmove
mov ecx, dword [ebp - 0x160]
add esp, 0xc
mov eax, dword [ebp - 0x164]
mov word [ecx], ax
add edi, ebx
movzx eax, word [edi]
mov ecx, eax
mov dword [ebp - 0x164], ecx
test ax, ax
jne 0x41ec5d
mov esi, dword [ebp - 0x168]
push 0x20
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x158]
push eax
push ebx
call fcn.00407cf2
push eax
call dword [sym.imp.api_ms_win_core_datetime_l1_1_0.dll_GetTimeFormatW]
test eax, eax
jne 0x41ed33
mov word [ebp - 0x48], ax
xor edi, edi
test esi, esi
jne 0x41edb3
lea edx, [ebp - 0x48]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, ebx
cmp ax, di
jne 0x41ed3f
sub edx, ecx
lea ecx, [ebp - 0x48]
sar edx, 1
call fcn.00408f06
mov esi, eax
jmp 0x4086e1
mov eax, 0x403dbc
movzx ecx, word [ebp - 0x150]
cmp dword [0x4310c4], edi
je 0x41ed8a
push 0xc
pop edx
cmp ecx, edx
jb 0x41ed82
jbe 0x41ed7b
sub ecx, edx
mov eax, 0x403dc0
jmp 0x41ed8f
test ecx, ecx
jne 0x41ed8f
mov ecx, edx
jmp 0x41ed8f
mov eax, 0x402454
push eax
movzx eax, word [ebp - 0x14e]
push eax
push 0x43fa50
push ecx
push 0x403e38
lea eax, [ebp - 0x48]
push 0x20
push eax
call fcn.00409041
add esp, 0x1c
jmp 0x41ed35
mov edx, dword [ebp + 0xc]
lea eax, [ebp - 0x48]
push eax
mov ecx, esi
call fcn.0040dfe0
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, ebx
cmp ax, di
jne 0x41edc4
sub esi, ecx
jmp 0x4086df