Function at 0x4051d0
Capabilities:
Get geographical location
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc4
mov dword [ebp - 4], 0
jmp 0x4051eb
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
shl ecx, 4
cmp dword [ecx + 0x429090], 0
je 0x40520f
mov edx, dword [ebp - 4]
shl edx, 4
mov eax, dword [edx + 0x429090]
cmp eax, dword [ebp + 8]
jne 0x40520d
jmp 0x40520f
jmp 0x4051e2
mov ecx, dword [ebp - 4]
shl ecx, 4
cmp dword [ecx + 0x429090], 0
jne 0x405228
mov eax, 0x4247a4
jmp 0x405471
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
mov edx, dword [ebp + 8]
push edx
push str.SfxString_d
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0
push 0
lea ecx, [ebp - 0x84]
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40534e
mov eax, dword [ebp - 0xc]
add eax, 2
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00421bf5
add esp, 4
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
add ecx, 1
push ecx
mov edx, dword [ebp - 8]
push edx
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, dword [ebp - 0xc]
ja 0x40533c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40533c
mov ecx, dword [ebp - 4]
shl ecx, 4
cmp dword [ecx + 0x42909c], 0
je 0x40532b
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 4]
shl eax, 4
mov ecx, dword [eax + 0x42909c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x405317
mov edx, dword [ebp - 4]
shl edx, 4
mov eax, dword [edx + 0x42909c]
mov dword [ebp - 0x1c], eax
push 2
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00421be2
add esp, 8
mov edx, dword [ebp - 4]
shl edx, 4
mov eax, dword [ebp - 8]
mov dword [edx + 0x42909c], eax
jmp 0x405329
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
push edx
call fcn.00421bf0
add esp, 4
jmp 0x40533a
mov eax, dword [ebp - 4]
shl eax, 4
mov ecx, dword [ebp - 8]
mov dword [eax + 0x42909c], ecx
jmp 0x40534e
mov edx, dword [ebp - 8]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
push eax
call fcn.00421bf0
add esp, 4
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 4]
shl edx, 4
cmp dword [edx + 0x42909c], 0
je 0x405378
mov eax, dword [ebp - 4]
shl eax, 4
mov eax, dword [eax + 0x42909c]
jmp 0x405471
mov ecx, dword [ebp - 4]
shl ecx, 4
mov edx, dword [ecx + 0x429094]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 4]
shl eax, 4
cmp dword [eax + 0x429098], 0
je 0x4053b2
call fcn.00405ad0
cmp eax, dword [0x4249bc]
jne 0x4053b2
mov ecx, dword [ebp - 4]
shl ecx, 4
mov edx, dword [ecx + 0x429098]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
add eax, 2
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00421bf5
add esp, 4
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
shl eax, 4
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0x42909c], ecx
cmp dword [0x42908c], 0xffffffff
jne 0x40543a
mov dword [0x42908c], 0
push 0x1f
lea edx, [ebp - 0xc4]
push edx
push 0x1004
movzx eax, word [0x4294b4]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x40543a
lea ecx, [ebp - 0xc4]
push ecx
call sub.api_ms_win_crt_convert_l1_1_0.dll__wtol
add esp, 4
mov dword [0x42908c], eax
mov edx, dword [ebp - 0x10]
add edx, 1
push edx
mov eax, dword [ebp - 4]
shl eax, 4
mov ecx, dword [eax + 0x42909c]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x14]
push eax
push 0
mov ecx, dword [0x42908c]
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [ebp - 4]
shl edx, 4
mov eax, dword [edx + 0x42909c]
mov esp, ebp
pop ebp
ret