Function at 0x403380
Capabilities:
Create directory
Create process on windows
Delete file
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0x108
push ebx
push ebp
push esi
mov esi, dword [esp + 0x11c]
push edi
mov edi, 3
mov eax, dword [esi + 0xc]
cmp eax, edi
jne 0x4033e7
mov eax, dword [esi + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x4033b4
call sub.REDCOMM.dll_Ordinal_106
cmp dword [esi + 0x14], eax
jne case.0x403459.3
mov eax, dword [0x41d240]
cmp eax, ebx
je case.0x403459.3
mov ecx, dword [esi + 0x10]
mov edx, dword [esp + 0x128]
push ecx
mov ecx, dword [edx + 4]
push ecx
push 0x402
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
mov ebp, dword [esp + 0x128]
mov edx, dword [0x41d234]
mov ecx, dword [ebp + 4]
cmp edx, ecx
je 0x403440
mov edx, dword [0x41d23c]
xor ebx, ebx
cmp edx, ebx
je case.0x403459.3
cmp eax, ebx
jne case.0x403459.3
mov dx, word [esi + 2]
mov eax, dword [0x41d168]
push 7
push edx
push ecx
mov ecx, dword [esp + 0x128]
push 0x41d16c
push eax
push 0x46
push ecx
call sub.REDCOMM.dll_Ordinal_168
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
push 0x41d238
call fcn.0040e6ee
mov eax, dword [esi + 0xc]
add esp, 4
cmp eax, 4
ja case.0x403459.3
jmp dword [eax*4 + 0x4038b8]
mov eax, dword [esi + 0x18]
cmp eax, 2
jne 0x403479
lea edx, [esi + 0x1c]
push edx
push 0x41c250
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x403489
push 0x104
push 0x41c250
push eax
call sub.REDCOMM.dll_Ordinal_165
call sub.REDCOMM.dll_Ordinal_106
cmp dword [ebp + 4], eax
je 0x40361a
xor ebx, ebx
push ebx
push str.RefuseReceiveTransferedFile
call sub.REDCOMM.dll_Ordinal_27
test eax, eax
je 0x4034e9
mov edx, dword [0x41d168]
mov dword [0x41d164], 6
mov dword [0x41d1ac], ebx
mov ax, word [esi + 2]
mov ecx, dword [ebp + 4]
push 6
push eax
mov eax, dword [esp + 0x124]
push ecx
push 0x41d16c
push edx
push 0x46
push eax
call sub.REDCOMM.dll_Ordinal_168
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
push ebx
push 0x41c250
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [esi + 0x124]
push 0x5c
push ecx
call fcn.0040e650
add esp, 8
inc eax
push eax
push 0x41c250
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edx, dword [esi + 0x120]
xor eax, eax
mov dword [0x41c234], edx
mov dword [0x41d19c], ebx
mov ax, word [esi + 2]
mov edi, dword [esp + 0x11c]
mov dword [0x41d1a4], eax
mov ecx, dword [esi + 8]
mov dword [0x41c1d4], ecx
mov dword [0x41d1ac], 1
mov dword [0x41d164], ebx
mov eax, dword [esi + 0x14]
cmp eax, ebx
mov dword [0x41c1dc], eax
je 0x4035b1
push 1
push str.FileRunDirectly
call sub.REDCOMM.dll_Ordinal_27
test eax, eax
jne 0x4035b1
push str.upgrade.exe
push 0x5c
push 0x41c250
call fcn.0040e650
add esp, 8
inc eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4035b1
mov ecx, dword [0x41d168]
mov dword [0x41c1dc], ebx
mov dx, word [esi + 2]
mov eax, dword [ebp + 4]
push 8
push edx
push eax
push 0x41d16c
push ecx
push 0x46
push edi
call sub.REDCOMM.dll_Ordinal_168
push ebx
push 0x80
push 2
push ebx
push 1
push 0xc0000000
push 0x41c250
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x403608
mov ecx, dword [0x41d168]
mov dword [0x41d1ac], ebx
mov dword [0x41d164], 2
mov dx, word [esi + 2]
mov eax, dword [ebp + 4]
push 2
push edx
push eax
push 0x41d16c
push ecx
push 0x46
push edi
call sub.REDCOMM.dll_Ordinal_168
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
mov ecx, dword [0x41d168]
mov dword [0x41d164], 1
mov dword [0x41d1ac], 0
mov dx, word [esi + 2]
mov eax, dword [ebp + 4]
push 1
push edx
mov edx, dword [esp + 0x124]
push eax
push 0x41d16c
push ecx
push 0x46
push edx
call sub.REDCOMM.dll_Ordinal_168
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
mov eax, dword [0x41d1ac]
xor ebx, ebx
cmp eax, ebx
je case.0x403459.3
mov ecx, dword [0x41d1a4]
xor eax, eax
mov ax, word [esi + 2]
cmp ecx, eax
jne 0x403775
mov ecx, dword [esi + 8]
mov eax, dword [0x41c1d4]
dec ecx
cmp eax, ecx
jne 0x403775
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
push 0x41c250
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4036eb
mov ecx, dword [0x41d168]
mov dword [0x41d164], 2
mov dword [0x41d1ac], ebx
mov dx, word [esi + 2]
mov eax, dword [ebp + 4]
push 2
push edx
mov edx, dword [esp + 0x124]
push eax
push 0x41d16c
push ecx
push 0x46
push edx
call sub.REDCOMM.dll_Ordinal_168
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esi + 4]
lea eax, [esp + 0x10]
push ebx
sub ecx, 0x14
push eax
lea edx, [esi + 0x14]
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403748
mov edx, dword [0x41d168]
mov dword [0x41d164], 4
mov dword [0x41d1ac], ebx
mov ax, word [esi + 2]
mov ecx, dword [ebp + 4]
push 4
push eax
mov eax, dword [esp + 0x124]
push ecx
push 0x41d16c
push edx
push 0x46
push eax
call sub.REDCOMM.dll_Ordinal_168
mov ecx, dword [esp + 0x10]
mov edx, dword [0x41d19c]
add edx, ecx
push edi
mov dword [0x41d19c], edx
mov edx, dword [esi + 8]
mov dword [0x41c1d4], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
mov edx, dword [0x41d168]
mov dword [0x41d1ac], ebx
mov dword [0x41d164], edi
mov ax, word [esi + 2]
mov ecx, dword [ebp + 4]
push edi
push eax
mov eax, dword [esp + 0x124]
push ecx
push 0x41d16c
push edx
push 0x46
push eax
call sub.REDCOMM.dll_Ordinal_168
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
mov eax, dword [0x41d1ac]
xor ebx, ebx
cmp eax, ebx
je 0x4038a1
mov ecx, dword [0x41d19c]
mov eax, dword [0x41c234]
cmp ecx, eax
je 0x4037e8
push 0x41c250
mov dword [0x41d164], edi
mov dword [0x41d1ac], ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x403834
cmp dword [0x41c1dc], ebx
je 0x403834
lea edx, [esp + 0x14]
push 0x41c250
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x14]
push 0x5c
push eax
call fcn.0040e650
add esp, 8
cmp eax, ebx
je 0x403815
mov byte [eax], bl
lea ecx, [esp + 0x14]
push 1
push ecx
push ebx
push 0x41c250
push str.open
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push ebx
call fcn.0040e6ee
push eax
call fcn.0040e6bf
add esp, 8
call fcn.0040e6cc
cdq
mov ecx, 0x7d0
idiv ecx
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [0x41d164]
mov ax, word [esi + 2]
mov ecx, dword [ebp + 4]
push edx
mov edx, dword [0x41d168]
push eax
mov eax, dword [esp + 0x124]
push ecx
push 0x41d16c
push edx
push 0x46
push eax
call sub.REDCOMM.dll_Ordinal_168
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
mov dword [0x41d164], 5
mov dword [0x41d1ac], 0
push 0x41c250
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret