Function at 0x459b50
Capabilities:
Get process image filename

Disassembly:
sub esp, 0x528
push esi
push edi
call fcn.00459a70
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.00459ae0
add esp, 8
test eax, eax
jne 0x459bc5
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 0x459be9
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 0x459c20
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 0x459c4d
mov al, byte [ecx - 1]
test al, al
je 0x459c4d
cmp al, 0xff
je 0x459c4d
test ebx, ebx
jne 0x459c73
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 0x459c9d
test ebx, ebx
jne 0x459c5d
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 0x459c9d
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x459c69
cmp eax, ebx
jae 0x459c7c
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 0x459cbb
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 0x459cf6
mov al, byte [ecx - 1]
test al, al
je 0x459cf6
cmp al, 0xff
je 0x459cf6
test ebp, ebp
jne 0x459d2a
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 0x459d14
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 0x459d20
cmp eax, ebp
jae 0x459d33
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