Function at 0x4af812
Capabilities:
Copy file
Create process on windows
Delete file
Get common file path
Terminate process

Disassembly:
mov eax, 0x53d770
call fcn.004eec88
sub esp, 0x4a0
or dword [ebp - 0x18], 0xffffffff
push ebx
mov dword [ebp - 0x2c], ecx
push esi
push edi
lea ecx, [ebp - 0x28]
call fcn.0050fa1d
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x14]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call fcn.004af7b3
push ebx
push ebx
push dword [ebp - 0x14]
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.0050fb2f
test eax, eax
jne 0x4af862
or esi, 0xffffffff
jmp 0x4af95f
lea ecx, [ebp - 0x28]
call fcn.0050fe29
mov esi, eax
sub esi, 0x10
cmp esi, ebx
jg 0x4af87d
lea ecx, [ebp - 0x28]
call fcn.0050fd4a
jmp 0x4af85a
push esi
call fcn.00509cd1
mov edi, eax
mov eax, dword [0x5927d4]
pop ecx
mov dword [ebp - 0x10], eax
cmp edi, ebx
mov byte [ebp - 4], 2
je 0x4af948
lea eax, [ebp - 0x50]
push 0x10
push eax
lea ecx, [ebp - 0x28]
call fcn.0050fc4c
push esi
push edi
lea ecx, [ebp - 0x28]
call fcn.0050fc4c
lea ecx, [ebp - 0x28]
call fcn.0050fd4a
lea eax, [ebp - 0x40]
push eax
push esi
push edi
call fcn.004c82c0
lea eax, [ebp - 0x40]
push 0x10
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.004eff20
add esp, 0x18
test eax, eax
jne 0x4af941
cmp dword [ebp + 8], ebx
mov dword [ebp - 0x18], ebx
je 0x4af8f0
push 0xffffffffffffffff
push ebx
push 0x809d
call fcn.005184ab
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
push ebx
push 0x1041
push dword [ebp - 0x14]
lea ecx, [ebp - 0x28]
call fcn.0050fb2f
lea eax, [ebp + 8]
lea ecx, [ebp - 0x28]
push eax
call fcn.00510a3d
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
call fcn.0050a0c9
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.00509f90
push esi
push edi
lea ecx, [ebp - 0x28]
call fcn.0050fc86
lea ecx, [ebp - 0x28]
call fcn.0050fd4a
push edi
call fcn.00509cfa
pop ecx
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], ebx
jne 0x4af97d
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00509f90
mov esi, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call fcn.00509f90
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.0050fa72
mov eax, esi
jmp 0x4afab6
mov esi, 0x104
lea eax, [ebp - 0x2ac]
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea eax, [ebp - 0x1a8]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
lea eax, [ebp - 0x1a8]
push eax
push ebx
lea eax, [ebp - 0x1a8]
push 0x589fec
push eax
call dword [sym.imp.KERNEL32.DLL_GetTempFileNameA]
lea eax, [ebp - 0x1a8]
push ebx
push eax
lea eax, [ebp - 0x2ac]
push eax
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
push ebx
push 0x4000000
push 3
push ebx
push 1
lea eax, [ebp - 0x1a8]
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [ebp - 0x30], eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
push eax
push 1
push 0x100000
call dword [sym.imp.KERNEL32.DLL_OpenProcess]
mov esi, eax
xor edi, edi
call fcn.00403732
cmp eax, ebx
je 0x4afa11
mov edi, dword [eax + 0x19c]
mov eax, dword [ebp - 0x2c]
push dword [eax + 0x90]
lea eax, [ebp - 0x2ac]
push edi
push dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x1a8]
push esi
push eax
lea eax, [ebp - 0x4ac]
push str.__s___d_s_s_x_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x20
lea eax, [ebp - 0xa4]
push eax
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoA]
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0xa4]
push eax
push ebx
push ebx
push ebx
push 1
push ebx
lea eax, [ebp - 0x4ac]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_CreateProcessA]
push 0x3e8
call dword [sym.imp.KERNEL32.DLL_Sleep]
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
call esi
push dword [ebp - 0x30]
call esi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4