Function at 0x409310
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x17c
mov eax, dword [0x42e0b4]
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 0x41bbbc
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 0x41bbd9
movzx eax, word [ebp - 0x14a]
xor edx, edx
push 0xa
pop ecx
div ecx
mov ecx, 0x43c9e0
push eax
movzx eax, word [ebp - 0x14c]
push 0x43c9c0
push eax
movzx eax, word [ebp - 0x14e]
push ecx
push eax
movzx eax, word [ebp - 0x150]
push ecx
push eax
push 0x40222c
test esi, esi
je 0x41bbcc
push dword [ebp + 0xc]
push esi
call fcn.00409abf
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 0x4093e1
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.00416b30
leave
ret 8
lea edx, [ebp - 0x170]
call fcn.004248d7
jmp 0x40935c
call fcn.00409950
add esp, 0x20
jmp 0x41bd61
push 2
xor edi, edi
cmp byte [0x436755], 0
pop ebx
je 0x41bd68
mov dword [ebp - 0x15c], edi
lea eax, [ebp - 0x148]
lea edi, [ebx + 0x7e]
push edi
push eax
push 0x1003
call fcn.00408791
push eax
call dword [sym.imp.api_ms_win_core_localization_l1_2_0.dll_GetLocaleInfoW]
test eax, eax
jne 0x41bc48
lea ecx, [ebp - 0x148]
mov edx, 0x4039fc
mov eax, ecx
sub edx, eax
lea eax, [edi + 0x7fffff7e]
test eax, eax
je 0x41bc3d
movzx eax, word [edx + ecx]
test ax, ax
je 0x41bc3d
mov word [ecx], ax
add ecx, ebx
sub edi, 1
jne 0x41bc20
test edi, edi
jne 0x41bc43
sub ecx, ebx
xor eax, eax
mov word [ecx], ax
mov ax, word [ebp - 0x148]
lea edi, [ebp - 0x148]
test ax, ax
je 0x41bd16
movzx ecx, ax
xor esi, esi
mov dword [ebp - 0x164], ecx
cmp cx, 0x27
jne 0x41bc84
xor eax, eax
add edi, ebx
cmp dword [ebp - 0x15c], eax
sete al
mov dword [ebp - 0x15c], eax
jmp 0x41bcfa
cmp dword [ebp - 0x15c], esi
je 0x41bc90
add edi, ebx
jmp 0x41bcfa
cmp cx, 0x68
je 0x41bca2
cmp cx, 0x48
je 0x41bca2
cmp cx, 0x6d
jne 0x41bcfa
mov edx, esi
add edi, ebx
inc edx
cmp word [edi], cx
je 0x41bca4
mov eax, edx
neg eax
lea eax, [edi + eax*2]
mov dword [ebp - 0x160], eax
lea edi, [eax + 2]
cmp edx, 1
jne 0x41bcfa
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, ebx
cmp ax, si
jne 0x41bcc6
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 0x41bc69
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.00408791
push eax
call dword [sym.imp.api_ms_win_core_datetime_l1_1_0.dll_GetTimeFormatW]
test eax, eax
jne 0x41bd3f
mov word [ebp - 0x48], ax
xor edi, edi
test esi, esi
jne 0x41bdbf
lea edx, [ebp - 0x48]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, ebx
cmp ax, di
jne 0x41bd4b
sub edx, ecx
lea ecx, [ebp - 0x48]
sar edx, 1
call fcn.0040998d
mov esi, eax
jmp 0x4093ef
mov eax, 0x403a14
movzx ecx, word [ebp - 0x150]
cmp dword [0x42e0c4], edi
je 0x41bd96
push 0xc
pop edx
cmp ecx, edx
jb 0x41bd8e
jbe 0x41bd87
sub ecx, edx
mov eax, 0x403a18
jmp 0x41bd9b
test ecx, ecx
jne 0x41bd9b
mov ecx, edx
jmp 0x41bd9b
mov eax, 0x40234c
push eax
movzx eax, word [ebp - 0x14e]
push eax
push 0x43c9e0
push ecx
push 0x403a8c
lea eax, [ebp - 0x48]
push 0x20
push eax
call fcn.00409abf
add esp, 0x1c
jmp 0x41bd41
mov edx, dword [ebp + 0xc]
lea eax, [ebp - 0x48]
push eax
mov ecx, esi
call fcn.0040f3a0
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, ebx
cmp ax, di
jne 0x41bdd0
sub esi, ecx
jmp 0x4093ed