Function at 0x40cdc0
Capabilities:
Create process on windows
Get common file path
Read file on windows
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0xad4
mov eax, dword [0x42d278]
xor eax, esp
mov dword [esp + 0xacc], eax
mov eax, dword [0x4357b4]
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push 0x618
lea ecx, [esp + 0x4c4]
push ebp
push ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
call fcn.00414e60
push 0x208
lea edx, [esp + 0xc0]
push ebp
push edx
call fcn.00414e60
add esp, 0x18
push 0x104
lea eax, [esp + 0x2bc]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x2b8]
push 0x429c2c
push ecx
call fcn.0040f83e
mov esi, eax
add esp, 8
cmp esi, ebp
je 0x40d169
push 2
push 0xffffffffffffffff
push 0xfffffffffffffff9
push esi
call fcn.0040eba8
push esi
call fcn.0040f58e
push esi
push 2
mov ebx, edx
lea edx, [esp + 0x3c]
push 1
push edx
mov edi, eax
call fcn.0040efca
add esp, 0x24
cmp eax, 2
jne 0x40d1a4
push esi
push 1
lea eax, [esp + 0x2c]
push 1
push eax
call fcn.0040efca
add esp, 0x10
cmp eax, 1
jne 0x40d1a4
push esi
push 4
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040efca
add esp, 0x10
cmp eax, 4
jne 0x40d1a4
cmp word [esp + 0x20], 0xfffe
jne 0x40d169
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push ebp
push edx
push eax
push esi
call fcn.0040eba8
sub edi, dword [esp + 0x20]
sbb ebx, dword [esp + 0x24]
push edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], ebx
call fcn.0040f6b5
add esp, 0x14
cmp eax, ebp
mov dword [esp + 0x1c], eax
je 0x40d169
push esi
push edi
push 1
push eax
call fcn.0040efca
push esi
call fcn.0040f238
add esp, 0x14
lea ecx, [esp + 0xb0]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edi, [esp + 0xb0]
add edi, 0xfffffffe
jmp 0x40cf30
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x40cf30
mov ecx, 6
mov esi, str.sfmkdecd.exe
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0xb0]
movsw word es:[edi], word [esi]
xor ebx, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x40cf56
sub eax, edx
lea edx, [esp + 0xb0]
sar eax, 1
push ebp
push edx
mov esi, eax
call fcn.0040f9a7
add esp, 8
cmp eax, 0xffffffff
je 0x40d03b
lea eax, [esp + esi*2 + 0xa8]
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x2c]
push 0xa
lea edx, [esp + 0x94]
push edx
push ebx
mov word [ecx], bp
call fcn.004138a1
lea eax, [esp + 0x9c]
add esp, 0xc
mov edx, eax
nop
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x40cfb0
lea edi, [esp + 0xb0]
sub eax, edx
add edi, 0xfffffffe
jmp 0x40cfd0
mov cx, word [edi + 2]
add edi, 2
cmp cx, bp
jne 0x40cfd0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0xb0]
rep movsb byte es:[edi], byte [esi]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x40cff6
mov ecx, dword [str..exe]
mov edx, dword [0x42a4cc]
mov dword [eax], ecx
mov cx, word [0x42a4d0]
mov dword [eax + 4], edx
lea edx, [esp + 0xb0]
push ebp
push edx
mov word [eax + 8], cx
add ebx, 1
call fcn.0040f9a7
add esp, 8
cmp eax, 0xffffffff
jne 0x40cf8c
lea eax, [esp + 0xb0]
push 0x429c5c
push eax
call fcn.0040f83e
mov esi, eax
add esp, 8
cmp esi, ebp
je 0x40d15c
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x1c]
push esi
push ecx
push 1
push edx
call fcn.0040f144
push esi
call fcn.0040f238
add esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [esp + 0x28]
sub ecx, 1
je 0x40d0fe
sub ecx, 1
je 0x40d0c8
sub ecx, 1
jne 0x40d15c
mov ecx, dword [0x4357bc]
mov edx, dword [0x4357b8]
push ecx
push edx
lea ecx, [esp + 0x2c0]
push ecx
push eax
lea edx, [esp + 0xc0]
push edx
lea eax, [esp + 0x4d4]
push str.__s___I__d__F___s___R__I64d
push eax
call fcn.0040f88a
add esp, 0x1c
jmp 0x40d124
mov ecx, dword [0x4357bc]
mov edx, dword [0x4357b8]
push ecx
push edx
lea ecx, [esp + 0x2c0]
push ecx
push eax
lea edx, [esp + 0xc0]
push edx
lea eax, [esp + 0x4d4]
push str.__s___I__d__F___s___S__I64d
push eax
call fcn.0040f88a
add esp, 0x1c
jmp 0x40d124
lea ecx, [esp + 0x2b8]
push ecx
push eax
lea edx, [esp + 0xb8]
push edx
lea eax, [esp + 0x4cc]
push str.__s___I__d__F___s___D
push eax
call fcn.0040f88a
add esp, 0x14
push 0x44
lea ecx, [esp + 0x4c]
push ebp
push ecx
call fcn.00414e60
add esp, 0xc
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x4c]
push eax
push ebp
push ebp
push 0x20
push ebp
push ebp
push ebp
lea ecx, [esp + 0x4e0]
push ecx
push ebp
mov dword [esp + 0x70], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040f5d8
add esp, 4
lea ecx, [esp + 0xb0]
push ebp
push ecx
call fcn.0040f9a7
add esp, 8
cmp eax, 0xffffffff
je 0x40d18b
lea ecx, [esp + 0xb0]
call fcn.00403060
mov ecx, dword [esp + 0xadc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040eac3
add esp, 0xad4
ret
push 0x40
push str.fread
push 0x4352f0
mov dword [0x4352e8], 0xd5
call fcn.0040ead2
push 0x104
lea edx, [esp + 0x2c8]
push edx
push 0x435370
mov word [0x435370], bp
mov dword [0x4352ec], 4
call fcn.0040ead2
push 0x104
push str....._src_sfslfdec_sfmkcore.c
push 0x435578
mov word [0x435576], bp
call fcn.0040ead2
add esp, 0x24
mov word [0x43577e], bp
mov dword [0x435780], 0x12df
jmp 0x40d169