Function at 0x406854
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1a4
mov eax, dword [0x42e0b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 0x168], edx
mov dword [ebp - 0x16c], ebx
mov dword [ebp - 0x164], 1
push edi
test esi, esi
jne 0x41a4a6
lea eax, [ebp - 0x158]
push eax
call dword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetSystemTime]
lea eax, [ebp - 0x174]
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 - 0x17c]
push eax
lea eax, [ebp - 0x174]
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 - 0x17c]
push eax
call dword [sym.imp.api_ms_win_core_timezone_l1_1_0.dll_FileTimeToSystemTime]
xor eax, eax
mov dword [ebp - 0x15c], eax
cmp byte [0x436755], al
je 0x41a57d
mov dword [ebp - 0x160], eax
mov esi, 0x80
push esi
lea eax, [ebp - 0x148]
push eax
push 0x1f
call fcn.00408791
push eax
call dword [sym.imp.api_ms_win_core_localization_l1_2_0.dll_GetLocaleInfoW]
test eax, eax
je 0x41a4c7
mov ax, word [ebp - 0x148]
lea esi, [ebp - 0x148]
push 2
pop edi
test ax, ax
je 0x40696c
mov ebx, dword [ebp - 0x160]
push 0x64
movzx ecx, ax
pop eax
cmp cx, 0x27
je 0x41a4df
test ebx, ebx
jne 0x406957
cmp cx, ax
je 0x406a40
cmp cx, 0x4d
je 0x406a40
add esi, edi
movzx eax, word [esi]
push 0x64
mov ecx, eax
test ax, ax
pop eax
jne 0x406936
mov ebx, dword [ebp - 0x16c]
push dword [0x436750]
lea eax, [ebp - 0x148]
push dword [0x43674c]
push eax
lea eax, [ebp - 0x158]
push eax
xor eax, eax
push eax
call fcn.00408791
push eax
call dword [sym.imp.api_ms_win_core_datetime_l1_1_0.dll_GetDateFormatW]
test eax, eax
je 0x406a96
mov esi, dword [0x43674c]
test esi, esi
je 0x406a96
movzx ecx, word [ebp - 0x154]
call fcn.00405e68
push eax
push 0x20
pop edx
lea ecx, [ebp - 0x48]
call fcn.0040f3a0
test ebx, ebx
je 0x41a635
cmp dword [ebp - 0x164], 0
je 0x41a691
cmp dword [ebp - 0x168], 1
jne 0x41a691
call fcn.00409434
mov edx, dword [ebp + 0xc]
mov ecx, ebx
test al, al
jne 0x41a673
lea eax, [ebp - 0x48]
push eax
call fcn.0040f3a0
mov edx, dword [ebp + 0xc]
mov ecx, ebx
push 0x40234c
call fcn.0040fc40
push esi
mov edx, dword [ebp + 0xc]
mov ecx, ebx
call fcn.0040fc40
lea ecx, [ebx + 2]
xor edx, edx
mov ax, word [ebx]
add ebx, edi
cmp ax, dx
jne 0x406a1f
sub ebx, ecx
sar ebx, 1
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416b30
leave
ret 8
xor eax, eax
mov edx, eax
add esi, edi
inc edx
cmp word [esi], cx
je 0x406a44
mov eax, edx
mov dword [ebp - 0x160], esi
neg eax
lea esi, [esi + eax*2]
cmp edx, 1
jne 0x41a4ef
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, edi
cmp ax, word [ebp - 0x15c]
jne 0x406a67
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 2]
push esi
push eax
call fcn.00417c42
add esp, 0xc
add esi, 4
jmp 0x406959
xor ecx, ecx
lea eax, [ebp - 0x148]
push ecx
push ecx
push eax
lea eax, [ebp - 0x158]
push eax
push ecx
call fcn.00408791
push eax
call dword [sym.imp.api_ms_win_core_datetime_l1_1_0.dll_GetDateFormatW]
mov esi, eax
test esi, esi
je 0x41a550
inc esi
lea eax, [esi + esi]
push eax
push dword [0x43674c]
call dword [sym.imp.msvcrt.dll_realloc]
pop ecx
pop ecx
test eax, eax
je 0x41a56a
push esi
push eax
mov dword [0x43674c], eax
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x158]
mov dword [0x436750], esi
push eax
xor esi, esi
push esi
call fcn.00408791
push eax
call dword [sym.imp.api_ms_win_core_datetime_l1_1_0.dll_GetDateFormatW]
test eax, eax
je 0x41a55b
mov esi, dword [0x43674c]
jmp 0x4069ab
or al, 0x99
sbb al, 2
add byte [eax], al
mov dword [ebp + 0xc], ecx
push 8
lea edx, [ebp - 8]
push edx
call fcn.00416d73
add esp, 8
imul eax, dword [ebp + 0xc], 0x2710
imul ecx, eax, 0xffffffff
mov dword [ebp - 8], ecx
mov dword [ebp - 4], 0xffffffff
lea edx, [ebp - 8]
push edx
push 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x64]
call ecx
mov al, 1
mov esp, ebp
pop ebp
ret
cld
add al, byte [eax]
add byte [ecx + 0x86afc55], cl
invalid
inc ebp
clc
push 0xa
mov ecx, dword [ebp + 0xc]
xor edx, edx
push edx
push ecx
push 0x2c919477
mov eax, dword [ebp + 8]
push eax
call fcn.0041ab00
add esp, 0x40
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], edx
mov ecx, dword [ebp - 0xc]
or ecx, dword [ebp - 8]
jne 0x41a666
mov dword [ebp - 4], 1
jmp 0x41a66d
mov dword [ebp - 4], 0
mov al, byte [ebp - 4]
mov esp, ebp
pop ebp
ret
add byte [eax], al
add byte [ebx - 0x36ccebbb], cl
push ecx
push eax
push 0
push 0
push 0
push 2
lea edx, [ebp - 0x14]
xor eax, eax
push eax
push edx
push 0
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp + 0x18]
xor edx, edx
push edx
push ecx
mov eax, dword [ebp + 0x10]
cdq
push edx
push eax
mov eax, dword [ebp + 0xc]
cdq
push edx
push eax
push 0xd287ee26
mov eax, dword [ebp + 8]
push eax
call fcn.0041abf0
add esp, 0x58
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], edx
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp - 0xc]
mov dword [ecx], edx
mov eax, dword [ebp - 8]
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 0xc]
or ecx, dword [ebp - 8]
je 0x41a70e
cmp dword [ebp - 0xc], 0x40000003
jne 0x41a705
cmp dword [ebp - 8], 0
je 0x41a70e
mov dword [ebp - 4], 0
jmp 0x41a715
mov dword [ebp - 4], 1
mov al, byte [ebp - 4]
mov esp, ebp
pop ebp
ret