Function at 0x408c5f
Capabilities:
Get common file path
Get comspec environment variable
Get hostname
Get keyboard layout
Get session user name
Query environment variable

Disassembly:
push ebx
mov ebx, esp
push ecx
push ecx
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x2a4
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
xor eax, eax
push 0x104
lea ecx, [ebp - 0x1c]
mov word [ebp - 0x280], ax
call fcn.00404293
mov eax, dword [ebx + 8]
xor edi, edi
mov esi, edi
mov edi, dword [eax]
push edi
push dword [esi*4 + 0x4b0630]
call fcn.00424e88
pop ecx
pop ecx
test eax, eax
je 0x408cb8
inc esi
cmp esi, 0x61
jl 0x408c9f
push 0
mov dword [ebp - 0xc], esi
cmp esi, 0x61
mov esi, dword [ebp - 4]
pop edi
je 0x4464e0
mov eax, dword [ebp - 0xc]
cmp eax, 0x60
ja case.0x408cd2.88
jmp dword [eax*4 + 0x408d2b]
lea eax, [esi + 0xd8]
push eax
mov ecx, dword [ebx + 0xc]
call fcn.0040611c
lea ecx, [ebp - 0x1c]
call fcn.004020f8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8
push 0x49fb4c
mov ecx, dword [ebx + 0xc]
call fcn.00406173
jmp case.0x408cd2.88
lea eax, [esi + 0xc8]
jmp 0x408cdf
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], edi
mov dword [esi + 0xc], 1
jmp case.0x408cd2.88
push 0x4c7100
lea ecx, [ebp - 0x2c]
call fcn.004045fd
push dword [ebx + 8]
lea ecx, [ebp - 0x2c]
call fcn.00404350
push edi
lea eax, [ebp - 4]
mov dword [ebp - 4], edi
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00404b62
test eax, eax
jne 0x446515
or edi, 0xffffffff
jmp 0x44664c
mov ecx, dword [ebx + 0xc]
push eax
call fcn.00406424
jmp 0x44664c
push 0x4c715c
jmp 0x408d03
push 0x4adf88
jmp 0x408d03
push 0x4c7160
jmp 0x408d03
mov eax, dword [esi]
mov eax, dword [eax + 4]
cmp byte [eax + esi + 0xd], 0
mov edi, dword [eax + esi + 8]
je 0x446554
mov edi, dword [edi + 0x38]
mov edi, dword [edi + 0x14]
jmp 0x44655f
mov edi, dword [esi + 0x148]
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], edi
xor edi, edi
jmp 0x408d21
mov eax, dword [esi]
mov eax, dword [eax + 4]
cmp byte [eax + esi + 0xd], 0
mov ecx, dword [eax + esi + 8]
je 0x446585
mov ecx, dword [ecx + 0x38]
lea eax, [ecx + 0x20]
mov ecx, dword [ebx + 0xc]
push eax
call fcn.00406424
jmp case.0x408cd2.88
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x1e]
push eax
push 0x4c7164
jmp 0x4465b4
mov eax, edi
push eax
push 0x4c657c
lea eax, [ebp - 0x280]
push eax
call fcn.0041feb4
jmp 0x4465e2
lea eax, [ebp - 0x280]
mov edx, str.SYSTEMCurrentControlSetControlNlsLanguage
push eax
push 0x104
push str.InstallLanguage
mov ecx, reloc.WSOCK32.dll_bind
call fcn.0041ab8b
add esp, 0xc
jmp 0x4465f9
push 0x104
lea eax, [ebp - 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x280]
jmp 0x44660f
xor ecx, ecx
inc ecx
lea edx, [ebp - 0x60]
call fcn.0046e24e
lea eax, [ebp - 0x60]
push eax
jmp 0x408d03
push edi
call fcn.0042e098
mov dword [esp], 0x4c7170
jmp 0x446631
push edi
call fcn.0042e098
mov dword [esp], 0x4c7198
mov dword [ebp - 8], eax
lea ecx, [ebp - 8]
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], edx
push eax
call fcn.004875d4
mov ecx, dword [ebx + 0xc]
push eax
call fcn.0040611c
lea ecx, [ebp - 0x2c]
call fcn.004020f8
jmp case.0x408cd2.88
push edi
call fcn.0042e098
mov dword [esp], 0x4c7178
jmp 0x446631
push edi
call fcn.0042e098
mov dword [esp], 0x4c7180
jmp 0x446631
push edi
call fcn.0042e098
mov dword [esp], 0x4c657c
jmp 0x446631
push edi
call fcn.0042e098
mov dword [esp], 0x4c7188
jmp 0x446631
push edi
call fcn.0042e098
mov dword [esp], 0x4c7190
jmp 0x446631
push edi
call fcn.0042e098
pop ecx
mov dword [ebp - 8], eax
lea ecx, [ebp - 8]
lea eax, [ebp - 0x2a4]
mov dword [ebp - 4], edx
push eax
call fcn.00487631
test eax, eax
je 0x4465ac
mov eax, dword [eax + 0x18]
inc eax
jmp 0x4465ae
push 0x26
jmp 0x4466d7
push 7
lea edx, [ebp - 0x1c]
pop ecx
call fcn.0046e350
jmp 0x4466ea
lea ecx, [ebp - 0x1c]
call fcn.0041bdab
lea eax, [ebp - 0x1c]
jmp 0x408cdf
push 0x2b
jmp 0x4466d7
push 5
jmp 0x4466d7
push 0x23
jmp 0x4466d7
push 0x19
jmp 0x4466d7
push 0x2e
jmp 0x4466d7
push 0x1f
jmp 0x4466d7
push 0x17
jmp 0x4466d7
push 0x16
jmp 0x4466d7
push 0x18
jmp 0x4466d7
push 0x1c
jmp 0x4466d7
push 0x1a
jmp 0x4466d7
push 0x10
jmp 0x4466d7
push 6
jmp 0x4466d7
push 2
jmp 0x4466d7
push 0xb
jmp 0x4466d7
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0x104
push eax
lea eax, [ebp - 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
jmp 0x4465f9
push 0x104
lea eax, [ebp - 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je case.0x408cd2.88
jmp 0x4465f9
cmp byte [0x4d1394], 0
je 0x4465e7
push 0x49c93c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x446798
push str.GetSystemWow64DirectoryW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x44679d
mov eax, 0x41ff2a
push 0x104
lea ecx, [ebp - 0x280]
push ecx
call eax
test esi, esi
je 0x4465f9
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4465f9
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 6
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 3
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 9
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 5
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 0xa
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 2
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 7
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 8
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 4
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
xor eax, eax
inc eax
mov dword [esi + 0xc], eax
jmp 0x4468a9
mov dword [ebp - 0xc], 1
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov eax, dword [ebp - 0xc]
mov dword [esi + 0xc], 1
mov dword [esi], eax
jmp case.0x408cd2.88
xor eax, eax
cmp byte [0x4d1328], 1
jmp 0x4468c4
xor eax, eax
cmp byte [0x4d1979], 1
mov esi, dword [ebx + 0xc]
sete al
mov ecx, esi
mov dword [ebp - 4], eax
call fcn.00405f80
mov dword [esi + 0xc], 1
mov eax, dword [ebp - 4]
jmp 0x4468a9
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 0x40
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 0x41
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 0x42
jmp 0x408d21
mov esi, dword [ebx + 0xc]
mov ecx, esi
call fcn.00405f80
mov dword [esi], 0x43
jmp 0x408d21
lea eax, [esi + 0xb8]
jmp 0x408cdf
push dword [esi + 0xf4]
call fcn.00469e0d
mov edi, eax
jmp 0x44655f
lea eax, [ebp - 0x280]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x4465f9
movzx eax, word [0x4d1396]
test eax, eax
je 0x44699b
cmp eax, 6
je 0x446991
cmp eax, 9
jne 0x446987
mov eax, 0x4c71b4
jmp 0x44660f
mov eax, str.UNKNOWN
jmp 0x44660f
mov eax, str.IA64
jmp 0x44660f
mov eax, 0x4c71a0
jmp 0x44660f
mov eax, reloc.WSOCK32.dll_accept
xor ecx, ecx
push ebx
cpuid
mov esi, ebx
pop ebx
lea edi, [ebp - 0x2c]
mov dword [edi], eax
mov eax, edi
mov dword [eax + 4], esi
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, 0x4c71b4
test dword [ebp - 0x20], 0x20000000
jne 0x4469d5
mov eax, 0x4c71a0
mov ecx, dword [ebx + 0xc]
push eax
call fcn.00406173
jmp 0x446a1d
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.USER32.dll_GetDC]
push 0xc
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov esi, dword [ebx + 0xc]
mov edi, eax
mov ecx, esi
call fcn.00405f80
push dword [ebp - 4]
mov dword [esi + 0xc], 1
push dword [ebp - 0xc]
mov dword [esi], edi
call dword [sym.imp.USER32.dll_ReleaseDC]
xor edi, edi
jmp case.0x408cd2.88
push str.WIN32_NT
jmp 0x408d03
xor eax, eax
inc eax
cmp byte [0x4d1390], al
jne 0x446a43
mov eax, str.WIN_10
jmp 0x44660f
cmp byte [0x4d1392], al
jne 0x446a55
mov eax, str.WIN_2016
jmp 0x44660f
cmp byte [0x4d138c], al
jne 0x446a67
mov eax, str.WIN_81
jmp 0x44660f
cmp byte [0x4d138e], al
jne 0x446a79
mov eax, str.WIN_2012R2
jmp 0x44660f
cmp byte [0x4d138a], al
jne 0x446a8b
mov eax, str.WIN_2012
jmp 0x44660f
cmp byte [0x4d1388], al
jne 0x446a9d
mov eax, str.WIN_8
jmp 0x44660f
cmp byte [0x4d1386], al
jne 0x446aaf
mov eax, str.WIN_2008R2
jmp 0x44660f
cmp byte [0x4d1384], al
jne 0x446ac1
mov eax, str.WIN_7
jmp 0x44660f
cmp byte [0x4d1382], al
jne 0x446ad3
mov eax, str.WIN_2008
jmp 0x44660f
cmp byte [0x4d1380], al
jne 0x446ae5
mov eax, str.WIN_VISTA
jmp 0x44660f
cmp byte [0x4d137e], al
jne 0x446af7
mov eax, str.WIN_2003
jmp 0x44660f
cmp byte [0x4d137c], al
jne 0x446987
cmp byte [0x4d1398], 0
je 0x446b16
mov eax, str.WIN_XPe
jmp 0x44660f
mov eax, str.WIN_XP
jmp 0x44660f
mov edi, dword [0x4d1368]
jmp 0x44655f
push 0x4d136c
jmp 0x408ce0
lea eax, [ebp - 0x280]
mov edx, str.Control_PanelAppearance
push eax
push 0x104
push str.SchemeLangID
mov ecx, reloc.WSOCK32.dll_accept
call fcn.0041ab8b
movzx eax, word [ebp - 0x280]
lea ecx, [ebp - 0x280]
add esp, 0xc
mov dword [ebp - 0x30], eax
push edi
push eax
push 4
pop edx
call fcn.0041f1dc
pop ecx
pop ecx
jmp 0x4465f9
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
lea eax, [ebp - 0x74]
jmp 0x44660f
lea eax, [ebp - 0x280]
push str.3__3__15__1
push eax
call fcn.0042464e
lea eax, [ebp - 0x280]
mov dword [ebp - 4], edi
push eax
mov esi, edi
call fcn.0042462e
add esp, 0xc
test eax, eax
jle 0x446bf5
push 0x2e
pop edx
movzx eax, word [ebp + edi*2 - 0x280]
mov ecx, esi
cmp eax, 0x20
je 0x446bde
inc esi
cmp eax, 0x2c
jne 0x446bd6
mov word [ebp + ecx*2 - 0x280], dx
jmp 0x446bde
mov word [ebp + ecx*2 - 0x280], ax
lea eax, [ebp - 0x280]
inc edi
push eax
call fcn.0042462e
pop ecx
push 0x2e
pop edx
cmp edi, eax
jl 0x446bb7
xor edi, edi
xor eax, eax
mov word [ebp + esi*2 - 0x280], ax
jmp 0x4465f9
push 2
jmp 0x446c0a
push 4
pop ecx
jmp 0x446604
push 3
jmp 0x446c0a
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edi, dword [ebp - 0x38]
jmp 0x44655f
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edi, dword [ebp - 0x34]
jmp 0x44655f
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.USER32.dll_GetDC]
push 0x74
jmp 0x4469f2
push 0x104
lea eax, [ebp - 0x280]
push eax
push str.COMSPEC
jmp 0x446c81
push 0x104
lea eax, [ebp - 0x280]
push eax
push str.USERDNSDOMAIN
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x4465f9
lea eax, [ebp - 0x280]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [ebp - 0x280]
call fcn.0041fc60
jmp 0x4465f9
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0x104
push eax
lea eax, [ebp - 0x280]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
jmp 0x4465f9
mov eax, dword [0x4d13c0]
cmp eax, 3
je 0x44688e
mov dword [ebp - 0xc], edi
cmp eax, 4
jne 0x446895
jmp 0x44688e
push 0x104
lea eax, [ebp - 0x280]
push eax
push str.USERPROFILE
jmp 0x446c81
push 0x104
lea eax, [ebp - 0x280]
push eax
push str.HOMEDRIVE
jmp 0x446c81
push 0x104
lea eax, [ebp - 0x280]
push eax
push str.HOMEPATH
jmp 0x446c81
push 0x104
lea eax, [ebp - 0x280]
push eax
push str.HOMESHARE
jmp 0x446c81
push 0x104
lea eax, [ebp - 0x280]
push eax
push str.LOGONSERVER
jmp 0x446c81
push 0x104
lea eax, [ebp - 0x280]
push eax
push str.USERDOMAIN
jmp 0x446c81
lea eax, [esi + 0x14c]
jmp 0x408cdf
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 4], eax
fild dword [ebp - 4]
test eax, eax
jns 0x446d8c
fadd qword [0x4c7f60]
mov esi, dword [ebx + 0xc]
mov ecx, esi
fstp qword [ebp - 8]
call fcn.00405f80
fld qword [ebp - 8]
fstp qword [esi]
mov dword [esi + 0xc], 3
jmp case.0x408cd2.88