Function at 0x40db70
Capabilities:
Get process image filename

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48d666
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x4b8914]
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 esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 0x254], edi
mov dword [ebp - 0x220], 0xf
mov dword [ebp - 0x224], edi
mov byte [ebp - 0x234], 0
push 0x207
lea eax, [ebp - 0x217]
push edi
push eax
mov dword [ebp - 4], edi
mov byte [ebp - 0x218], 0
call fcn.00473a10
add esp, 0xc
cmp ebx, edi
je 0x40dd8c
cmp ebx, 4
je 0x40dd8c
push ebx
push edi
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x40dc79
push 0x207
lea ecx, [ebp - 0x218]
push ecx
push 0
push edi
call sub.PSAPI.DLL_GetModuleFileNameExA
test eax, eax
je 0x40dc91
lea eax, [ebp - 0x218]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40dc27
sub eax, edx
push eax
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x234]
call fcn.004010b2
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x234]
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
push eax
mov ecx, esi
mov byte [esi], 0
call fcn.004023a2
lea ecx, [ebp - 0x234]
call fcn.00401064
jmp 0x40ddbe
push ebx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x40dd3f
push 0x207
lea ecx, [ebp - 0x218]
push ecx
push edi
call sub.PSAPI.DLL_GetProcessImageFileNameA
test eax, eax
je 0x40dd1a
mov dword [ebp - 0x23c], 0xf
mov dword [ebp - 0x240], 0
mov byte [ebp - 0x250], 0
lea edx, [ebp - 0x250]
push edx
sub esp, 0x1c
lea eax, [ebp - 0x218]
mov ecx, esp
mov dword [ebp - 0x254], esp
push eax
mov byte [ebp - 4], 1
call fcn.00401035
call fcn.0040b900
add esp, 0x20
test al, al
je 0x40dd02
lea ecx, [ebp - 0x250]
push ecx
lea ecx, [ebp - 0x234]
call fcn.004023a2
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 0
call fcn.00401064
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40dd5b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.GetProcessImageFileNameA_Pid:_d_failed__LastError:_d
push str.UBASE::PsGetProcessPath
push 2
call fcn.004191b0
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40dd5b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.OpenProcess_Pid:_d_with_PROCESS_QUERY_INFORMATION_failed__LastError:_d
push str.UBASE::PsGetProcessPath
push 2
call fcn.004191b0
add esp, 0x14
lea edx, [ebp - 0x234]
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
push edx
mov ecx, esi
mov byte [esi], 0
call fcn.004023a2
cmp dword [ebp - 0x220], 0x10
jb 0x40ddbe
mov eax, dword [ebp - 0x234]
push eax
jmp 0x40ddb6
push edi
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], edi
push 0x495d69
mov ecx, esi
mov byte [esi], 0
call fcn.004010b2
cmp dword [ebp - 0x220], 0x10
jb 0x40ddbe
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.00471f65
add esp, 4
mov eax, esi
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.00471528
mov esp, ebp
pop ebp
ret