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

Disassembly:
push 0xffffffffffffffff
push 0x46c31e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x850
push ebx
push ebp
push esi
xor esi, esi
mov ebp, ecx
push 0x244
mov dword [esp + 0x24], 0x105
mov word [esp + 0x658], si
call fcn.00453048
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, esi
mov dword [esp + 0x864], esi
je 0x4069ab
mov ecx, eax
call fcn.00402000
mov dword [esp + 0x1c], eax
jmp 0x4069af
mov dword [esp + 0x1c], esi
mov eax, dword [esp + 0x870]
mov edx, dword [esp + 0x86c]
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x654]
push eax
or ebx, 0xffffffff
push ecx
push edx
mov ecx, esi
mov dword [esp + 0x870], ebx
call fcn.004021e0
test al, al
je 0x406d00
lea eax, [esp + 0xc]
mov ecx, esi
push eax
mov dword [esp + 0x18], ebx
call fcn.00403550
test al, al
je 0x406d00
push edi
mov ecx, dword [esp + 0x10]
movsx eax, word [ecx]
sub eax, 0x30
dec eax
je 0x406b81
sub eax, 3
je 0x406b33
dec eax
jne 0x406ce7
mov eax, dword [ecx + 8]
mov ecx, dword [ecx + 4]
lea edx, [esp + 0x28]
push edx
push eax
push ecx
call fcn.00405f00
add esp, 0xc
test al, al
je 0x406ce7
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], ebx
mov ecx, ebx
lea edx, [esp + 0x130]
mov edi, dword [eax + 0x24]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Help
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]
lea ecx, [esp + 0x134]
push ecx
call fcn.004322f0
add esp, 8
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x406b01
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x406aa3
lea ecx, [esp + 0x550]
push eax
push ecx
jmp 0x406ab0
lea edx, [esp + 0x550]
push str.Help
push edx
call fcn.004017d0
add esp, 8
lea eax, [esp + 0x28]
lea ecx, [esp + 0x238]
push eax
push ecx
call fcn.004017d0
lea edx, [esp + 0x558]
lea eax, [esp + 0x240]
push edx
push eax
call fcn.00401820
lea ecx, [esp + 0x248]
push 0x483d38
push ecx
call fcn.00401820
lea edx, [esp + 0x250]
push edx
call fcn.0040a030
add esp, 0x1c
lea eax, [esp + 0x28]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0xd4]
mov eax, dword [esp + 0x10]
push 0
push str.Help
push ecx
push edx
lea ecx, [esp + 0x38]
push eax
push ecx
jmp 0x406cdf
call fcn.0040bf60
test al, al
jne 0x406ce7
lea edx, [esp + 0x24]
lea eax, [esp + 0x340]
push edx
push eax
call fcn.0040b270
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x348]
push ecx
push edx
call fcn.00406010
add esp, 0x10
test al, al
je 0x406ce7
mov eax, dword [esp + 0x10]
push eax
call fcn.004068a0
add esp, 4
jmp 0x406ce7
lea ecx, [esp + 0x24]
lea edx, [esp + 0x340]
push ecx
push edx
call fcn.0040b270
mov eax, dword [esp + 0x18]
push 0x2e
mov ecx, dword [eax + 0x1c]
push ecx
call fcn.00432520
add esp, 0x10
test eax, eax
je 0x406cc2
call fcn.0040bf60
test al, al
jne 0x406ce7
mov edx, dword [esp + 0x10]
mov ecx, ebx
xor eax, eax
lea esi, [esp + 0x130]
mov edi, dword [edx + 0x24]
mov dword [esp + 0x1c], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 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]
mov edi, dword [edx + 0x1c]
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
lea esi, [esp + 0x75c]
sub edi, ecx
mov eax, esi
mov edx, ecx
mov esi, edi
mov edi, eax
lea eax, [esp + 0x130]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x75c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x17]
push ecx
push edx
lea ecx, [esp + 0x450]
push eax
push ecx
call fcn.0040b940
add esp, 0x10
test eax, eax
jne 0x406ce7
mov al, byte [esp + 0x17]
test al, al
je 0x406ce7
call fcn.00401d40
test al, al
je 0x406cb3
mov edi, dword [str..tmp]
mov ecx, ebx
xor eax, eax
lea edx, [esp + 0x448]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x18]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0xd4]
lea edx, [esp + 0x44c]
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x138]
push edx
push eax
push ecx
mov dword [esp + 0x2c], ebx
call fcn.00405e70
add esp, 0x14
jmp 0x406ce7
mov edx, dword [esp + 0x10]
push edx
call fcn.004068a0
add esp, 4
jmp 0x406ce7
mov eax, dword [ebp + 0xd4]
mov ecx, dword [esp + 0x10]
push 1
push 0
push ebx
push eax
lea edx, [esp + 0x350]
push ecx
mov dword [esp + 0x2c], ebx
push edx
call fcn.00406180
add esp, 0x18
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.00403550
test al, al
jne 0x4069fd
pop edi
test esi, esi
je 0x406d14
mov ecx, esi
call fcn.00402140
push esi
call fcn.00453071
add esp, 4
mov ecx, dword [esp + 0x85c]
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x85c
ret 8