Function at 0x50df18
Capabilities:
Copy file
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x13
push 0
push 0
dec ecx
jne 0x50df20
push ebx
push esi
push edi
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
call fcn.004060c4
xor eax, eax
push ebp
push 0x50e21a
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax - 4]
add eax, 0x3bc
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x3b8]
call fcn.004060dc
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x3b8]
lea eax, [ebp - 0x18]
mov ecx, 0x50e234
call fcn.004065c0
mov eax, dword [ebp - 0x18]
call fcn.0040e2c8
xor edx, edx
push ebp
push 0x50e1d8
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x64]
xor ecx, ecx
mov edx, 0x44
call fcn.004039d0
mov dword [ebp - 0x64], 0x44
mov word [ebp - 0x34], 0
or dword [ebp - 0x38], 1
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x50dfd4
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x50dfd4
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0x18]
call fcn.004056d0
mov ebx, eax
test ebx, ebx
je 0x50dfdf
sub ebx, 4
mov ebx, dword [ebx]
lea edx, [ebp - 0x7c]
mov eax, dword [0x520340]
mov eax, dword [eax]
call fcn.0048907c
mov eax, dword [ebp - 0x7c]
lea edx, [ebp - 0x78]
call fcn.0040df98
push dword [ebp - 0x78]
push 0x50e24c
push dword [ebp - 8]
push 0x50e270
lea eax, [ebp - 0x80]
push eax
mov ecx, ebx
dec ecx
mov edx, 1
mov eax, dword [ebp - 0x18]
call fcn.00406898
push dword [ebp - 0x80]
push 0x50e284
lea eax, [ebp - 0xc]
mov edx, 6
call fcn.004066a4
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x64]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0xc]
call fcn.00406168
push eax
push 0
call sub.kernel32.dll_CreateProcessW
test eax, eax
je 0x50e089
push 0xffffffffffffffff
mov eax, dword [ebp - 0x74]
push eax
call sub.kernel32.dll_WaitForSingleObject
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x74]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x74]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x70]
push eax
call sub.kernel32.dll_CloseHandle_1
mov dl, 1
mov eax, dword [0x41f8e4]
call fcn.00424670
mov dword [ebp - 4], eax
push ebp
mov eax, dword [ebp - 0x18]
call fcn.0050dce8
pop ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x14]
lea edx, [ebp - 0x84]
call fcn.0040d1b4
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x88]
test eax, eax
je 0x50e0d0
sub eax, 4
mov eax, dword [eax]
mov ebx, eax
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x50e1ba
inc eax
mov dword [ebp - 0x20], eax
xor esi, esi
lea edx, [ebp - 0x10]
lea eax, [esi + 1]
call fcn.0040d1b4
jmp 0x50e106
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
mov edx, 0x50e294
call fcn.004065c0
lea eax, [ebp - 0x10]
call fcn.004056e0
call fcn.0040645c
cmp ebx, eax
jg 0x50e0f6
push 0x50e2a4
push dword [ebp - 0x10]
lea ecx, [ebp - 0x90]
mov edx, esi
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x90]
lea edx, [ebp - 0x8c]
call fcn.0040e0d4
push dword [ebp - 0x8c]
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.004066a4
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x3bc]
lea eax, [ebp - 0x94]
mov ecx, dword [ebp - 0x14]
call fcn.004065c0
mov eax, dword [ebp - 0x94]
call fcn.00406168
push eax
lea ecx, [ebp - 0x98]
mov edx, esi
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x98]
call fcn.00406168
push eax
call sub.kernel32.dll_CopyFileW
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax - 8]
mov edx, dword [ebp - 0x14]
call fcn.00422c74
inc esi
dec dword [ebp - 0x20]
jne 0x50e0e9
mov eax, dword [ebp - 4]
call fcn.0040426c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50e1df
mov eax, dword [ebp - 0x18]
call fcn.00505d50
ret