Function at 0x412fa0
Capabilities:
Get process image filename

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x490bc6
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x4bcad4]
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.00477750
add esp, 0xc
cmp ebx, edi
je 0x4131bc
cmp ebx, 4
je 0x4131bc
push ebx
push edi
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x4130a9
push 0x207
lea ecx, [ebp - 0x218]
push ecx
push 0
push edi
call sub.PSAPI.DLL_GetModuleFileNameExA
test eax, eax
je 0x4130c1
lea eax, [ebp - 0x218]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x413057
sub eax, edx
push eax
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x234]
call fcn.00401602
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.0040127b
lea ecx, [ebp - 0x234]
call fcn.00401257
jmp 0x4131ee
push ebx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x41316f
push 0x207
lea ecx, [ebp - 0x218]
push ecx
push edi
call sub.PSAPI.DLL_GetProcessImageFileNameA
test eax, eax
je 0x41314a
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.00401205
call fcn.0040eda0
add esp, 0x20
test al, al
je 0x413132
lea ecx, [ebp - 0x250]
push ecx
lea ecx, [ebp - 0x234]
call fcn.0040127b
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 0
call fcn.00401257
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41318b
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.0041c000
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41318b
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.0041c000
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.0040127b
cmp dword [ebp - 0x220], 0x10
jb 0x4131ee
mov eax, dword [ebp - 0x234]
push eax
jmp 0x4131e6
push edi
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], edi
push 0x4ad620
mov ecx, esi
mov byte [esi], 0
call fcn.00401602
cmp dword [ebp - 0x220], 0x10
jb 0x4131ee
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.004777ca
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.004751f1
mov esp, ebp
pop ebp
ret