Function at 0x4051d0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x416cde
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, 0x41eb20
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 [0x418218]
lea ecx, [esp + 0x10]
push eax
push ebx
push 0x41eb20
mov dword [esp + 0x194], ebx
call fcn.0040e410
mov edi, 0x41b2a0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41b2a0
lea ecx, [esp + 0x18]
call fcn.0040e4f0
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 [0x418218]
lea eax, [esp + 0x20]
push edx
push ebx
push eax
mov ecx, esi
call fcn.00401b10
call fcn.00405060
add esp, 0x10
lea ecx, [esp + 0x10]
mov dword [esp + 0x188], 0xffffffff
push 1
call fcn.00401d10
mov ecx, dword [0x41eb74]
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, 0x41eb40
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 [0x418218]
lea ecx, [esp + 0x10]
push eax
push ebx
push 0x41eb40
mov dword [esp + 0x194], 1
call fcn.0040e410
mov edi, 0x41b2a0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41b2a0
lea ecx, [esp + 0x18]
call fcn.0040e4f0
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 [0x418218]
lea eax, [esp + 0x20]
push edx
push ebx
push eax
mov ecx, esi
call fcn.00401b10
call fcn.00405060
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, 0x41b1c8
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x418218]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, 2
push ecx
push edx
push 0x41b1c8
mov ecx, 0x41eb40
mov dword [esp + 0x194], ebx
call fcn.0040e1f0
mov edx, dword [0x418218]
mov esi, eax
mov edi, 0x41b370
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push 0x41b370
mov ecx, 0x41eb40
call fcn.0040e1f0
cmp esi, 0xffffffff
jg 0x4054c6
cmp eax, 0xffffffff
jg 0x4054c6
mov eax, dword [0x41eb28]
lea esi, [eax - 1]
cmp eax, esi
jb 0x405457
mov eax, dword [0x41eb24]
test eax, eax
je 0x405457
mov ecx, 0x41eb20
call fcn.0040e270
mov edx, dword [0x41eb24]
lea eax, [esi + edx]
jmp 0x40545c
mov eax, 0x41821c
cmp byte [eax], 0x5c
je 0x405480
mov edi, 0x41b1cc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41b1cc
mov ecx, 0x41eb20
call fcn.0040e4f0
push 0x41eb40
lea eax, [esp + 0x14]
push 0x41eb20
push eax
call fcn.0040e780
add esp, 0xc
mov ecx, dword [0x418218]
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 0x4054dd
mov edx, dword [0x418218]
lea ecx, [esp + 0x48]
push edx
push 0
push 0x41eb40
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 [0x418218]
lea edx, [esp + 0x48]
push ecx
push 0
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x194], 4
call fcn.0040e410
mov edi, 0x41b2a0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41b2a0
lea ecx, [esp + 0x18]
call fcn.0040e4f0
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 [0x418218]
lea edx, [esp + 0x20]
push ecx
push 0
push edx
mov ecx, esi
call fcn.00401b10
call fcn.00405060
add esp, 0x10
lea ecx, [esp + 0x10]
mov byte [esp + 0x188], bl
push 1
call fcn.00401d10
mov edi, 0x41b1cc
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x418218]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push 0x41b1cc
lea ecx, [esp + 0x54]
call fcn.0040e1f0
cmp eax, 0xffffffff
jle 0x4055fb
push eax
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x54]
call fcn.0040dfb0
mov ecx, dword [0x418218]
mov byte [esp + 0x188], 5
push ecx
push 0
push eax
mov ecx, 0x41eb30
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 [0x418218]
lea ecx, [esp + 0x10]
push eax
push 0
push 0x41eb30
mov byte [esp + 0x194], 6
call fcn.0040e410
mov edi, 0x41b2a0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41b2a0
lea ecx, [esp + 0x18]
call fcn.0040e4f0
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 [0x418218]
lea eax, [esp + 0x20]
push edx
push 0
push eax
mov ecx, esi
call fcn.00401b10
call fcn.00405060
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 0x41eb30
push ecx
call fcn.0040e650
add esp, 0xc
mov eax, dword [esp + 0x3c]
mov byte [esp + 0x188], 7
test eax, eax
jne 0x4056db
mov eax, 0x41821c
lea edx, [esp + 0x58]
push edx
push eax
call fcn.004154ee
add esp, 8
test eax, eax
jne 0x4057d8
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 0x405750
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 [0x418218]
lea ecx, [esp + 0x38]
push eax
push 0
push ecx
lea ecx, [esp + 0x2c]
mov byte [esp + 0x194], 8
call fcn.0040e410
mov edi, 0x41b2a0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41b2a0
lea ecx, [esp + 0x28]
call fcn.0040e4f0
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 [0x418218]
lea ecx, [esp + 0x30]
push eax
push 0
push ecx
mov ecx, esi
call fcn.00401b10
call fcn.00405060
add esp, 0x10
lea ecx, [esp + 0x20]
mov byte [esp + 0x188], 7
push 1
call fcn.00401d10
jmp 0x40597b
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 0x40582f
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 [0x418218]
lea edx, [esp + 0x38]
push ecx
push 0
push edx
lea ecx, [esp + 0x2c]
mov byte [esp + 0x194], 9
call fcn.0040e410
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 [0x418218]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x405873
call fcn.0040e999
test esi, esi
jbe 0x4058b8
mov ecx, dword [esp + 0x28]
push 0
lea ebx, [ecx + esi]
lea ecx, [esp + 0x24]
push ebx
call fcn.00402510
test al, al
je 0x4058b8
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, 0x41b2a0
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x28]
repne scasb al, byte es:[edi]
mov eax, dword [0x418218]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x4058dd
call fcn.0040e999
test esi, esi
jbe 0x405922
mov eax, dword [esp + 0x28]
push 0
lea ecx, [esp + 0x24]
lea ebx, [eax + esi]
push ebx
call fcn.00402510
test al, al
je 0x405922
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, esi
mov esi, 0x41b2a0
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 [0x418218]
lea edx, [esp + 0x30]
push ecx
push 0
push edx
mov ecx, esi
call fcn.00401b10
call fcn.00405060
mov ecx, dword [esp + 0x34]
add esp, 0x10
test ecx, ecx
je 0x40597b
mov al, byte [ecx - 1]
test al, al
je 0x405971
cmp al, 0xff
je 0x405971
dec al
mov byte [ecx - 1], al
jmp 0x40597b
dec ecx
push ecx
call fcn.0040e98e
add esp, 4
mov ecx, dword [esp + 0x3c]
xor esi, esi
cmp ecx, esi
je 0x4059a1
mov al, byte [ecx - 1]
test al, al
je 0x405997
cmp al, 0xff
je 0x405997
dec al
mov byte [ecx - 1], al
jmp 0x4059a1
dec ecx
push ecx
call fcn.0040e98e
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 0x4059d1
mov al, byte [ecx - 1]
test al, al
je 0x4059c7
cmp al, 0xff
je 0x4059c7
dec al
mov byte [ecx - 1], al
jmp 0x4059d1
dec ecx
push ecx
call fcn.0040e98e
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