Function at 0x405100
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fa7e0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0xa5dc
call fcn.004f2630
push ebx
push esi
push edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], esp
push 0x180
call fcn.004f266a
add esp, 4
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
call fcn.00404a50
mov ecx, dword [ebp - 0x20]
add esp, 4
push ecx
call fcn.004fa6c0
add esp, 4
lea edx, [ebp - 0x5ec]
mov dword [ebp - 0x1c], eax
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x4e8]
lea edx, [ebp - 0x4e8]
rep stosd dword es:[edi], eax
mov al, byte [ebp - 0x5ec]
mov edi, str.:Documents_and_Settings_
mov byte [ebp - 0x4e8], al
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x24]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0xa5ec]
lea edx, [ebp - 0x4e8]
push ecx
push edx
call fcn.00405000
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x18], eax
cmp eax, dword [ebp - 0x24]
jge 0x40531a
shl eax, 8
mov ecx, 0xf558a0
lea ebx, [ebp + eax - 0xa5ec]
push ebx
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x64]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x2e4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x64]
push ecx
push 0x50e144
push edx
call fcn.004f175f
lea edi, [ebp - 0x2e4]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0xf558a0
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
lea edi, [ebp - 0x64]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
lea edx, [edi - 1]
test edx, edx
jle 0x4052a7
cmp byte [ebp + edx - 0x64], 0x5c
je 0x4052a7
dec edx
jmp 0x405299
xor eax, eax
mov ecx, edi
sub ecx, edx
cmp eax, ecx
jge 0x4052d3
mov esi, dword [ebp - 0x18]
mov ecx, esi
shl ecx, 8
add ecx, eax
add ecx, edx
shl esi, 6
mov cl, byte [ebp + ecx - 0xa5eb]
add esi, eax
inc eax
mov byte [ebp + esi - 0x25ec], cl
jmp 0x4052a9
mov eax, dword [ebp - 0x18]
shl eax, 6
mov ecx, eax
sub ecx, edx
lea edx, [ebp + eax - 0x25ec]
add ecx, edi
push edx
mov byte [ebp + ecx - 0x25ed], 0
mov ecx, 0xf558a0
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
jmp 0x4051d7
call fcn.00404bf0
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x264]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00404d00
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x3e4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00404f80
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x164]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor ebx, ebx
rep movsb byte es:[edi], byte [esi]
mov dword [0xc30bfc], ebx
cmp ebx, 0x80
jge 0x40549e
lea eax, [ebx + ebx*2]
or ecx, 0xffffffff
mov edi, 0xc30c0c
lea eax, [eax + eax*4]
lea eax, [eax + eax*8]
shl eax, 2
sub eax, ebx
lea edx, [eax + eax*2]
xor eax, eax
shl edx, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [edx + 0x8dc1f8]
mov eax, ecx
mov dword [ebp - 0x14], esi
mov esi, edi
mov edi, dword [ebp - 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0xc30c0c
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [edx + 0x8dc238]
mov eax, ecx
mov dword [ebp - 0x14], esi
mov esi, edi
mov edi, dword [ebp - 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0xc30c0c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea esi, [edx + 0x8dc2b8]
sub edi, ecx
mov eax, ecx
mov dword [ebp - 0x14], esi
mov esi, edi
mov edi, dword [ebp - 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0xc30c0c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea esi, [edx + 0x8e0598]
sub edi, ecx
mov eax, ecx
mov dword [ebp - 0x14], esi
mov esi, edi
mov edi, dword [ebp - 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
lea edx, [edx + 0x8de428]
rep movsb byte es:[edi], byte [esi]
mov edi, 0xc30c0c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
jmp 0x4053a0
lea ecx, [ebp - 0x264]
push str.NULL
push ecx
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4054de
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea edx, [ebp - 0x264]
push edx
call ebx
test eax, eax
setne al
test al, al
je 0x4054e4
mov eax, dword [ebp - 0x1c]
push 0
push eax
call fcn.00405e70
add esp, 8
jmp 0x4054e4
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0x3e4]
push str.NULL
push ecx
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x40551d
lea edx, [ebp - 0x3e4]
push edx
call ebx
test eax, eax
setne al
test al, al
je 0x40551d
push 0
push str.All_Users
call fcn.00405e70
add esp, 8
lea eax, [ebp - 0x264]
lea ecx, [ebp - 0x164]
push eax
push ecx
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x405570
lea edx, [ebp - 0x164]
push str.NULL
push edx
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x405570
lea eax, [ebp - 0x164]
push eax
call ebx
test eax, eax
setne al
test al, al
je 0x405570
push 0
push str.Administrator
call fcn.00405e70
add esp, 8
xor edi, edi
cmp edi, dword [ebp - 0x24]
jge 0x4055e5
mov ecx, edi
lea edx, [ebp - 0x264]
shl ecx, 8
push edx
lea esi, [ebp + ecx - 0xa5ec]
push esi
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4055e2
lea eax, [ebp - 0x3e4]
push eax
push esi
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4055e2
lea ecx, [ebp - 0x164]
push ecx
push esi
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4055e2
push esi
call ebx
test eax, eax
setne al
test al, al
je 0x4055e2
mov edx, edi
push 0
shl edx, 6
lea eax, [ebp + edx - 0x25ec]
push eax
call fcn.00405e70
add esp, 8
inc edi
jmp 0x405572
xor esi, esi
xor edi, edi
mov dword [ebp - 0x18], esi
mov ecx, dword [0xc30bfc]
mov dword [ebp - 0x14], edi
inc ecx
cmp edi, ecx
jge 0x405777
lea eax, [edi + edi*2]
push 0x50e120
lea ebx, [eax + eax*4]
lea ebx, [ebx + ebx*8]
shl ebx, 2
sub ebx, edi
lea ebx, [ebx + ebx*2]
shl ebx, 4
lea eax, [ebx + 0x8dc238]
push eax
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x405745
lea eax, [ebx + 0x8dc238]
push 0x50e114
push eax
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x405745
lea eax, [esi + esi*2]
or ecx, 0xffffffff
lea edi, [ebx + 0x8dc1f8]
lea eax, [eax + eax*4]
lea eax, [eax + eax*8]
shl eax, 2
sub eax, esi
lea edx, [eax + eax*2]
mov eax, dword [ebp + 8]
shl edx, 4
add edx, eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
lea edi, [ebx + 0x8dc238]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [edx + 0x40]
mov eax, ecx
mov dword [ebp - 0x1c], esi
mov esi, edi
mov edi, dword [ebp - 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebx + 0x8dc2b8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea esi, [edx + 0xc0]
sub edi, ecx
mov eax, ecx
mov dword [ebp - 0x1c], esi
mov esi, edi
mov edi, dword [ebp - 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebx + 0x8de428]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea esi, [edx + 0x2230]
sub edi, ecx
mov eax, ecx
mov dword [ebp - 0x1c], esi
mov esi, edi
mov edi, dword [ebp - 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
add edx, 0x43a0
rep movsb byte es:[edi], byte [esi]
lea edi, [ebx + 0x8e0598]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0x18]
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov esi, eax
inc edi
jmp 0x4055ec
push 0x50e0fc
mov ecx, 0xf558a0
call fcn.004f0087
push edi
mov ecx, eax
call fcn.004f0458
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
inc edi
jmp 0x4055ec
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.004f265f
mov edx, dword [ebp + 0xc]
add esp, 4
mov ax, 1
mov dword [edx], esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret