Function at 0x402f52
Capabilities:
Get common file path

Disassembly:
mov eax, 0x4135c7
call fcn.00408d30
sub esp, 0x258
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
push 0x41
pop ecx
xor eax, eax
mov word [ebp - 0x15c], bx
lea edi, [ebp - 0x15a]
rep stosd dword es:[edi], eax
push 0x104
lea eax, [ebp - 0x15c]
push eax
push ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
mov esi, str.MorDebug
je 0x402ff9
xor eax, eax
mov word [ebp - 0x14], bx
push 0x41
lea edi, [ebp - 0x12]
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
push ebx
mov word [ebp - 0x264], bx
lea edi, [ebp - 0x262]
rep stosd dword es:[edi], eax
push ebx
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x15c]
push eax
call fcn.0040a11d
lea eax, [ebp - 0x28]
push eax
push str..dll
push esi
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00402e6c
add esp, 0x28
push 0x41
pop ecx
xor eax, eax
mov word [ebp - 0x264], bx
lea edi, [ebp - 0x262]
rep stosd dword es:[edi], eax
push 0x104
lea eax, [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x403079
xor eax, eax
mov word [ebp - 0x14], bx
push 0x41
lea edi, [ebp - 0x12]
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
push ebx
mov word [ebp - 0x15c], bx
lea edi, [ebp - 0x15a]
rep stosd dword es:[edi], eax
push ebx
lea eax, [ebp - 0x15c]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x264]
push eax
call fcn.0040a11d
lea eax, [ebp - 0x28]
push eax
push str..dll
push esi
lea eax, [ebp - 0x15c]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00402e6c
add esp, 0x28
lea ecx, [ebp - 0x28]
call fcn.0040219b
test eax, eax
jbe 0x40314c
lea ecx, [ebp - 0x54]
call fcn.004024d4
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x20]
mov byte [ebp - 4], 1
mov dword [ebp - 0x18], eax
je 0x403141
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [ebp - 0x18]
lea ecx, [ebp - 0x48]
call fcn.0040184a
cmp dword [ebp - 0x30], 0x10
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 2
jae 0x4030c5
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x403122
push str.MorDebug_InitEngine
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0x2c], eax
je 0x403122
push str.MorDebug_GetSinkByName
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x403122
push str.MorDebug_CreateNamedPipeHandler
push edi
call esi
cmp eax, ebx
je 0x403122
push str.MorDebug_CleanupEngine
push edi
call esi
push dword [ebp + 8]
mov dword [0x419084], eax
call dword [ebp - 0x2c]
test eax, eax
pop ecx
jl 0x403122
push str.Forwarder
call dword [ebp - 0x14]
pop ecx
mov dword [0x419080], eax
push ebx
push 1
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.004011e9
add dword [ebp - 0x18], 0x1c
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
jne 0x4030aa
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], bl
call fcn.00402dfc
lea ecx, [ebp - 0x28]
call fcn.00402abd
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
leave
ret