Function at 0x40c760
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x1008
call fcn.0046d7d0
mov eax, dword [0x4d1028]
mov bl, 1
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp dword [0x4d2924], 0
jne 0x40cad6
mov esi, dword [0x4d2904]
test esi, esi
je 0x40c7a5
test byte [0x4d1008], 1
jne 0x40c90b
jmp 0x40cad6
push 0x18
call fcn.0046d61c
add esp, 4
mov esi, eax
lea ebx, [ebp - 0x1010]
push 0x800
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], 0
push ebx
call fcn.0047f05d
add esp, 4
mov edi, eax
cmp eax, 7
jbe 0x40c805
sub esp, 0xc
mov al, byte [ebp - 0x1014]
mov ecx, esi
mov byte [esp + 4], al
mov dword [esp + 8], ebx
mov dword [esp], edi
call fcn.004028e6
jmp 0x40c81d
mov eax, edi
mov dword [esi + 0x10], edi
add eax, edi
push eax
push ebx
push esi
call fcn.00471f40
add esp, 0xc
mov word [esi + edi*2], 0
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edx, esi
mov bl, 1
cmp ecx, 7
jbe 0x40c82e
mov edx, dword [esi]
test eax, eax
je 0x40c846
mov edi, eax
add edi, 0xffffffff
cmovae edi, eax
cmp word [edx + edi*2], 0x5c
jne 0x40c84a
lea edi, [edx + edi*2]
jmp 0x40c861
xor eax, eax
jmp 0x40c885
add edi, edi
nop dword [eax]
test edi, edi
je 0x40c885
cmp word [edx + edi - 2], 0x5c
lea edi, [edi - 2]
jne 0x40c850
add edi, edx
sub edi, edx
cmp edi, 0xfffffffe
je 0x40c885
sar edi, 1
lea ecx, [edi + 1]
cmp eax, ecx
jb 0x40caed
mov dword [esi + 0x10], ecx
mov word [edx + edi*2 + 2], 0
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
mov edx, ecx
sub edx, eax
cmp edx, 9
jae 0x40c8bb
sub esp, 0x10
mov al, byte [ebp - 0x1014]
mov ecx, esi
mov byte [esp + 4], al
mov dword [esp + 0xc], 9
mov dword [esp + 8], str.debug.log
mov dword [esp], 9
call fcn.00402728
jmp 0x40c8f8
lea edx, [eax + 9]
cmp ecx, 7
mov ecx, esi
mov dword [esi + 0x10], edx
jbe 0x40c8ca
mov ecx, dword [esi]
movzx edx, word [0x4909fa]
movsd xmm0, qword [0x4909f2]
movsd xmm1, qword [str.debug.log]
mov word [ecx + eax*2 + 0x10], dx
movsd qword [ecx + eax*2 + 8], xmm0
movsd qword [ecx + eax*2], xmm1
mov word [ecx + eax*2 + 0x12], 0
mov dword [0x4d2904], esi
test byte [0x4d1008], 1
je 0x40cad6
cmp dword [esi + 0x14], 8
jb 0x40c913
mov esi, dword [esi]
push 0
push 0x80
push 4
push 0
push 3
push 4
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x4d2924], eax
inc eax
cmp eax, 1
ja 0x40cad6
lea edi, [ebp - 0x1010]
mov word [ebp - 0x1010], 0
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
dec eax
cmp eax, 0x103
ja 0x40cad4
mov esi, dword [0x4d2904]
push edi
call fcn.0047f05d
add esp, 4
mov ecx, edi
mov edi, eax
mov eax, dword [esi + 0x14]
cmp eax, edi
jae 0x40c99e
sub esp, 0xc
mov al, byte [ebp - 0x1014]
mov byte [esp + 4], al
mov dword [esp + 8], ecx
mov ecx, esi
mov dword [esp], edi
call fcn.004028e6
mov edx, dword [0x4d2904]
mov esi, edx
jmp 0x40c9c3
cmp eax, 8
mov ebx, esi
jb 0x40c9a7
mov ebx, dword [esi]
mov eax, edi
mov dword [esi + 0x10], edi
add eax, edi
push eax
push ecx
push ebx
call fcn.004724c0
add esp, 0xc
mov word [ebx + edi*2], 0
mov edx, esi
mov bl, 1
mov ecx, dword [esi + 0x14]
mov edi, edx
cmp ecx, 8
jb 0x40c9cf
mov edi, dword [esi]
mov eax, dword [esi + 0x10]
cmp word [edi + eax*2 - 2], 0x5c
je 0x40ca2b
cmp ecx, eax
jne 0x40ca11
sub esp, 0x10
mov al, byte [ebp - 0x1014]
mov ecx, esi
mov byte [esp + 4], al
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x4900f8
mov dword [esp], 1
call fcn.00402728
mov esi, dword [0x4d2904]
jmp 0x40ca25
lea edi, [eax + 1]
cmp ecx, 8
mov dword [esi + 0x10], edi
jb 0x40ca1e
mov edx, dword [esi]
mov dword [edx + eax*2], 0x5c
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
mov edx, ecx
sub edx, eax
cmp edx, 9
jae 0x40ca61
sub esp, 0x10
mov al, byte [ebp - 0x1014]
mov ecx, esi
mov byte [esp + 4], al
mov dword [esp + 0xc], 9
mov dword [esp + 8], str.debug.log
mov dword [esp], 9
call fcn.00402728
jmp 0x40ca9c
lea edx, [eax + 9]
cmp ecx, 8
mov dword [esi + 0x10], edx
jb 0x40ca6e
mov esi, dword [esi]
movzx ecx, word [0x4909fa]
movsd xmm0, qword [0x4909f2]
movsd xmm1, qword [str.debug.log]
mov word [esi + eax*2 + 0x10], cx
movsd qword [esi + eax*2 + 8], xmm0
movsd qword [esi + eax*2], xmm1
mov word [esi + eax*2 + 0x12], 0
mov eax, dword [0x4d2904]
cmp dword [eax + 0x14], 8
jb 0x40caa9
mov eax, dword [eax]
push 0
push 0x80
push 4
push 0
push 3
push 4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x4d2924], eax
inc eax
cmp eax, 1
ja 0x40cad6
mov dword [0x4d2924], 0
xor ebx, ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046d691
mov eax, ebx
add esp, 0x1008
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.00404380
int3