Function at 0x405360
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x417bce
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x174
push ebx
push esi
lea eax, [esp + 0x78]
push edi
xor ebx, ebx
push eax
push 0x104
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edi, [esp + 0x7c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x80]
push ecx
mov ecx, 0x41fbb0
call fcn.00402330
mov dl, byte [esp + 0xf]
push ebx
lea ecx, [esp + 0x14]
mov byte [esp + 0x14], dl
call fcn.00401d10
mov edi, str.invoked_dir:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.invoked_dir:
lea ecx, [esp + 0x18]
call fcn.00402330
mov eax, dword [0x419218]
lea ecx, [esp + 0x10]
push eax
push ebx
push 0x41fbb0
mov dword [esp + 0x194], ebx
call fcn.0040f2f0
mov edi, 0x41c2dc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41c2dc
lea ecx, [esp + 0x18]
call fcn.0040f3d0
mov cl, byte [esp + 0x10]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x40], esp
push ebx
mov byte [esi], cl
mov ecx, esi
call fcn.00401d10
mov edx, dword [0x419218]
lea eax, [esp + 0x20]
push edx
push ebx
push eax
mov ecx, esi
call fcn.00401b10
call fcn.004051f0
add esp, 0x10
lea ecx, [esp + 0x10]
mov dword [esp + 0x188], 0xffffffff
push 1
call fcn.00401d10
mov ecx, dword [0x41fc08]
xor eax, eax
mov edx, dword [ecx]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, 0x41fbd0
call fcn.00402330
mov dl, byte [esp + 0xf]
push ebx
lea ecx, [esp + 0x14]
mov byte [esp + 0x14], dl
call fcn.00401d10
mov edi, str.program_name:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.program_name:
lea ecx, [esp + 0x18]
call fcn.00402330
mov eax, dword [0x419218]
lea ecx, [esp + 0x10]
push eax
push ebx
push 0x41fbd0
mov dword [esp + 0x194], 1
call fcn.0040f2f0
mov edi, 0x41c2dc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41c2dc
lea ecx, [esp + 0x18]
call fcn.0040f3d0
mov cl, byte [esp + 0x10]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x40], esp
push ebx
mov byte [esi], cl
mov ecx, esi
call fcn.00401d10
mov edx, dword [0x419218]
lea eax, [esp + 0x20]
push edx
push ebx
push eax
mov ecx, esi
call fcn.00401b10
call fcn.004051f0
add esp, 0x10
lea ecx, [esp + 0x10]
mov dword [esp + 0x188], 0xffffffff
push 1
call fcn.00401d10
mov cl, byte [esp + 0xf]
push ebx
mov byte [esp + 0x4c], cl
lea ecx, [esp + 0x4c]
call fcn.00401d10
mov edi, 0x41c1c8
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x419218]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, 2
push ecx
push edx
push 0x41c1c8
mov ecx, 0x41fbd0
mov dword [esp + 0x194], ebx
call fcn.0040f0d0
mov edx, dword [0x419218]
mov esi, eax
mov edi, 0x41c3ac
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push 0x41c3ac
mov ecx, 0x41fbd0
call fcn.0040f0d0
cmp esi, 0xffffffff
jg 0x405656
cmp eax, 0xffffffff
jg 0x405656
mov eax, dword [0x41fbb8]
lea esi, [eax - 1]
cmp eax, esi
jb 0x4055e7
mov eax, dword [0x41fbb4]
test eax, eax
je 0x4055e7
mov ecx, 0x41fbb0
call fcn.0040f150
mov edx, dword [0x41fbb4]
lea eax, [esi + edx]
jmp 0x4055ec
mov eax, 0x41921c
cmp byte [eax], 0x5c
je 0x405610
mov edi, 0x41c1cc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41c1cc
mov ecx, 0x41fbb0
call fcn.0040f3d0
push 0x41fbd0
lea eax, [esp + 0x14]
push 0x41fbb0
push eax
call fcn.0040f660
add esp, 0xc
mov ecx, dword [0x419218]
mov byte [esp + 0x188], 3
push ecx
push 0
push eax
lea ecx, [esp + 0x54]
call fcn.00401b10
push 1
lea ecx, [esp + 0x14]
mov byte [esp + 0x18c], bl
call fcn.00401d10
jmp 0x40566d
mov edx, dword [0x419218]
lea ecx, [esp + 0x48]
push edx
push 0
push 0x41fbd0
call fcn.00401b10
mov al, byte [esp + 0xf]
push 0
lea ecx, [esp + 0x14]
mov byte [esp + 0x14], al
call fcn.00401d10
mov edi, str.full_path:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.full_path:
lea ecx, [esp + 0x18]
call fcn.00402330
mov ecx, dword [0x419218]
lea edx, [esp + 0x48]
push ecx
push 0
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x194], 4
call fcn.0040f2f0
mov edi, 0x41c2dc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41c2dc
lea ecx, [esp + 0x18]
call fcn.0040f3d0
mov al, byte [esp + 0x10]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x40], esp
push 0
mov ecx, esi
mov byte [esi], al
call fcn.00401d10
mov ecx, dword [0x419218]
lea edx, [esp + 0x20]
push ecx
push 0
push edx
mov ecx, esi
call fcn.00401b10
call fcn.004051f0
add esp, 0x10
lea ecx, [esp + 0x10]
mov byte [esp + 0x188], bl
push 1
call fcn.00401d10
mov edi, 0x41c1cc
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x419218]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push 0x41c1cc
lea ecx, [esp + 0x54]
call fcn.0040f0d0
cmp eax, 0xffffffff
jle 0x40578b
push eax
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x54]
call fcn.0040ee90
mov ecx, dword [0x419218]
mov byte [esp + 0x188], 5
push ecx
push 0
push eax
mov ecx, 0x41fbc0
call fcn.00401b10
push 1
lea ecx, [esp + 0x14]
mov byte [esp + 0x18c], bl
call fcn.00401d10
mov dl, byte [esp + 0xf]
push 0
lea ecx, [esp + 0x14]
mov byte [esp + 0x14], dl
call fcn.00401d10
mov edi, str.SetupBD_dir:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.SetupBD_dir:
lea ecx, [esp + 0x18]
call fcn.00402330
mov eax, dword [0x419218]
lea ecx, [esp + 0x10]
push eax
push 0
push 0x41fbc0
mov byte [esp + 0x194], 6
call fcn.0040f2f0
mov edi, 0x41c2dc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41c2dc
lea ecx, [esp + 0x18]
call fcn.0040f3d0
mov cl, byte [esp + 0x10]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x40], esp
push 0
mov byte [esi], cl
mov ecx, esi
call fcn.00401d10
mov edx, dword [0x419218]
lea eax, [esp + 0x20]
push edx
push 0
push eax
mov ecx, esi
call fcn.00401b10
call fcn.004051f0
add esp, 0x10
lea ecx, [esp + 0x10]
mov byte [esp + 0x188], bl
push 1
call fcn.00401d10
push str.SetupBD.ini
lea ecx, [esp + 0x3c]
push 0x41fbc0
push ecx
call fcn.0040f530
add esp, 0xc
mov eax, dword [esp + 0x3c]
mov byte [esp + 0x188], 7
test eax, eax
jne 0x40586b
mov eax, 0x41921c
lea edx, [esp + 0x58]
push edx
push eax
call fcn.004166ae
add esp, 8
test eax, eax
jne 0x405968
mov al, byte [esp + 0xf]
push 0
lea ecx, [esp + 0x24]
mov dword [esp + 0x38], 1
mov byte [esp + 0x24], al
call fcn.00401d10
mov edi, str.ini_file:
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x24]
push ebx
call fcn.00402510
test al, al
je 0x4058e0
mov edi, dword [esp + 0x24]
mov ecx, ebx
mov edx, ecx
mov esi, str.ini_file:
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
call fcn.004024f0
mov eax, dword [0x419218]
lea ecx, [esp + 0x38]
push eax
push 0
push ecx
lea ecx, [esp + 0x2c]
mov byte [esp + 0x194], 8
call fcn.0040f2f0
mov edi, 0x41c2dc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41c2dc
lea ecx, [esp + 0x28]
call fcn.0040f3d0
mov dl, byte [esp + 0x20]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x40], esp
push 0
mov ecx, esi
mov byte [esi], dl
call fcn.00401d10
mov eax, dword [0x419218]
lea ecx, [esp + 0x30]
push eax
push 0
push ecx
mov ecx, esi
call fcn.00401b10
call fcn.004051f0
add esp, 0x10
lea ecx, [esp + 0x20]
mov byte [esp + 0x188], 7
push 1
call fcn.00401d10
jmp 0x405b0b
mov dl, byte [esp + 0xf]
push 0
lea ecx, [esp + 0x24]
mov byte [esp + 0x24], dl
call fcn.00401d10
mov edi, str.ini_file:
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x24]
push ebx
call fcn.00402510
test al, al
je 0x4059bf
mov edi, dword [esp + 0x24]
mov ecx, ebx
mov eax, ecx
mov esi, str.ini_file:
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
call fcn.004024f0
mov ecx, dword [0x419218]
lea edx, [esp + 0x38]
push ecx
push 0
push edx
lea ecx, [esp + 0x2c]
mov byte [esp + 0x194], 9
call fcn.0040f2f0
mov edi, str.__NOT_FOUND
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x28]
repne scasb al, byte es:[edi]
mov eax, dword [0x419218]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x405a03
call fcn.0040f879
test esi, esi
jbe 0x405a48
mov ecx, dword [esp + 0x28]
push 0
lea ebx, [ecx + esi]
lea ecx, [esp + 0x24]
push ebx
call fcn.00402510
test al, al
je 0x405a48
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, esi
mov esi, str.__NOT_FOUND
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
call fcn.004024f0
mov edi, 0x41c2dc
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x28]
repne scasb al, byte es:[edi]
mov eax, dword [0x419218]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x405a6d
call fcn.0040f879
test esi, esi
jbe 0x405ab2
mov eax, dword [esp + 0x28]
push 0
lea ecx, [esp + 0x24]
lea ebx, [eax + esi]
push ebx
call fcn.00402510
test al, al
je 0x405ab2
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, esi
mov esi, 0x41c2dc
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
call fcn.004024f0
mov al, byte [esp + 0x20]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x40], esp
push 0
mov ecx, esi
mov byte [esi], al
call fcn.00401d10
mov ecx, dword [0x419218]
lea edx, [esp + 0x30]
push ecx
push 0
push edx
mov ecx, esi
call fcn.00401b10
call fcn.004051f0
mov ecx, dword [esp + 0x34]
add esp, 0x10
test ecx, ecx
je 0x405b0b
mov al, byte [ecx - 1]
test al, al
je 0x405b01
cmp al, 0xff
je 0x405b01
dec al
mov byte [ecx - 1], al
jmp 0x405b0b
dec ecx
push ecx
call fcn.0040f86e
add esp, 4
mov ecx, dword [esp + 0x3c]
xor esi, esi
cmp ecx, esi
je 0x405b31
mov al, byte [ecx - 1]
test al, al
je 0x405b27
cmp al, 0xff
je 0x405b27
dec al
mov byte [ecx - 1], al
jmp 0x405b31
dec ecx
push ecx
call fcn.0040f86e
add esp, 4
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x3c], esi
cmp ecx, esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
je 0x405b61
mov al, byte [ecx - 1]
test al, al
je 0x405b57
cmp al, 0xff
je 0x405b57
dec al
mov byte [ecx - 1], al
jmp 0x405b61
dec ecx
push ecx
call fcn.0040f86e
add esp, 4
mov ecx, dword [esp + 0x180]
mov eax, dword [esp + 0x34]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x180
ret