Function at 0x40ba60
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6e485b
mov eax, dword fs:[0]
push eax
sub esp, 0x614
mov eax, dword [0x7cf070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov bl, dl
mov edi, ecx
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x618]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [edi]
call fcn.005f4234
add esp, 0x14
cmp word [ebp - 0x18], 0
jne 0x40bcc6
call fcn.004b08d6
mov ecx, eax
test ecx, ecx
jne 0x40bad5
push 0x80004005
call fcn.00402890
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x61c], esi
mov dword [ebp - 4], 0
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
test bl, bl
je 0x40bb60
or eax, ecx
jge 0x40bb18
push 0x104
lea ecx, [ebp - 0x61c]
call fcn.004027a0
mov esi, dword [ebp - 0x61c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40bb4b
cmp eax, 0x104
je 0x40bb4b
push dword [esi - 8]
push esi
call fcn.005f57a6
add esp, 8
test eax, eax
jns 0x40bb4d
push 0x80070057
call fcn.00402890
xor eax, eax
cmp eax, dword [esi - 8]
jg 0x40bb41
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
jmp 0x40bc08
or eax, ecx
jge 0x40bb7a
push 0x104
lea ecx, [ebp - 0x61c]
call fcn.004027a0
mov esi, dword [ebp - 0x61c]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x40bba3
cmp eax, 0x104
jae 0x40bba3
push dword [esi - 8]
push esi
call fcn.005f57a6
add esp, 8
test eax, eax
js 0x40bb41
jmp 0x40bba5
xor eax, eax
cmp eax, dword [esi - 8]
jg 0x40bb41
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea ecx, [ebp - 0x61c]
push 0x5c
call fcn.0040ccc0
push 0x2f
lea ecx, [ebp - 0x61c]
call fcn.0040ccc0
mov ecx, str.CRUYYYYYciu__7_HW_lwwy__6ENRTT_bkoo__7
call fcn.0045f920
mov edx, eax
test edx, edx
jne 0x40bbe1
xor ecx, ecx
jmp 0x40bbf5
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40bbe6
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x61c]
call fcn.004071f0
mov esi, dword [ebp - 0x61c]
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x618]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x18]
push eax
push esi
call fcn.005f4234
lea ecx, [ebp - 0x18]
add esp, 0x14
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40bc30
sub ecx, edx
lea eax, [ebp - 0x18]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x61c]
call fcn.00404fa0
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40bc60
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x61c]
call fcn.004071f0
mov eax, dword [edi]
lea ecx, [ebp - 0x61c]
push dword [eax - 0xc]
push eax
call fcn.004071f0
lea eax, [ebp - 0x61c]
mov ecx, edi
push eax
call fcn.00405050
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x61c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40bcc6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005e9199
mov esp, ebp
pop ebp
ret