Function at 0x458190
Capabilities:
Get process image filename

Disassembly:
sub esp, 0x528
push esi
push edi
call fcn.004580b0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov esi, eax
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], 0
mov byte [esp + 0x208], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x209]
push 0x1ff
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x408]
push ecx
push esi
call fcn.00458120
add esp, 8
test eax, eax
jne 0x458205
pop edi
pop esi
add esp, 0x528
ret
mov edx, dword [esp + 0x420]
push edx
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x458229
pop edi
pop esi
add esp, 0x528
ret
push ebx
push ebp
lea eax, [esp + 0x210]
push 0x1ff
push eax
push esi
call sub.PSAPI.DLL_GetProcessImageFileNameA
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
cmp ebx, 0xfffffffd
jbe 0x458260
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ebp, dword [esp + 0x53c]
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x45828d
mov al, byte [ecx - 1]
test al, al
je 0x45828d
cmp al, 0xff
je 0x45828d
test ebx, ebx
jne 0x4582b3
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x4582dd
test ebx, ebx
jne 0x45829d
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x4582dd
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x4582a9
cmp eax, ebx
jae 0x4582bc
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
lea edi, [esp + 0x210]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
cmp ebp, 0xfffffffd
jbe 0x4582fb
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ebx, dword [esp + 0x540]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x458336
mov al, byte [ecx - 1]
test al, al
je 0x458336
cmp al, 0xff
je 0x458336
test ebp, ebp
jne 0x45836a
dec al
push ebp
mov byte [ecx - 1], al
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x528
ret
test ebp, ebp
jne 0x458354
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x528
ret
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x458360
cmp eax, ebp
jae 0x458373
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebp
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebx + 4]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x210]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 4]
mov dword [ebx + 8], ebp
mov byte [eax + ebp], 0
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x528
ret