Function at 0x46a1a0
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag
Delete file
Get common file path
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x84c
mov eax, dword [0x76d13c]
test eax, eax
je 0x46a730
lea esi, [ebp - 0x214]
mov dword [esp], 0x104
mov dword [esp + 4], esi
call dword [sym.imp.kernel32.dll_GetTempPathW]
sub esp, 8
mov edi, eax
call fcn.0057d110
mov ebx, dword fs:[0x18]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x159c
mov eax, dword [ebx + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.GetTempPathW_failed__got_error__lu._n
call fcn.0045bef0
lea eax, [ebp - 0x82c]
mov dword [esp], esi
mov edi, dword [sym.imp.kernel32.dll_GetTempFileNameW]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59ac4e
call edi
sub esp, 0x10
mov dword [ebp - 0x830], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x159f
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetTempFileNameW_failed__got_error__lu._n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x830]
mov dword [esp], edx
call fcn.0045bef0
lea eax, [ebp - 0x624]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59ac4e
call edi
sub esp, 0x10
mov dword [ebp - 0x830], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x15a2
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetTempFileNameW_failed__got_error__lu._n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x830]
mov dword [esp], edx
call fcn.0045bef0
lea eax, [ebp - 0x41c]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x59ac4e
call edi
sub esp, 0x10
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x15a5
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.GetTempFileNameW_failed__got_error__lu._n
call fcn.0045bef0
lea eax, [ebp - 0x82c]
mov dword [esp + 0x18], 0
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0010000
mov dword [ebp - 0x838], eax
call eax
sub esp, 0x1c
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x15a8
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_create_temp_file__error__lu._n
mov dword [esp + 8], eax
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 8], 0x114
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov esi, eax
mov byte [eax], 0
mov dword [eax + 4], 0
lea eax, [ebp - 0x624]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll_wcslen]
mov dword [ebp - 0x834], eax
call eax
lea ecx, [esi + 0xc]
add eax, eax
mov dword [ebp - 0x830], ecx
mov dword [esi + 8], eax
add eax, 2
mov dword [esp + 8], eax
lea eax, [ebp - 0x624]
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov dword [esp + 0xc], 0x114
mov dword [esp + 8], esi
mov dword [esp + 4], 3
mov dword [esp], edi
call dword [0x76d13c]
sub esp, 0x10
mov dword [ebp - 0x83c], eax
call fcn.0057d110
mov edx, dword [ebp - 0x83c]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x15b2
xor eax, eax
mov ecx, dword [ebx + 0x34]
test edx, edx
je 0x46a720
mov dword [esp + 8], ecx
mov dword [esp + 4], str.FileRenameInfo_unexpected_result__ld_n
mov dword [esp], eax
mov ebx, dword fs:[0x18]
call fcn.0045bef0
mov byte [esi], 1
mov dword [esp], edi
mov dword [esp + 0xc], 0x114
mov dword [esp + 8], esi
mov dword [esp + 4], 3
call dword [0x76d13c]
sub esp, 0x10
mov dword [ebp - 0x83c], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x15b6
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.FileRenameInfo_failed__error__ld_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x83c]
mov dword [esp], edx
call fcn.0045bef0
lea eax, [ebp - 0x41c]
mov byte [esi], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x834]
call eax
lea ecx, [ebp - 0x41c]
add eax, eax
mov dword [esi + 8], eax
add eax, 2
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov ecx, dword [ebp - 0x830]
mov dword [esp], ecx
call sub.msvcrt.dll_memcpy
mov dword [esp], edi
mov dword [esp + 0xc], 0x114
mov dword [esp + 8], esi
mov dword [esp + 4], 3
call dword [0x76d13c]
sub esp, 0x10
mov dword [ebp - 0x83c], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x15bc
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.FileRenameInfo_failed__error__ld_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x83c]
mov dword [esp], edx
call fcn.0045bef0
mov dword [esp], edi
mov edi, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [ebp - 0x83c], edi
call edi
lea edi, [ebp - 0x41c]
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], edi
mov edi, dword [ebp - 0x838]
call edi
sub esp, 0x1c
mov edi, eax
mov dword [ebp - 0x838], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x15c0
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.file_not_renamed__error__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
lea edx, [ebp - 0x624]
mov dword [esp], edx
mov eax, dword [ebp - 0x834]
call eax
add eax, eax
mov dword [esi + 8], eax
add eax, 2
mov dword [esp + 8], eax
lea eax, [ebp - 0x624]
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x830]
mov dword [esp], ecx
call sub.msvcrt.dll_memcpy
mov dword [esp], edi
mov dword [esp + 0xc], 0x114
mov dword [esp + 8], esi
mov dword [esp + 4], 3
call dword [0x76d13c]
mov ecx, dword [0x8f0770]
sub esp, 0x10
mov edi, eax
mov dword [ebp - 0x830], ecx
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
mov ecx, dword [ebp - 0x830]
test ecx, ecx
setne cl
movzx ecx, cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x46a697
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x15c6
xor eax, eax
mov edx, dword [ebx + 0x34]
test edi, edi
jne 0x46a67b
xor eax, eax
cmp edx, 5
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.FileRenameInfo_unexpected_result__ld_n
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x46a658
mov eax, dword [ebp - 0x838]
mov dword [esp], eax
mov eax, dword [ebp - 0x83c]
call eax
sub esp, 4
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
lea eax, [ebp - 0x82c]
mov ebx, dword [sym.imp.kernel32.dll_DeleteFileW]
sub esp, 0xc
mov dword [esp], eax
call ebx
lea eax, [ebp - 0x624]
sub esp, 4
mov dword [esp], eax
call ebx
lea eax, [ebp - 0x41c]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
cmp ecx, 0xb7
sete al
jmp 0x46a438
mov eax, 0x1597
call fcn.0045b740
mov dword [esp], str.SetFileInformationByHandle_is_not_supported_n
call fcn.0045bec0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret