Function at 0x41e410
Capabilities:
Connect network resource
Get disk information
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x46c
mov eax, dword [0x456d10]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x10]
push str.Entering_SetupNTHomeDriveAndScript___r_n
push 1
mov dword [ebp - 0x440], eax
call fcn.0041a380
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.0042bf20
add esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push 0x410
lea esi, [ebx + 0x474]
mov dword [ebx + 4], eax
push 0
push esi
mov dword [ebx + 8], 0
call fcn.0042bf20
add esp, 0xc
test edi, edi
je 0x41e4a1
mov ecx, edi
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41e490
sub ecx, edx
cmp ecx, 3
jb 0x41e4a1
push edi
jmp 0x41e4d9
cmp byte [esi], 0
jne 0x41e4d8
push str.UserProfile
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x44c]
push eax
call fcn.00427325
lea eax, [ebp - 0x20c]
push eax
push 0x44f734
push esi
call fcn.00419670
add esp, 0x1c
push esi
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00427b16
add esp, 0xc
lea eax, [ebp - 0x108]
push 0x104
push eax
call dword [sym.imp.SHELL32.dll_DoEnvironmentSubstA]
cmp byte [ebp - 0x107], 0x3a
jne 0x41e652
mov al, byte [ebp - 0x106]
cmp al, 0x3a
jne 0x41e801
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41e523
sub ecx, edx
cmp ecx, 9
jbe 0x41e652
lea eax, [ebp - 0x108]
push eax
call fcn.0041e860
lea eax, [ebp - 0x108]
mov dword [ebp - 0x468], 1
mov dword [ebp - 0x45c], eax
xor esi, esi
lea eax, [ebp - 0x105]
mov byte [ebp - 0x106], 0
mov dword [ebp - 0x458], eax
lea eax, [ebp - 0x103]
push 0x5c
push eax
call fcn.00427670
add esp, 0xc
test eax, eax
je 0x41e597
inc eax
push 0x5c
push eax
call fcn.00427670
mov esi, eax
add esp, 8
test esi, esi
je 0x41e597
mov byte [esi], 0
inc esi
push 0
push 0
push 0
lea eax, [ebp - 0x46c]
mov dword [ebp - 0x450], 0
push eax
mov dword [ebp - 0x46c], 0
mov dword [ebp - 0x460], 0
mov dword [ebp - 0x454], 0
call sub.MPR.dll_WNetAddConnection2A
cmp eax, 0x55
je 0x41e5dd
cmp eax, 0x4b2
jne 0x41e5fe
push 1
push 1
push dword [ebp - 0x45c]
call sub.MPR.dll_WNetCancelConnection2A
push 0
push 0
push 0
lea eax, [ebp - 0x46c]
push eax
call sub.MPR.dll_WNetAddConnection2A
test eax, eax
je 0x41e7d6
cmp eax, 0x55
je 0x41e7d6
cmp eax, 0x4b2
je 0x41e7d6
push str.UserProfile
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x44c]
push eax
call fcn.00427325
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push 0x44f734
push eax
call fcn.00404cf0
add esp, 0x1c
mov esi, dword [ebp - 0x440]
push esi
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x108]
push eax
call esi
cmp eax, 1
je 0x41e6b4
push str.UserProfile
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x44c]
push eax
call fcn.00427325
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push 0x44f734
push eax
call fcn.00404cf0
add esp, 0x1c
lea eax, [ebp - 0x108]
push eax
call esi
test edi, edi
je 0x41e6c1
push edi
call fcn.0041b930
add esp, 4
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41e6d0
sub ecx, edx
lea eax, [ecx + 1]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea ecx, [ebp - 0x108]
mov esi, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41e6f0
sub ecx, edx
lea eax, [ecx + 1]
push eax
push 0
push esi
call fcn.0042bf20
lea ecx, [ebp - 0x108]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41e711
sub ecx, edx
lea eax, [ebp - 0x108]
push eax
lea eax, [ecx + 1]
push eax
push esi
call fcn.00427b16
push str.HOMEDRIVE
push 0x104
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x444]
push eax
call fcn.00427325
add esp, 0x1c
test eax, eax
jne 0x41e757
cmp dword [ebp - 0x444], eax
jne 0x41e785
movsx eax, byte [esi + 1]
push eax
movsx eax, byte [esi]
push eax
lea eax, [ebp - 0x43c]
push str._c_c
push eax
call fcn.0041d770
lea eax, [ebp - 0x43c]
push eax
push str.HOMEDRIVE
call fcn.00427ef4
add esp, 0x18
push str.HOMEPATH
push 0x104
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x444]
push eax
call fcn.00427325
add esp, 0x10
test eax, eax
jne 0x41e7b1
cmp dword [ebp - 0x444], eax
jne 0x41e7c2
lea eax, [esi + 2]
push eax
push str.HOMEPATH
call fcn.00427ef4
add esp, 8
mov ecx, dword [ebp - 4]
mov eax, dword [ebx + 8]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004265fb
mov esp, ebp
pop ebp
ret
mov word [ebp - 0x106], 0x5c
test esi, esi
je 0x41e652
push esi
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00427b8d
add esp, 0xc
jmp 0x41e652
cmp al, 0x5c
jne 0x41e652
push 3
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x448]
push 4
push eax
call fcn.00427f68
add esp, 0x10
mov byte [ebp - 0x445], 0
lea eax, [ebp - 0x448]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 1
ja 0x41e652
push dword [ebp - 0x448]
mov esi, dword [ebp - 0x440]
push esi
call fcn.0041e390
add esp, 8
jmp 0x41e658