Function at 0x408be0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get common file path
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5cc357
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x613ad0]
xor eax, esp
mov dword [esp + 0x278], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x613ad0]
xor eax, esp
push eax
lea eax, [esp + 0x290]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2a4]
mov dword [esp + 0x40], ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x3c], eax
call fcn.00406400
xor ebx, ebx
mov dword [esp + 0x298], ebx
call fcn.0057e772
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x408c56
push 0x80004005
call fcn.00401a10
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
push 0x104
lea ecx, [esp + 0x88]
push ecx
push ebx
mov byte [esp + 0x2a4], 1
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebx
push ebx
push 3
push ebx
push 1
push SysReAllocStringLen
lea edx, [esp + 0x9c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
lea eax, [esp + 0x84]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x84]
lea edx, [eax + 2]
jmp 0x408cc0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x408cc0
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x82], 0x5c
je 0x408cf8
lea edi, [esp + 0x84]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x408ce4
mov ecx, dword [0x5d869c]
mov dword [edi], ecx
mov edx, dword [esp + 0x2a0]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push edx
push ebp
call esi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [esp + 0x18]
push eax
push 4
lea ecx, [esp + 0x58]
push ecx
push ebp
call edi
test eax, eax
je 0x408d4b
cmp dword [esp + 0x4c], 0x52444821
je 0x408d95
push 1
push ebx
push 0xfffffffffffffffd
push ebp
call esi
push ebx
lea edx, [esp + 0x18]
push edx
push 4
lea eax, [esp + 0x58]
push eax
push ebp
call edi
test eax, eax
jne 0x408d25
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x298], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408d7a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x298], 0xffffffff
call fcn.00406470
xor al, al
jmp 0x4091c0
push ebx
lea ecx, [esp + 0x18]
push ecx
push 4
lea edx, [esp + 0x5c]
push edx
push ebp
call edi
push ebx
lea eax, [esp + 0x18]
push eax
push 4
lea ecx, [esp + 0x60]
push ecx
push ebp
call edi
mov edx, dword [esp + 0x3c]
push edx
push ebp
call fcn.00432ce0
add esp, 8
push ebx
lea eax, [esp + 0x18]
push eax
push 4
lea ecx, [esp + 0x50]
push ecx
push ebp
mov dword [esp + 0x58], ebx
call edi
mov eax, dword [esp + 0x44]
cmp eax, ebx
je 0x408de6
push 1
push ebx
push eax
push ebp
call esi
cmp dword [esp + 0x50], ebx
mov dword [esp + 0x3c], ebx
jle 0x409139
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0
lea edx, [esp + 0x18]
push edx
push 4
lea eax, [esp + 0x64]
push eax
push ebp
call edi
cmp dword [esp + 0x58], 0x544e4521
jne 0x4091ea
push 0
lea ecx, [esp + 0x18]
push ecx
push 1
lea edx, [esp + 0x3c]
push edx
push ebp
call edi
push 0
lea eax, [esp + 0x18]
push eax
push 4
lea ecx, [esp + 0x40]
push ecx
push ebp
call edi
push 0
lea edx, [esp + 0x18]
push edx
push 4
lea eax, [esp + 0x38]
push eax
push ebp
call edi
push 0
lea ecx, [esp + 0x18]
push ecx
push 4
lea edx, [esp + 0x44]
push edx
push ebp
call edi
lea eax, [esp + 0x20]
push eax
push ebp
call fcn.00432ce0
lea ecx, [esp + 0x2c]
push ecx
push ebp
call fcn.00432ce0
mov edx, dword [esp + 0x3c]
add esp, 0x10
push 4
push 0x1000
push edx
push 0
call ebx
mov ecx, dword [esp + 0x2c]
push 0
mov esi, eax
lea eax, [esp + 0x18]
push eax
push ecx
push esi
push ebp
call edi
mov eax, dword [esp + 0x34]
test eax, 0x400
je 0x408eea
mov edx, dword [esp + 0x2c]
push 0
push edx
push esi
lea ecx, [esp + 0x68]
call fcn.0058a193
mov ecx, dword [esp + 0x40]
push 1
lea eax, [esp + 0x60]
push eax
push 0
add ecx, 0xa4
mov byte [esp + 0x2a4], 3
call fcn.0043f4c0
lea ecx, [esp + 0x5c]
mov byte [esp + 0x298], 1
call fcn.0058a4e3
jmp 0x409116
test eax, 0x800
je 0x408f28
mov ecx, dword [esp + 0x38]
push 4
push 0x1000
push ecx
push 0
call ebx
mov edx, dword [esp + 0x2c]
push edx
mov edi, eax
push esi
lea eax, [esp + 0x40]
push eax
push edi
call fcn.0057b460
mov ecx, dword [esp + 0x48]
add esp, 0x10
push 1
push ecx
mov ecx, 0x61ce90
jmp 0x408fd7
test eax, 0x1000
je 0x408f63
mov edx, dword [esp + 0x38]
push 4
push 0x1000
push edx
push 0
call ebx
mov edi, eax
mov eax, dword [esp + 0x2c]
push eax
push esi
lea ecx, [esp + 0x40]
push ecx
push edi
call fcn.0057b460
mov edx, dword [esp + 0x48]
add esp, 0x10
push 1
push edx
mov ecx, 0x61ceb8
jmp 0x408fd7
test eax, 0x2000
je 0x408f9e
mov eax, dword [esp + 0x38]
push 4
push 0x1000
push eax
push 0
call ebx
mov ecx, dword [esp + 0x2c]
push ecx
push esi
lea edx, [esp + 0x40]
mov edi, eax
push edx
push edi
call fcn.0057b460
mov eax, dword [esp + 0x48]
add esp, 0x10
push 1
push eax
mov ecx, 0x61cee0
jmp 0x408fd7
test eax, 0x4000
je 0x408ff8
mov ecx, dword [esp + 0x38]
push 4
push 0x1000
push ecx
push 0
call ebx
mov edx, dword [esp + 0x2c]
push edx
mov edi, eax
push esi
lea eax, [esp + 0x40]
push eax
push edi
call fcn.0057b460
mov ecx, dword [esp + 0x48]
add esp, 0x10
push 1
push ecx
mov ecx, 0x61cf08
push edi
push 0
call fcn.00415920
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x409116
lea edx, [esp + 0x84]
push edx
lea ecx, [esp + 0x1c]
call fcn.00403db0
mov eax, dword [esp + 0x24]
cmp dword [eax - 0xc], 0
je 0x409051
push 0x5d869c
lea ecx, [esp + 0x1c]
call fcn.00404560
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00404540
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x40]
push edx
add ecx, 0xa4
call fcn.004033f0
push 0x5d869c
lea ecx, [esp + 0x1c]
call fcn.00404560
mov eax, dword [esp + 0x20]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00403a10
mov eax, dword [esp + 0x18]
push 0
push 0
push 2
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp byte [esp + 0x30], 0
mov dword [esp + 0x48], eax
je 0x4090dc
mov ecx, dword [esp + 0x38]
push 4
push 0x1000
push ecx
push 0
call ebx
mov edx, dword [esp + 0x2c]
push edx
mov edi, eax
push esi
lea eax, [esp + 0x40]
push eax
push edi
call fcn.0057b460
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x58]
add esp, 0x10
push 0
lea ecx, [esp + 0x18]
push ecx
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x4090f0
mov edx, dword [esp + 0x2c]
push 0
lea ecx, [esp + 0x18]
push ecx
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx + 0x1d0]
add ecx, 0x1c8
lea edx, [esp + 0x18]
push edx
push eax
call fcn.0057fc31
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [esp + 0x3c]
add eax, 1
cmp eax, dword [esp + 0x50]
mov dword [esp + 0x3c], eax
jl 0x408dfa
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x298], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409168
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov dword [esp + 0x298], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409193
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x298], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4091be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [esp + 0x290]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x278]
xor ecx, esp
call fcn.005aac48
add esp, 0x288
ret 8
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x298], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409219
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov dword [esp + 0x298], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409244
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x298], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40926f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x4091c0