Function at 0x510690
Capabilities:
Create process on windows
Delete file
Get common file path

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x596113
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x720
mov eax, dword [0x5ff1d4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x6d4], edx
mov edi, ecx
mov eax, dword [ebx + 8]
mov dword [ebp - 0x6cc], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x6d0], eax
xor eax, eax
mov byte [ebp - 0x6c1], 0
mov byte [ebp - 0x6c2], 0
mov dword [ebp - 0x67c], 7
mov dword [ebp - 0x680], 0
mov word [ebp - 0x690], ax
push 0x44
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x730]
push eax
call fcn.00563230
xorps xmm0, xmm0
mov dword [ebp - 0x730], 0x44
xor eax, eax
mov dword [ebp - 0x64c], 7
add esp, 0xc
mov dword [ebp - 0x650], 0
movups xmmword [ebp - 0x6e4], xmm0
mov word [ebp - 0x660], ax
lea ecx, [ebp - 0x660]
mov byte [ebp - 4], 1
call fcn.00514870
mov esi, eax
test esi, esi
js 0x510bb3
push str.cmd.exe__S__C___
lea edx, [ebp - 0x660]
lea ecx, [ebp - 0x648]
call fcn.004c02b0
add esp, 4
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.0050e970
mov esi, eax
test esi, esi
js 0x510b78
cmp dword [edi + 0x14], 8
jb 0x5107ad
mov edx, dword [edi]
jmp 0x5107af
mov edx, edi
cmp word [edx], 0
jne 0x5107b9
xor ecx, ecx
jmp 0x5107cf
mov ecx, edx
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5107c0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x648]
call fcn.004aa8e0
push 2
push 0x5e5d64
lea ecx, [ebp - 0x648]
call fcn.004aa8e0
push 0xffffffffffffffff
push 0
push dword [ebp - 0x6d4]
lea ecx, [ebp - 0x648]
call fcn.004aaa00
cmp byte [ebx + 0x10], 0
je 0x510993
lea eax, [ebp - 0x630]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x5108d8
lea eax, [ebp - 0x220]
push eax
push 0
push str.OPSWAT
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x5108d8
push 0x5e5d4c
lea ecx, [ebp - 0x648]
call fcn.004aa200
push 0x5d863c
lea edx, [ebp - 0x648]
lea ecx, [ebp - 0x6c0]
call fcn.004c02b0
add esp, 4
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 3
push ecx
mov edx, eax
lea ecx, [ebp - 0x6a8]
call fcn.004aba00
add esp, 4
push 0x5d863c
mov edx, eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x678]
call fcn.004aba00
add esp, 4
lea ecx, [ebp - 0x648]
push eax
call fcn.004aa2c0
lea ecx, [ebp - 0x678]
call fcn.004a4880
lea ecx, [ebp - 0x6a8]
call fcn.004a4880
lea ecx, [ebp - 0x6c0]
mov byte [ebp - 4], 2
call fcn.004a4880
cmp byte [ebx + 0x14], 0
je 0x510993
lea eax, [ebp - 0x428]
push eax
push 0
push str.OPSWAT
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x510993
push str._2_
lea ecx, [ebp - 0x648]
call fcn.004aa200
push 0x5d863c
lea edx, [ebp - 0x648]
lea ecx, [ebp - 0x678]
call fcn.004c02b0
add esp, 4
lea ecx, [ebp - 0x428]
mov byte [ebp - 4], 5
push ecx
mov edx, eax
lea ecx, [ebp - 0x6a8]
call fcn.004aba00
add esp, 4
push 0x5d863c
mov edx, eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x6c0]
call fcn.004aba00
add esp, 4
lea ecx, [ebp - 0x648]
push eax
call fcn.004aa2c0
lea ecx, [ebp - 0x6c0]
call fcn.004a4880
lea ecx, [ebp - 0x6a8]
call fcn.004a4880
lea ecx, [ebp - 0x678]
mov byte [ebp - 4], 2
call fcn.004a4880
push 1
push 0x5d863c
lea ecx, [ebp - 0x648]
call fcn.004aa8e0
cmp dword [ebp - 0x634], 8
lea ecx, [ebp - 0x6e4]
push ecx
lea ecx, [ebp - 0x730]
push ecx
push 0
push 0
push 0x8000000
push 1
push 0
lea eax, [ebp - 0x648]
cmovae eax, dword [ebp - 0x648]
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x510a47
cmp byte [ebx + 0x10], 0
je 0x510a28
push dword [ebx + 0x18]
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x510a16
mov ecx, dword [ebp - 0x6dc]
lea edx, [ebp - 0x6c8]
mov byte [ebp - 0x6c2], 1
call fcn.00510d80
jmp 0x510a28
push dword [ebp - 0x6d0]
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x6e0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x6c1], 1
mov eax, dword [ebx + 0x10]
test al, al
je 0x510b6e
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x678]
call fcn.004a48c0
push dword [ebp - 0x6cc]
mov byte [ebp - 4], 7
lea edx, [ebp - 0x6c8]
push 1
lea ecx, [ebp - 0x678]
mov dword [ebp - 0x6c8], 0
call fcn.0050e9e0
add esp, 8
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x678]
mov esi, eax
call fcn.004a4880
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebx + 0x14]
test cl, cl
je 0x510b27
lea eax, [ebp - 0x428]
push eax
lea ecx, [ebp - 0x678]
call fcn.004a48c0
lea eax, [ebp - 0x690]
mov byte [ebp - 4], 8
push eax
push 1
lea edx, [ebp - 0x6c8]
mov dword [ebp - 0x6c8], 0
lea ecx, [ebp - 0x678]
call fcn.0050e9e0
add esp, 8
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x678]
mov esi, eax
call fcn.004a4880
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 0x6cc]
lea eax, [ebp - 0x690]
push 0xffffffffffffffff
push 0
push eax
call fcn.004aaa00
mov ecx, dword [ebx + 0x14]
mov eax, dword [ebx + 0x10]
cmp byte [ebp - 0x6c1], 0
je 0x510b75
push dword [ebx + 0x18]
or edx, 0xffffffff
cmp byte [ebp - 0x6c2], 0
push ecx
push eax
cmovne esi, edx
lea eax, [ebp - 0x648]
push esi
push dword [ebp - 0x6d0]
push dword [ebp - 0x6cc]
push eax
push dword [ebp - 0x6d4]
push edi
call fcn.0050d210
mov ecx, eax
call fcn.0050dfd0
jmp 0x510b78
mov ecx, dword [ebx + 0x14]
xor esi, esi
jmp 0x510b2a
or esi, 0xffffffff
mov eax, dword [ebp - 0x634]
cmp eax, 8
jb 0x510b96
inc eax
lea ecx, [ebp - 0x648]
push eax
push dword [ebp - 0x648]
call fcn.004a5150
xor eax, eax
mov dword [ebp - 0x634], 7
mov dword [ebp - 0x638], 0
mov word [ebp - 0x648], ax
mov eax, dword [ebp - 0x64c]
cmp eax, 8
jb 0x510bd1
inc eax
lea ecx, [ebp - 0x660]
push eax
push dword [ebp - 0x660]
call fcn.004a5150
mov ecx, dword [ebp - 0x67c]
xor eax, eax
mov dword [ebp - 0x64c], 7
mov dword [ebp - 0x650], 0
mov word [ebp - 0x660], ax
cmp ecx, 8
jb 0x510c0c
inc ecx
push ecx
push dword [ebp - 0x690]
lea ecx, [ebp - 0x690]
call fcn.004a5150
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00533fc6
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret