Function at 0x40b950
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, 0xacc
mov eax, dword [0x42827c]
xor eax, esp
mov dword [esp + 0xac4], eax
mov eax, dword [0x43029c]
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push 0x618
lea ecx, [esp + 0x4bc]
push ebp
push ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x20], ebp
call fcn.004130d0
push 0x208
lea edx, [esp + 0xb8]
push ebp
push edx
call fcn.004130d0
add esp, 0x18
push 0x104
lea eax, [esp + 0x2b4]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x2b0]
push 0x424c94
push ecx
call fcn.0040dcb7
mov esi, eax
add esp, 8
cmp esi, ebp
je 0x40bcdb
push 2
push 0xfffffffffffffff9
push esi
call fcn.0040d6d8
push esi
call fcn.0040d8f5
push esi
push 2
lea edx, [esp + 0x30]
push 1
push edx
mov edi, eax
call fcn.0040d455
add esp, 0x20
cmp eax, 2
jne 0x40bd16
push esi
push 1
lea eax, [esp + 0x2c]
push 1
push eax
call fcn.0040d455
add esp, 0x10
cmp eax, 1
jne 0x40bd16
push esi
push 4
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.0040d455
add esp, 0x10
cmp eax, 4
jne 0x40bd16
cmp word [esp + 0x18], 0xfffe
jne 0x40bcdb
mov edx, dword [esp + 0x14]
push ebp
push edx
push esi
call fcn.0040d6d8
sub edi, dword [esp + 0x20]
push edi
mov dword [esp + 0x38], edi
call fcn.0040db2e
add esp, 0x10
cmp eax, ebp
mov dword [esp + 0x1c], eax
je 0x40bcdb
push esi
push edi
push 1
push eax
call fcn.0040d455
push esi
call fcn.0040d9d5
add esp, 0x14
lea eax, [esp + 0xa8]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edi, [esp + 0xa8]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x40baa3
mov ecx, 6
mov esi, str.sfmkdecd.exe
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0xa8]
movsw word es:[edi], word [esi]
xor ebx, ebx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x40bad0
sub eax, edx
lea ecx, [esp + 0xa8]
sar eax, 1
push ebp
push ecx
mov esi, eax
call fcn.0040ee0c
add esp, 8
cmp eax, 0xffffffff
je 0x40bbbb
lea edx, [esp + esi*2 + 0xa0]
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x2c]
push 0xa
lea ecx, [esp + 0x8c]
push ecx
push ebx
mov word [eax], bp
call fcn.0040fcc2
lea eax, [esp + 0x94]
add esp, 0xc
mov edx, eax
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x40bb30
lea edi, [esp + 0xa8]
sub eax, edx
add edi, 0xfffffffe
jmp 0x40bb50
mov cx, word [edi + 2]
add edi, 2
cmp cx, bp
jne 0x40bb50
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 + 0xa8]
rep movsb byte es:[edi], byte [esi]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x40bb76
mov edx, dword [str..exe]
mov ecx, dword [0x4254c8]
mov dword [eax], edx
mov dx, word [0x4254cc]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0xa8]
push ebp
push eax
add ebx, 1
call fcn.0040ee0c
add esp, 8
cmp eax, 0xffffffff
jne 0x40bb06
lea ecx, [esp + 0xa8]
push 0x424cb4
push ecx
call fcn.0040dcb7
mov esi, eax
add esp, 8
cmp esi, ebp
je 0x40bcce
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
push esi
push edx
push 1
push eax
call fcn.0040d5cf
push esi
call fcn.0040d9d5
add esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [esp + 0x20]
sub ecx, 1
je 0x40bc70
sub ecx, 1
je 0x40bc41
sub ecx, 1
jne 0x40bcce
mov ecx, dword [0x4302a0]
push ecx
lea edx, [esp + 0x2b4]
push edx
push eax
lea eax, [esp + 0xb4]
push eax
lea ecx, [esp + 0x4c8]
push str.__s___I__d__F___s___R__d
push ecx
call fcn.0040dcca
add esp, 0x18
jmp 0x40bc96
mov edx, dword [0x4302a0]
push edx
lea ecx, [esp + 0x2b4]
push ecx
push eax
lea edx, [esp + 0xb4]
push edx
lea eax, [esp + 0x4c8]
push str.__s___I__d__F___s___S__d
push eax
call fcn.0040dcca
add esp, 0x18
jmp 0x40bc96
lea ecx, [esp + 0x2b0]
push ecx
push eax
lea edx, [esp + 0xb0]
push edx
lea eax, [esp + 0x4c4]
push str.__s___I__d__F___s___D
push eax
call fcn.0040dcca
add esp, 0x14
push 0x44
lea ecx, [esp + 0x44]
push ebp
push ecx
call fcn.004130d0
add esp, 0xc
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x44]
push eax
push ebp
push ebp
push 0x20
push ebp
push ebp
push ebp
lea ecx, [esp + 0x4d8]
push ecx
push ebp
mov dword [esp + 0x68], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040da51
add esp, 4
lea ecx, [esp + 0xa8]
push ebp
push ecx
call fcn.0040ee0c
add esp, 8
cmp eax, 0xffffffff
je 0x40bcfd
lea ecx, [esp + 0xa8]
call fcn.00402cd0
mov ecx, dword [esp + 0xad4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040d036
add esp, 0xacc
ret
push 0x40
push str.fread
push 0x42fde8
mov dword [0x42fde0], 0xd5
call fcn.0040d045
push 0x104
lea edx, [esp + 0x2c0]
push edx
push 0x42fe68
mov word [0x42fe68], bp
mov dword [0x42fde4], 4
call fcn.0040d045
push 0x104
push str....._src_sfslfdec_sfmkcore.c
push 0x430070
mov word [0x43006e], bp
call fcn.0040d045
add esp, 0x24
mov word [0x430276], bp
mov dword [0x430278], 0x1011
jmp 0x40bcdb