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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffca0
mov eax, 0x48d880
push ebx
push esi
push edi
call fcn.004696b8
mov dword [ebp - 0x214], 2
lea edx, [ebp + 0xc]
lea eax, [ebp + 0xc]
call fcn.00474b80
inc dword [ebp - 0x214]
lea edx, [ebp + 8]
mov word [ebp - 0x220], 8
lea eax, [ebp + 8]
call fcn.00474b80
inc dword [ebp - 0x214]
xor edx, edx
mov word [ebp - 0x220], 0x14
mov dword [ebp - 0x14c], edx
mov edx, 0x48b8b5
inc dword [ebp - 0x214]
inc dword [ebp - 0x214]
xor ecx, ecx
mov word [ebp - 0x220], 8
mov dword [ebp - 0x238], ecx
mov dword [ebp - 0x234], ecx
mov word [ebp - 0x220], 0x20
lea eax, [ebp - 0x15c]
call fcn.00474b48
inc dword [ebp - 0x214]
lea edx, [ebp - 0x15c]
lea eax, [ebp + 8]
call fcn.00474e28
push eax
dec dword [ebp - 0x214]
lea eax, [ebp - 0x15c]
mov edx, 2
call fcn.00474d44
pop ecx
test cl, cl
je 0x405572
mov word [ebp - 0x220], 8
mov bl, 3
mov eax, ebx
call fcn.0045fb8c
mov dword [ebp - 0x360], eax
mov dword [ebp - 0x35c], edx
fild qword [ebp - 0x360]
lea edx, [ebp - 0x160]
mov eax, ebx
mov ecx, edx
add al, 0x40
fstp dword [ebp - 0x23c]
mov word [ebp - 0x220], 8
mov word [ebp - 0x220], 0x38
mov edx, eax
mov eax, ecx
call fcn.00474bbc
inc dword [ebp - 0x214]
mov edx, 0x48b8be
mov word [ebp - 0x220], 0x2c
mov word [ebp - 0x220], 0x44
lea eax, [ebp - 0x164]
call fcn.00474b48
inc dword [ebp - 0x214]
xor eax, eax
mov dword [ebp - 0x168], eax
lea eax, [ebp - 0x160]
inc dword [ebp - 0x214]
lea edx, [ebp - 0x164]
lea ecx, [ebp - 0x168]
call fcn.00474d9c
lea edx, [ebp - 0x168]
lea eax, [ebp - 0x160]
call fcn.00474d74
dec dword [ebp - 0x214]
lea eax, [ebp - 0x168]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x164]
mov edx, 2
call fcn.00474d44
fld dword [ebp - 0x23c]
fcomp dword [0x4061dc]
fnstsw ax
sahf
je 0x405544
mov edx, dword [ebp - 0x160]
mov eax, dword [ebp + 0x10]
call fcn.004578d8
dec dword [ebp - 0x214]
lea eax, [ebp - 0x160]
mov edx, 2
call fcn.00474d44
mov word [ebp - 0x220], 8
inc ebx
cmp bl, 0x1a
jbe 0x40544f
jmp 0x406181
mov word [ebp - 0x220], 0x50
xor ecx, ecx
lea eax, [ebp - 0x16c]
mov dword [ebp - 0x16c], ecx
push eax
inc dword [ebp - 0x214]
lea eax, [ebp + 8]
call fcn.00474e58
mov edx, eax
lea eax, [ebp + 8]
mov ecx, 1
call fcn.00474f88
lea edx, [ebp - 0x16c]
push edx
mov edx, 0x48b8c0
lea eax, [ebp - 0x170]
call fcn.00474b48
inc dword [ebp - 0x214]
lea edx, [ebp - 0x170]
pop eax
call fcn.00474e40
push eax
dec dword [ebp - 0x214]
lea eax, [ebp - 0x170]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x16c]
mov edx, 2
call fcn.00474d44
pop ecx
test cl, cl
je 0x40567d
mov word [ebp - 0x220], 0x5c
mov edx, 0x48b8c2
lea eax, [ebp - 0x174]
call fcn.00474b48
inc dword [ebp - 0x214]
xor eax, eax
mov dword [ebp - 0x178], eax
lea eax, [ebp + 8]
inc dword [ebp - 0x214]
lea edx, [ebp - 0x174]
lea ecx, [ebp - 0x178]
call fcn.00474d9c
lea edx, [ebp - 0x178]
lea eax, [ebp + 8]
call fcn.00474d74
dec dword [ebp - 0x214]
lea eax, [ebp - 0x178]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x174]
mov edx, 2
call fcn.00474d44
mov word [ebp - 0x220], 0x68
xor ecx, ecx
mov dword [ebp - 0x17c], ecx
lea edx, [ebp - 0x17c]
inc dword [ebp - 0x214]
mov eax, dword [ebp + 0xc]
call fcn.0045f544
lea ecx, [ebp - 0x17c]
push ecx
mov edx, 0x48b8c4
lea eax, [ebp - 0x180]
call fcn.00474b48
inc dword [ebp - 0x214]
lea edx, [ebp - 0x180]
pop eax
call fcn.00474e40
push eax
dec dword [ebp - 0x214]
lea eax, [ebp - 0x180]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x17c]
mov edx, 2
call fcn.00474d44
pop ecx
test cl, cl
je 0x40612d
lea eax, [ebp - 0x358]
push eax
push 0x100
call sub.KERNEL32.DLL_GetCurrentDirectoryA
mov dl, 1
mov eax, dword [0x455850]
call fcn.00419be8
mov ebx, eax
mov dl, 1
mov eax, dword [0x455850]
call fcn.00419be8
mov word [ebp - 0x220], 0x74
mov esi, eax
lea eax, [ebp - 0x184]
mov edx, 0x48b8c5
call fcn.00474b48
inc dword [ebp - 0x214]
mov edx, dword [eax]
mov eax, dword [ebp + 0x10]
call fcn.004578d8
dec dword [ebp - 0x214]
lea eax, [ebp - 0x184]
mov edx, 2
call fcn.00474d44
mov word [ebp - 0x220], 0x80
xor ecx, ecx
mov dword [ebp - 0x188], ecx
lea ecx, [ebp - 0x188]
inc dword [ebp - 0x214]
lea edx, [ebp + 0xc]
lea eax, [ebp + 8]
call fcn.00474d9c
lea eax, [ebp - 0x188]
mov eax, dword [eax]
lea ecx, [ebp - 0x158]
mov edx, 0x3f
call fcn.0045f930
test eax, eax
mov edx, 2
sete al
and eax, 1
push eax
lea eax, [ebp - 0x188]
dec dword [ebp - 0x214]
call fcn.00474d44
pop ecx
test cl, cl
je 0x405f74
mov word [ebp - 0x220], 0x98
xor eax, eax
mov dword [ebp - 0x18c], eax
lea ecx, [ebp - 0x18c]
inc dword [ebp - 0x214]
lea edx, [ebp - 0x14c]
lea eax, [ebp + 8]
call fcn.00474d9c
mov edx, dword [ebp - 0x18c]
test edx, edx
je 0x405812
mov ecx, dword [ebp - 0x18c]
jmp 0x405817
mov ecx, 0x48b8c8
push ecx
call sub.KERNEL32.DLL_SetCurrentDirectoryA
test eax, eax
mov edx, 2
setne al
and eax, 1
mov byte [ebp - 0x23d], al
lea eax, [ebp - 0x18c]
dec dword [ebp - 0x214]
call fcn.00474d44
mov word [ebp - 0x220], 0x8c
mov cl, byte [ebp - 0x23d]
test cl, cl
jne 0x405863
mov eax, dword [ebp - 0x150]
cmp eax, 0x10
jne 0x405914
mov word [ebp - 0x220], 0xa4
mov edx, 0x48b8c9
lea eax, [ebp - 0x190]
call fcn.00474b48
inc dword [ebp - 0x214]
lea edx, [ebp - 0x190]
lea eax, [ebp - 0x14c]
call fcn.00474e40
test al, al
lea eax, [ebp - 0x190]
setne dl
and edx, 1
push edx
mov edx, 2
dec dword [ebp - 0x214]
call fcn.00474d44
pop ecx
test ecx, ecx
je 0x405914
mov edx, 0x48b8cb
lea eax, [ebp - 0x194]
call fcn.00474b48
inc dword [ebp - 0x214]
lea edx, [ebp - 0x194]
lea eax, [ebp - 0x14c]
call fcn.00474e40
test al, al
lea eax, [ebp - 0x194]
setne cl
and ecx, 1
mov edx, 2
push ecx
dec dword [ebp - 0x214]
call fcn.00474d44
pop ecx
test ecx, ecx
je 0x405914
mov edx, dword [ebp - 0x14c]
mov eax, ebx
call fcn.004578d8
jmp 0x405b99
mov word [ebp - 0x220], 0xb0
mov edx, 0x48b8ce
lea eax, [ebp - 0x198]
call fcn.00474b48
inc dword [ebp - 0x214]
lea edx, [ebp - 0x198]
lea eax, [ebp - 0x14c]
call fcn.00474e40
test al, al
je 0x405993
mov edx, 0x48b8d0
lea eax, [ebp - 0x19c]
call fcn.00474b48
inc dword [ebp - 0x214]
lea edx, [ebp - 0x19c]
lea eax, [ebp - 0x14c]
call fcn.00474e40
test al, al
lea eax, [ebp - 0x19c]
setne cl
and ecx, 1
mov edx, 2
push ecx
dec dword [ebp - 0x214]
call fcn.00474d44
pop ecx
test ecx, ecx
jne 0x405997
xor eax, eax
jmp 0x40599c
mov eax, 1
push eax
dec dword [ebp - 0x214]
lea eax, [ebp - 0x198]
mov edx, 2
call fcn.00474d44
pop ecx
test cl, cl
je 0x405b99
mov word [ebp - 0x220], 0xbc
mov eax, dword [ebp - 0x158]
call fcn.004751dc
fstp qword [ebp - 0x248]
lea eax, [ebp - 0x248]
xor edx, edx
mov dword [ebp - 0x1b8], edx
lea edx, [ebp - 0x1b8]
inc dword [ebp - 0x214]
call fcn.004751e8
lea eax, [ebp - 0x1b8]
xor ecx, ecx
push eax
mov dword [ebp - 0x1a8], ecx
inc dword [ebp - 0x214]
lea edx, [ebp - 0x1a8]
mov eax, dword [ebp - 0x154]
call fcn.0045f6c4
lea ecx, [ebp - 0x1a8]
push ecx
mov edx, 0x48b8d3
lea eax, [ebp - 0x1a0]
call fcn.00474b48
inc dword [ebp - 0x214]
xor eax, eax
mov dword [ebp - 0x1a4], eax
lea eax, [ebp - 0x14c]
inc dword [ebp - 0x214]
lea edx, [ebp - 0x1a0]
lea ecx, [ebp - 0x1a4]
call fcn.00474d9c
lea eax, [ebp - 0x1a4]
xor edx, edx
mov dword [ebp - 0x1ac], edx
lea ecx, [ebp - 0x1ac]
inc dword [ebp - 0x214]
pop edx
call fcn.00474d9c
lea eax, [ebp - 0x1ac]
push eax
mov edx, 0x48b8d5
lea eax, [ebp - 0x1b0]
call fcn.00474b48
inc dword [ebp - 0x214]
xor eax, eax
mov dword [ebp - 0x1b4], eax
lea edx, [ebp - 0x1b0]
inc dword [ebp - 0x214]
lea ecx, [ebp - 0x1b4]
pop eax
call fcn.00474d9c
lea eax, [ebp - 0x1b4]
xor edx, edx
mov dword [ebp - 0x1bc], edx
lea ecx, [ebp - 0x1bc]
inc dword [ebp - 0x214]
pop edx
call fcn.00474d9c
lea edx, [ebp - 0x1bc]
mov eax, esi
mov edx, dword [edx]
call fcn.004578d8
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1bc]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1b8]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1b4]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1b0]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1ac]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1a8]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1a4]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1a0]
mov edx, 2
call fcn.00474d44
mov word [ebp - 0x220], 8
jmp 0x405f74
mov word [ebp - 0x220], 0xd4
xor ecx, ecx
mov dword [ebp - 0x1c0], ecx
lea ecx, [ebp - 0x1c0]
inc dword [ebp - 0x214]
lea edx, [ebp - 0x14c]
lea eax, [ebp + 8]
call fcn.00474d9c
mov eax, dword [ebp - 0x1c0]
test eax, eax
je 0x405be4
mov edx, dword [ebp - 0x1c0]
jmp 0x405be9
mov edx, 0x48b8d7
push edx
call sub.KERNEL32.DLL_SetCurrentDirectoryA
test eax, eax
mov edx, 2
setne al
and eax, 1
mov byte [ebp - 0x249], al
lea eax, [ebp - 0x1c0]
dec dword [ebp - 0x214]
call fcn.00474d44
mov word [ebp - 0x220], 0xc8
mov cl, byte [ebp - 0x249]
test cl, cl
jne 0x405c35
mov eax, dword [ebp - 0x150]
cmp eax, 0x10
jne 0x405ce6
mov word [ebp - 0x220], 0xe0
mov edx, 0x48b8d8
lea eax, [ebp - 0x1c4]
call fcn.00474b48
inc dword [ebp - 0x214]
lea edx, [ebp - 0x1c4]
lea eax, [ebp - 0x14c]
call fcn.00474e40
test al, al
lea eax, [ebp - 0x1c4]
setne dl
and edx, 1
push edx
mov edx, 2
dec dword [ebp - 0x214]
call fcn.00474d44
pop ecx
test ecx, ecx
je 0x405ce6
mov edx, 0x48b8da
lea eax, [ebp - 0x1c8]
call fcn.00474b48
inc dword [ebp - 0x214]
lea edx, [ebp - 0x1c8]
lea eax, [ebp - 0x14c]
call fcn.00474e40
test al, al
lea eax, [ebp - 0x1c8]
setne cl
and ecx, 1
mov edx, 2
push ecx
dec dword [ebp - 0x214]
call fcn.00474d44
pop ecx
test ecx, ecx
je 0x405ce6
mov edx, dword [ebp - 0x14c]
mov eax, ebx
call fcn.004578d8
jmp 0x405f6b
mov word [ebp - 0x220], 0xec
mov edx, 0x48b8dd
lea eax, [ebp - 0x1cc]
call fcn.00474b48
inc dword [ebp - 0x214]
lea edx, [ebp - 0x1cc]
lea eax, [ebp - 0x14c]
call fcn.00474e40
test al, al
je 0x405d65
mov edx, 0x48b8df
lea eax, [ebp - 0x1d0]
call fcn.00474b48
inc dword [ebp - 0x214]
lea edx, [ebp - 0x1d0]
lea eax, [ebp - 0x14c]
call fcn.00474e40
test al, al
lea eax, [ebp - 0x1d0]
setne cl
and ecx, 1
mov edx, 2
push ecx
dec dword [ebp - 0x214]
call fcn.00474d44
pop ecx
test ecx, ecx
jne 0x405d69
xor eax, eax
jmp 0x405d6e
mov eax, 1
push eax
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1cc]
mov edx, 2
call fcn.00474d44
pop ecx
test cl, cl
je 0x405f6b
mov word [ebp - 0x220], 0xf8
mov eax, dword [ebp - 0x158]
call fcn.004751dc
fstp qword [ebp - 0x254]
lea eax, [ebp - 0x254]
xor edx, edx
mov dword [ebp - 0x1ec], edx
lea edx, [ebp - 0x1ec]
inc dword [ebp - 0x214]
call fcn.004751e8
lea eax, [ebp - 0x1ec]
xor ecx, ecx
push eax
mov dword [ebp - 0x1dc], ecx
inc dword [ebp - 0x214]
lea edx, [ebp - 0x1dc]
mov eax, dword [ebp - 0x154]
call fcn.0045f6c4
lea ecx, [ebp - 0x1dc]
push ecx
mov edx, 0x48b8e2
lea eax, [ebp - 0x1d4]
call fcn.00474b48
inc dword [ebp - 0x214]
xor eax, eax
mov dword [ebp - 0x1d8], eax
lea eax, [ebp - 0x14c]
inc dword [ebp - 0x214]
lea edx, [ebp - 0x1d4]
lea ecx, [ebp - 0x1d8]
call fcn.00474d9c
lea eax, [ebp - 0x1d8]
xor edx, edx
mov dword [ebp - 0x1e0], edx
lea ecx, [ebp - 0x1e0]
inc dword [ebp - 0x214]
pop edx
call fcn.00474d9c
lea eax, [ebp - 0x1e0]
push eax
mov edx, 0x48b8e4
lea eax, [ebp - 0x1e4]
call fcn.00474b48
inc dword [ebp - 0x214]
xor eax, eax
mov dword [ebp - 0x1e8], eax
lea edx, [ebp - 0x1e4]
inc dword [ebp - 0x214]
lea ecx, [ebp - 0x1e8]
pop eax
call fcn.00474d9c
lea eax, [ebp - 0x1e8]
xor edx, edx
mov dword [ebp - 0x1f0], edx
lea ecx, [ebp - 0x1f0]
inc dword [ebp - 0x214]
pop edx
call fcn.00474d9c
lea edx, [ebp - 0x1f0]
mov eax, esi
mov edx, dword [edx]
call fcn.004578d8
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1f0]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1ec]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1e8]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1e4]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1e0]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1dc]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1d8]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1d4]
mov edx, 2
call fcn.00474d44
mov word [ebp - 0x220], 8
lea eax, [ebp - 0x158]
call fcn.0045f980
test eax, eax
je 0x405ba7
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x7c]
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x7c]
xor ecx, ecx
mov dword [ebp - 0x258], ecx
mov word [ebp - 0x220], 8
jmp 0x405ffe
mov word [ebp - 0x220], 0x104
xor eax, eax
lea ecx, [ebp - 0x1f4]
mov dword [ebp - 0x1f4], eax
mov eax, ebx
inc dword [ebp - 0x214]
mov edi, dword [eax]
mov edx, dword [ebp - 0x258]
call dword [edi + 0xc]
lea edx, [ebp - 0x1f4]
mov eax, dword [ebp + 0x10]
mov edx, dword [edx]
call fcn.004578d8
dec dword [ebp - 0x214]
lea eax, [ebp - 0x1f4]
mov edx, 2
call fcn.00474d44
inc dword [ebp - 0x258]
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x14]
mov ecx, dword [ebp - 0x258]
cmp eax, ecx
jg 0x405fa8
mov edi, ebx
mov dword [ebp - 0x1fc], edi
test edi, edi
je 0x406045
mov eax, dword [edi]
mov dword [ebp - 0x1f8], eax
mov word [ebp - 0x220], 0x11c
mov edx, 3
mov eax, dword [ebp - 0x1fc]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x220], 0x110
mov word [ebp - 0x220], 0x128
mov edx, 0x48b8e6
lea eax, [ebp - 0x200]
call fcn.00474b48
inc dword [ebp - 0x214]
mov edx, dword [eax]
mov eax, dword [ebp + 0x10]
call fcn.004578d8
dec dword [ebp - 0x214]
lea eax, [ebp - 0x200]
mov edx, 2
call fcn.00474d44
mov word [ebp - 0x220], 8
xor ebx, ebx
jmp 0x4060de
mov word [ebp - 0x220], 0x134
xor eax, eax
lea ecx, [ebp - 0x204]
mov dword [ebp - 0x204], eax
mov eax, esi
inc dword [ebp - 0x214]
mov edx, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
lea edx, [ebp - 0x204]
mov eax, dword [ebp + 0x10]
mov edx, dword [edx]
call fcn.004578d8
dec dword [ebp - 0x214]
lea eax, [ebp - 0x204]
mov edx, 2
call fcn.00474d44
inc ebx
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x14]
cmp ebx, eax
jl 0x406091
mov ebx, esi
mov dword [ebp - 0x20c], ebx
test ebx, ebx
je 0x40611f
mov eax, dword [ebx]
mov dword [ebp - 0x208], eax
mov word [ebp - 0x220], 0x14c
mov edx, 3
mov eax, dword [ebp - 0x20c]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x220], 0x140
lea edx, [ebp - 0x358]
push edx
call sub.KERNEL32.DLL_SetCurrentDirectoryA
jmp 0x406181
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 0x14c]
dec dword [ebp - 0x214]
dec dword [ebp - 0x214]
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp + 8]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.00474d44
pop eax
mov edx, dword [ebp - 0x230]
mov dword fs:[0], edx
jmp 0x4061d3
mov al, 1
mov edx, 2
push eax
lea eax, [ebp - 0x14c]
dec dword [ebp - 0x214]
dec dword [ebp - 0x214]
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp + 8]
mov edx, 2
call fcn.00474d44
dec dword [ebp - 0x214]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.00474d44
pop eax
mov edx, dword [ebp - 0x230]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret