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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
push ebx
push esi
push edi
mov dword [ebp - 0x1c], ecx
xor eax, eax
push 0x104
lea ecx, [ebp - 0x10]
mov word [ebp - 0x338], ax
call fcn.00408db7
mov eax, dword [ebp + 8]
xor edi, edi
mov esi, dword [eax]
mov ebx, edi
push esi
push dword [ebx*4 + 0x4bcde0]
call fcn.00422cf3
pop ecx
pop ecx
test eax, eax
je 0x41e89d
inc ebx
cmp ebx, 0x61
jl 0x41e884
mov esi, dword [ebp - 0x1c]
cmp ebx, 0x61
je 0x47c5e9
cmp ebx, 0x60
ja case.0x41e8ae.88
jmp dword [ebx*4 + 0x41e9c6]
lea eax, [esi + 0xd8]
mov ecx, dword [ebp + 0xc]
push eax
call fcn.00408cf2
lea ecx, [ebp - 0x10]
call fcn.00406ea2
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 8
push 0x49ec88
mov ecx, dword [ebp + 0xc]
call fcn.0040dc23
jmp case.0x41e8ae.88
lea eax, [esi + 0xc8]
jmp 0x41e8bb
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], edi
mov dword [esi + 0xc], 1
jmp case.0x41e8ae.88
push 0x4b528c
jmp 0x41e8da
push 0x4b48f4
jmp 0x41e8da
push 0x4b5290
jmp 0x41e8da
push 0x26
jmp 0x47c856
push 0x2b
jmp 0x47c856
push 5
jmp 0x47c856
push 0x23
jmp 0x47c856
push 0x19
jmp 0x47c856
push 0x2e
jmp 0x47c856
push 0x1f
jmp 0x47c856
push 0x17
jmp 0x47c856
push 0x16
jmp 0x47c856
push 0x18
jmp 0x47c856
push 0x1c
jmp 0x47c856
push 0x1a
jmp 0x47c856
push 0x10
jmp 0x47c856
push 6
jmp 0x47c856
push 2
jmp 0x47c856
push 0xb
jmp 0x47c856
lea eax, [esi + 0xb8]
jmp 0x41e8bb
push str.WIN32_NT
jmp 0x41e8da
mov eax, dword [0x4c336c]
add eax, 0xc
jmp 0x41e8bb
push 2
jmp 0x41e9ae
push 4
pop ecx
jmp 0x47c6f2
push 3
jmp 0x41e9ae
lea eax, [esi + 0x150]
jmp 0x41e8bb
push 0x4b5230
lea ecx, [ebp - 0x38]
call fcn.0040dc83
push dword [ebp + 8]
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x1c], edi
call fcn.00408d4e
push edi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.0040e48b
cmp dword [ebp + 8], edi
jne 0x47c620
or edi, 0xffffffff
jmp 0x47c62b
push dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
call fcn.0040ea38
lea ecx, [ebp - 0x38]
jmp 0x47c756
mov eax, dword [esi]
lea ecx, [esi + 4]
mov eax, dword [eax + 4]
add ecx, eax
call fcn.00408da9
mov edi, dword [eax + 0x14]
jmp 0x47c64d
mov edi, dword [esi + 0x14c]
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], edi
xor edi, edi
jmp 0x41e8f8
mov eax, dword [esi]
lea ecx, [esi + 4]
mov eax, dword [eax + 4]
add ecx, eax
call fcn.00408da9
mov ecx, dword [ebp + 0xc]
add eax, 0x20
push eax
call fcn.0040ea38
jmp case.0x41e8ae.88
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.DLL_GetLocalTime]
movzx eax, word [ebp - 0x1a]
push eax
push 0x4b5294
jmp 0x47c6ae
lea ecx, [ebp - 0x110]
call fcn.0045f829
mov ecx, eax
call fcn.0045f7b8
push eax
push 0x4b4654
lea eax, [ebp - 0x338]
push eax
call fcn.00422e3b
jmp 0x47c6dc
lea eax, [ebp - 0x338]
push eax
push 0x104
push str.InstallLanguage
mov edx, str.SYSTEMCurrentControlSetControlNlsLanguage
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0041e6ec
add esp, 0xc
jmp 0x47c6e7
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryW]
lea eax, [ebp - 0x338]
jmp 0x47c6fd
xor ecx, ecx
inc ecx
lea edx, [ebp - 0x68]
call fcn.004483e5
lea eax, [ebp - 0x68]
push eax
jmp 0x41e8da
push 0x4b52a0
lea eax, [ebp - 0x100]
push eax
lea ecx, [ebp - 0xb0]
call fcn.0045f829
mov ecx, eax
call fcn.0045f75d
mov ecx, dword [ebp + 0xc]
push eax
call fcn.00408cf2
lea ecx, [ebp - 0x100]
jmp 0x47c756
push 0x4b52c8
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x30]
call fcn.0045f829
mov ecx, eax
call fcn.0045f75d
mov ecx, dword [ebp + 0xc]
push eax
call fcn.00408cf2
lea ecx, [ebp - 0x78]
call fcn.00406ea2
jmp case.0x41e8ae.88
push 0x4b52a8
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0xf0]
call fcn.0045f829
mov ecx, eax
call fcn.0045f75d
mov ecx, dword [ebp + 0xc]
push eax
call fcn.00408cf2
lea ecx, [ebp - 0x88]
jmp 0x47c756
push 0x4b52b0
lea eax, [ebp - 0x98]
push eax
lea ecx, [ebp - 0xc8]
call fcn.0045f829
mov ecx, eax
call fcn.0045f75d
mov ecx, dword [ebp + 0xc]
push eax
call fcn.00408cf2
lea ecx, [ebp - 0x98]
jmp 0x47c756
push 0x4b4654
lea eax, [ebp - 0xa8]
push eax
lea ecx, [ebp - 0xe0]
call fcn.0045f829
mov ecx, eax
call fcn.0045f75d
mov ecx, dword [ebp + 0xc]
push eax
call fcn.00408cf2
lea ecx, [ebp - 0xa8]
jmp 0x47c756
push 0x4b52b8
lea eax, [ebp - 0xc0]
push eax
lea ecx, [ebp - 0xe8]
call fcn.0045f829
mov ecx, eax
call fcn.0045f75d
mov ecx, dword [ebp + 0xc]
push eax
call fcn.00408cf2
lea ecx, [ebp - 0xc0]
jmp 0x47c756
push 0x4b52c0
lea eax, [ebp - 0xd8]
push eax
lea ecx, [ebp - 0x108]
call fcn.0045f829
mov ecx, eax
call fcn.0045f75d
mov ecx, dword [ebp + 0xc]
push eax
call fcn.00408cf2
lea ecx, [ebp - 0xd8]
jmp 0x47c756
push 7
lea edx, [ebp - 0x10]
pop ecx
call fcn.004484ef
lea eax, [ebp - 0x10]
jmp 0x41e8bb
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x338]
push eax
mov dword [ebp - 0x14], 0x104
call dword [sym.imp.KERNEL32.DLL_GetComputerNameW]
jmp 0x47c6e7
push 0x104
lea eax, [ebp - 0x338]
push eax
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryW]
test eax, eax
je case.0x41e8ae.88
jmp 0x47c6e7
mov eax, dword [0x4c336c]
push 0x104
cmp byte [eax + 0x2c], 0
lea eax, [ebp - 0x338]
push eax
je 0x47c6e1
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x1c], edi
call fcn.0045f745
call eax
cmp dword [ebp - 0x24], edi
je 0x47c6e7
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
jmp 0x47c6e7
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 6
jmp 0x41e8f8
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 3
jmp 0x41e8f8
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 9
jmp 0x41e8f8
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 5
jmp 0x41e8f8
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 0xa
jmp 0x41e8f8
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 2
jmp 0x41e8f8
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 7
jmp 0x41e8f8
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 8
jmp 0x41e8f8
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 4
jmp 0x41e8f8
call fcn.00413740
mov dword [esi + 0xc], ebx
mov dword [esi], ebx
jmp case.0x41e8ae.88
xor ebx, ebx
inc ebx
cmp byte [0x4c20c6], bl
jmp 0x47c9c5
xor ebx, ebx
inc ebx
cmp byte [0x4c28f9], bl
mov esi, dword [ebp + 0xc]
mov ecx, esi
je 0x47c9a2
call fcn.00413740
mov dword [esi + 0xc], ebx
mov dword [esi], edi
jmp case.0x41e8ae.88
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 0x40
jmp 0x41e8f8
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 0x41
jmp 0x41e8f8
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 0x42
jmp 0x41e8f8
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
mov dword [esi], 0x43
jmp 0x41e8f8
mov eax, dword [esi + 0xf8]
test eax, eax
jne 0x47ca3f
mov eax, dword [esi + 0xf4]
push eax
call fcn.00443e86
mov edi, eax
jmp 0x47c64d
lea eax, [ebp - 0x338]
push eax
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryW]
jmp 0x47c6e7
mov eax, dword [0x4c336c]
movzx eax, word [eax + 0x2e]
test eax, eax
je 0x47ca9b
cmp eax, 6
je 0x47ca91
mov ecx, dword [ebp + 0xc]
cmp eax, 9
je 0x47ca87
push str.UNKNOWN
jmp 0x41e8dd
push 0x4b52e4
jmp 0x41e8dd
push str.IA64
jmp 0x41e8da
push 0x4b52d0
jmp 0x41e8da
xor ecx, ecx
mov eax, reloc.WSOCK32.dll_accept
cpuid
lea esi, [ebp - 0x78]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
test dword [ebp - 0x6c], 0x20000000
mov eax, 0x4b52e4
mov ecx, 0x4b52d0
cmove eax, ecx
jmp 0x47c6fd
mov eax, dword [0x4c336c]
xor ebx, ebx
inc ebx
cmp byte [eax + 0x2a], bl
jne 0x47caec
push str.WIN_81
jmp 0x41e8da
cmp byte [eax + 0x28], bl
jne 0x47cafb
push str.WIN_8
jmp 0x41e8da
cmp byte [eax + 0x26], bl
jne 0x47cb0a
push str.WIN_2008R2
jmp 0x41e8da
cmp byte [eax + 0x24], bl
jne 0x47cb19
push str.WIN_7
jmp 0x41e8da
cmp byte [eax + 0x22], bl
jne 0x47cb28
push str.WIN_2008
jmp 0x41e8da
cmp byte [eax + 0x20], bl
jne 0x47cb37
push str.WIN_VISTA
jmp 0x41e8da
cmp byte [eax + 0x1e], bl
jne 0x47cb46
push str.WIN_2003
jmp 0x41e8da
cmp byte [eax + 0x1c], bl
jne 0x47cb62
cmp byte [eax + 0x30], 0
mov ecx, str.WIN_XPe
mov edx, str.WIN_XP
cmove ecx, edx
push ecx
jmp 0x41e8da
push str.UNKNOWN
jmp 0x41e8da
mov eax, dword [0x4c336c]
mov edi, dword [eax + 8]
jmp 0x47c64d
lea eax, [ebp - 0x338]
push eax
push 0x104
push str.SchemeLangID
mov edx, str.Control_PanelAppearance
mov ecx, reloc.WSOCK32.dll_accept
call fcn.0041e6ec
movzx eax, word [ebp - 0x338]
add esp, 0xc
lea ecx, [ebp - 0x338]
push edi
push eax
push 4
pop edx
mov dword [ebp - 0x14], eax
call fcn.0040dbc7
pop ecx
pop ecx
jmp 0x47c6e7
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
lea eax, [ebp - 0x124]
jmp 0x47c6fd
lea eax, [ebp - 0x338]
push str.3__3__9__21
push eax
call fcn.00422433
lea eax, [ebp - 0x338]
push eax
mov esi, edi
mov ebx, edi
call fcn.004223eb
add esp, 0xc
test eax, eax
jle 0x47cc3f
push 0x20
pop edi
push 0x2e
pop ecx
movzx eax, word [ebp + ebx*2 - 0x338]
cmp ax, di
je 0x47cc28
cmp eax, 0x2c
jne 0x47cc1f
mov word [ebp + esi*2 - 0x338], cx
jmp 0x47cc27
mov word [ebp + esi*2 - 0x338], ax
inc esi
lea eax, [ebp - 0x338]
push eax
inc ebx
call fcn.004223eb
pop ecx
push 0x2e
pop ecx
cmp ebx, eax
jl 0x47cc03
xor edi, edi
xor eax, eax
mov word [ebp + esi*2 - 0x338], ax
jmp 0x47c6e7
push 0x104
lea eax, [ebp - 0x338]
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
jmp 0x47c6e7
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edi, dword [ebp - 0x40]
jmp 0x47c64d
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edi, dword [ebp - 0x3c]
jmp 0x47c64d
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
mov dword [ebp + 8], eax
call dword [sym.imp.USER32.dll_GetDC]
push 0xc
jmp 0x47ccbe
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
mov dword [ebp + 8], eax
call dword [sym.imp.USER32.dll_GetDC]
push 0x74
mov ebx, eax
push ebx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov esi, dword [ebp + 0xc]
mov ecx, esi
mov edi, eax
call fcn.00413740
push ebx
push dword [ebp + 8]
mov dword [esi + 0xc], 1
mov dword [esi], edi
call dword [sym.imp.USER32.dll_ReleaseDC]
xor edi, edi
jmp case.0x41e8ae.88
push 0x104
lea eax, [ebp - 0x338]
push eax
push str.COMSPEC
jmp 0x47cd11
push 0x104
lea eax, [ebp - 0x338]
push eax
push str.USERDNSDOMAIN
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
jmp 0x47c6e7
lea eax, [ebp - 0x338]
push eax
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
lea ecx, [ebp - 0x338]
call fcn.0040398f
jmp 0x47c6e7
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x338]
push eax
mov dword [ebp - 0x14], 0x104
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
jmp 0x47c6e7
mov eax, dword [0x4c2124]
cmp eax, 3
je case.0x41e8ae.44
cmp eax, 4
jne case.0x41e8ae.31
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00413740
xor ebx, ebx
inc ebx
jmp 0x47c9a7
push 0x104
lea eax, [ebp - 0x338]
push eax
push str.USERPROFILE
jmp 0x47cd11
push 0x104
lea eax, [ebp - 0x338]
push eax
push str.HOMEDRIVE
jmp 0x47cd11
push 0x104
lea eax, [ebp - 0x338]
push eax
push str.HOMEPATH
jmp 0x47cd11
push 0x104
lea eax, [ebp - 0x338]
push eax
push str.HOMESHARE
jmp 0x47cd11
push 0x104
lea eax, [ebp - 0x338]
push eax
push str.LOGONSERVER
jmp 0x47cd11
push 0x104
lea eax, [ebp - 0x338]
push eax
push str.USERDOMAIN
jmp 0x47cd11
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
mov esi, dword [ebp + 0xc]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
mov ecx, esi
addsd xmm0, qword [eax*8 + 0x4b7560]
movsd qword [ebp - 0x20], xmm0
call fcn.00413740
movsd xmm0, qword [ebp - 0x20]
mov dword [esi + 0xc], 3
movsd qword [esi], xmm0
jmp case.0x41e8ae.88