Function at 0x407b90
Capabilities:
Get common file path

Disassembly:
sub esp, 0x114
push ebx
push esi
push edi
mov esi, ecx
push ebp
xor edi, edi
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov eax, dword [esp + 0x128]
mov dword [esi + 0x10], edi
push eax
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
call fcn.00407f60
push eax
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [esi], eax
call ebx
xor edx, edx
test eax, eax
jle 0x407be7
mov ecx, dword [esi]
cmp byte [ecx + edx], 0x5c
je 0x407be2
inc edx
cmp edx, eax
jl 0x407bd5
jmp 0x407be7
mov edi, 1
test edi, edi
je 0x407bfb
mov eax, dword [esi]
lea ecx, [esp + 0x24]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x407c3f
lea eax, [esp + 0x24]
push 0x100
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
call ebp
lea ecx, [esp + 0x24]
push ecx
call ebx
cmp byte [esp + eax + 0x23], 0x5c
je 0x407c2f
lea eax, [esp + 0x24]
push 0x40d184
push eax
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
call edi
jmp 0x407c35
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [esi]
lea ecx, [esp + 0x24]
push eax
push ecx
call edi
xor edi, edi
lea eax, [esp + 0x24]
push edi
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
cmp eax, 0xffffffff
mov ebp, eax
je 0x407ebf
push 2
mov ebx, dword [sym.imp.KERNEL32.dll__llseek]
push edi
push ebp
call ebx
mov dword [esp + 0x14], eax
push edi
push edi
push ebp
call ebx
mov eax, dword [esp + 0x14]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov eax, dword [esp + 0x14]
push eax
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll__lread]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll__lclose]
call ebp
xor eax, eax
cmp dword [esp + 0x14], edi
jle 0x407ca8
cmp byte [ebx + edi], 0xa
jne 0x407ca1
inc eax
inc edi
cmp edi, dword [esp + 0x14]
jl 0x407c9a
inc eax
mov dword [esi + 0xc], eax
xor edi, edi
shl eax, 3
xor ebp, ebp
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esi + 0x10], eax
mov dword [esp + 0x10], edi
mov eax, ebx
cmp dword [esp + 0x14], edi
jle 0x407d0b
cmp byte [ebx + ebp], 0xd
jne 0x407cd5
mov byte [ebx + ebp], 0
cmp byte [ebx + ebp], 0xa
jne 0x407d04
push eax
mov ecx, esi
mov byte [ebx + ebp], 0
call fcn.00407f60
mov ecx, dword [esi + 0x10]
test edi, edi
mov dword [ecx + edi], eax
je 0x407cf9
mov eax, dword [esi + 0x10]
add eax, edi
mov dword [eax - 4], eax
add edi, 8
lea eax, [ebx + ebp + 1]
inc dword [esp + 0x10]
inc ebp
cmp ebp, dword [esp + 0x14]
jl 0x407ccb
push eax
mov ecx, esi
call fcn.00407f60
mov ecx, dword [esi + 0x10]
mov edx, dword [esp + 0x10]
test edx, edx
mov dword [ecx + edx*8], eax
je 0x407d2a
mov eax, dword [esi + 0x10]
lea eax, [eax + edx*8]
mov dword [eax - 4], eax
mov eax, dword [esp + 0x10]
push ebx
inc eax
xor ebx, ebx
xor edi, edi
xor ebp, ebp
mov dword [esi + 8], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [esi + 8], ebx
jle 0x407d60
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + ebx]
push ecx
mov ecx, esi
call fcn.00407fa0
test eax, eax
je 0x407d57
inc edi
add ebx, 8
inc ebp
cmp dword [esi + 8], ebp
jg 0x407d44
inc edi
mov dword [esi + 0x18], edi
shl edi, 2
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esi + 0x1c], eax
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
cmp dword [esi + 0x18], eax
jle 0x407eb9
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov edi, dword [esp + 0x18]
cmp dword [esi + 8], edi
jle 0x407dc3
lea ebx, [edi*8]
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + ebx]
push ecx
mov ecx, esi
call fcn.00407fa0
test eax, eax
jne 0x407dbf
add ebx, 8
inc edi
cmp dword [esi + 8], edi
jg 0x407da2
jmp 0x407dc3
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x18]
inc edi
mov ebp, edi
cmp dword [esi + 8], edi
jle 0x407e09
lea ebx, [edi*8]
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + ebx]
push ecx
mov ecx, esi
call fcn.00408010
test eax, eax
je 0x407dee
inc dword [esp + 0x10]
jmp 0x407e00
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + ebx]
push ecx
mov ecx, esi
call fcn.00407fa0
test eax, eax
jne 0x407e09
add ebx, 8
inc ebp
cmp dword [esi + 8], ebp
jg 0x407dd6
mov eax, dword [esp + 0x10]
lea ecx, [eax*4 + 0x10]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x1c]
mov dword [eax + 4], edx
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x18]
shl eax, 3
add eax, dword [esi + 0x10]
mov dword [ecx + 8], eax
cmp dword [esi + 8], edi
jle 0x407e8b
lea ebp, [ecx + 0xc]
lea ebx, [edi*8]
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + ebx]
push ecx
mov ecx, esi
call fcn.00408010
test eax, eax
mov eax, dword [esi + 0x10]
je 0x407e73
add eax, ebx
add ebp, 4
inc dword [esp + 0x10]
mov dword [ebp - 4], eax
jmp 0x407e82
mov ecx, dword [eax + ebx]
push ecx
mov ecx, esi
call fcn.00407fa0
test eax, eax
jne 0x407e8b
add ebx, 8
inc edi
cmp dword [esi + 8], edi
jg 0x407e50
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x18], edi
mov dword [ecx], eax
inc dword [esp + 0x20]
mov edx, dword [esi + 0x1c]
mov eax, dword [esp + 0x20]
add dword [esp + 0x14], 4
mov dword [edx + ebx], ecx
cmp dword [esi + 0x18], eax
jg 0x407d8a
mov eax, dword [esi + 0x18]
mov dword [esi + 0x14], eax
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x114
ret 4