Function at 0x405dd1
Capabilities:
Get common file path

Disassembly:
push ebp
sub esp, 0x234
lea ebp, [esp - 4]
mov eax, dword [0x4407b4]
xor eax, ebp
mov dword [ebp + 0x234], eax
push 0x50
mov eax, 0x434fe0
call fcn.00412414
mov eax, dword [ebp + 0x240]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x3c], eax
call fcn.0040535e
xor eax, eax
mov esi, 0x104
xor ebx, ebx
push esi
mov word [ebp + 0x1c], ax
lea eax, [ebp + 0x1e]
push ebx
push eax
mov dword [ebp - 4], ebx
call fcn.00413d00
add esp, 0xc
push esi
lea eax, [ebp + 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x405e9a
xor eax, eax
mov word [ebp + 0x22c], ax
lea edi, [ebp + 0x22e]
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
push esi
mov word [ebp + 0x124], ax
lea eax, [ebp + 0x126]
push ebx
push eax
call fcn.00413d00
push ebx
push ebx
lea eax, [ebp + 0x124]
push eax
lea eax, [ebp + 0x22c]
push eax
lea eax, [ebp + 0x1c]
push eax
call fcn.00415d58
lea eax, [ebp - 0x2c]
push eax
push str..dll
push str.MorDebug
lea eax, [ebp + 0x124]
push eax
lea eax, [ebp + 0x22c]
push eax
call fcn.00405c98
add esp, 0x34
xor eax, eax
push esi
mov word [ebp + 0x124], ax
lea eax, [ebp + 0x126]
push ebx
push eax
call fcn.00413d00
add esp, 0xc
push esi
lea eax, [ebp + 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x405f23
xor eax, eax
mov word [ebp + 0x22c], ax
lea edi, [ebp + 0x22e]
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
push esi
mov word [ebp + 0x1c], ax
lea eax, [ebp + 0x1e]
push ebx
push eax
call fcn.00413d00
push ebx
push ebx
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp + 0x22c]
push eax
lea eax, [ebp + 0x124]
push eax
call fcn.00415d58
lea eax, [ebp - 0x2c]
push eax
push str..dll
push str.MorDebug
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp + 0x22c]
push eax
call fcn.00405c98
add esp, 0x34
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x20]
push 0x1c
cdq
pop ecx
idiv ecx
test eax, eax
jbe 0x406044
lea ecx, [ebp - 0x5c]
call fcn.00405c7f
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x20]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.004044bc
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x34]
call fcn.004044bc
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x14]
call fcn.00403eb8
test al, al
jne 0x406039
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x14]
call fcn.00403e5d
push eax
lea ecx, [ebp]
call fcn.00401aac
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
mov byte [ebp - 4], 2
jae 0x405f9c
lea eax, [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x405fff
push str.MorDebug_InitEngine
push edi
call esi
mov dword [ebp - 0x38], eax
cmp eax, ebx
je 0x405fff
push str.MorDebug_GetSinkByName
push edi
call esi
mov dword [ebp + 0x22c], eax
cmp eax, ebx
je 0x405fff
push str.MorDebug_CreateNamedPipeHandler
push edi
call esi
cmp eax, ebx
je 0x405fff
push str.MorDebug_CleanupEngine
push edi
call esi
push dword [ebp - 0x3c]
mov dword [0x441a64], eax
call dword [ebp - 0x38]
pop ecx
test eax, eax
jl 0x405fff
push str.Forwarder
call dword [ebp + 0x22c]
pop ecx
mov dword [0x441a60], eax
push ebx
push 1
lea ecx, [ebp]
mov byte [ebp - 4], 1
call fcn.004014a3
lea ecx, [ebp - 0x14]
call fcn.00403e89
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x34]
call fcn.004044bc
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x14]
call fcn.00403eb8
test al, al
je 0x405f7b
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], bl
call fcn.00405b8e
lea ecx, [ebp - 0x2c]
call fcn.00405757
push dword [ebp - 0x2c]
call fcn.0040e79f
pop ecx
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x234]
xor ecx, ebp
call fcn.00411f86
add ebp, 0x238
leave
ret