Function at 0x40e050
Capabilities:
Create directory
Delete file
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6419f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x354
push ebx
push esi
xor ebx, ebx
push edi
mov edi, ecx
mov esi, 7
xor eax, eax
mov dword [ebp - 0x28], edi
mov byte [ebp - 0x20], bl
mov dword [ebp - 0x1f], ebx
mov dword [ebp - 0x1b], ebx
mov byte [ebp - 0x17], bl
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x3c], ebx
mov word [ebp - 0x4c], ax
mov dword [ebp - 4], ebx
push 0x204
lea ecx, [ebp - 0x35c]
push ebx
push ecx
mov dword [ebp - 0x360], ebx
call fcn.006100a0
push 0x102
lea eax, [ebp - 0x156]
xor edx, edx
push ebx
push eax
mov word [ebp - 0x158], dx
call fcn.006100a0
mov ecx, dword [ebp + 8]
add esp, 0x18
push ebx
push 0x1000
push 0x70bdd0
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x40e66c
cmp eax, ebx
je 0x40e66c
mov eax, dword [0x70bdd4]
mov edx, dword [0x70bdd0]
mov cx, word [0x70bdd8]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x70bdd2]
mov dword [ebp - 0x20], edx
mov word [ebp - 0x18], cx
cmp eax, 0x20009304
jne 0x40e122
mov byte [ebp - 0x11], 1
jmp 0x40e130
cmp eax, 0x20009300
jne 0x40e633
mov byte [ebp - 0x11], bl
cmp dword [edi + 0x2d14], 0x24
mov esi, dword [0x70bdde]
mov dword [ebp - 0x50], esi
jbe 0x40e15c
mov edx, dword [0x70bdda]
push edx
lea eax, [ebp - 0x360]
push 0x70bde2
push eax
call fcn.00610e50
jmp 0x40e1c2
mov ecx, dword [0x70bdda]
push ecx
lea edx, [ebp - 0x158]
push 0x70bde2
push edx
call fcn.00610e50
add esp, 0xc
lea eax, [ebp - 0x158]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 1]
cmp edi, 0x3fffffff
jle 0x40e193
xor eax, eax
jmp 0x40e1ad
lea eax, [edi + edi]
call fcn.006123b0
mov eax, esp
push 3
push edi
lea ecx, [ebp - 0x158]
push ecx
push eax
call fcn.00403a40
push eax
lea edx, [ebp - 0x360]
push 0x104
push edx
call fcn.00611c28
mov edi, dword [ebp - 0x28]
add esp, 0xc
mov dword [ebp - 0x1a], ebx
mov word [ebp - 0x20], 0x24
cmp esi, 0xffffffff
je 0x40e1de
mov dword [ebp - 0x1e], 0x55aa0000
cmp esi, ebx
jne 0x40e1e1
mov dword [ebp - 0x1e], ebx
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov dx, word [ebp - 0x18]
push ebx
push 0xa
mov dword [0x70a9d0], eax
mov eax, dword [ebp + 8]
push 0x70a9d0
push eax
mov dword [0x70a9d4], ecx
mov word [0x70a9d8], dx
call dword [sym.imp.WS2_32.dll_send]
or ecx, 0xffffffff
cmp eax, ecx
jne 0x40e22b
mov dword [ebp - 4], ecx
xor ecx, ecx
mov dword [ebp - 0x38], 7
mov word [ebp - 0x4c], cx
jmp 0x40e67c
cmp esi, ecx
je 0x40e626
cmp esi, ebx
je 0x40e626
lea edx, [ebp - 0x360]
push edx
lea ecx, [ebp - 0x24]
call fcn.0040bea0
mov byte [ebp - 4], 3
lea eax, [edi + 0x18bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040bea0
mov byte [ebp - 4], 4
push 0x66ea40
lea ecx, [ebp - 0x10]
call fcn.00401b50
mov eax, dword [ebp - 0x24]
cmp dword [eax - 0xc], ebx
jle 0x40e3eb
push 0x5c
push eax
call fcn.00611e99
add esp, 8
cmp eax, ebx
je 0x40e3eb
sub eax, dword [ebp - 0x24]
sar eax, 1
cmp eax, 0xffffffff
je 0x40e3eb
mov eax, dword [ebp + 0x10]
cmp eax, 0x20009120
jne 0x40e2ad
add edi, 0x46c
jmp 0x40e2ba
cmp eax, 0x20009135
jne 0x40e2d0
add edi, 0x28fc
push edi
lea ecx, [ebp - 0x10]
call fcn.00403420
push 0x66ea40
lea ecx, [ebp - 0x10]
call fcn.00401b50
mov edx, dword [0x700724]
mov eax, dword [edx + 0xc]
mov ecx, 0x700724
call eax
add eax, 0x10
mov dword [ebp + 0x10], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x24]
mov edi, dword [ecx - 0xc]
lea edx, [ebp - 0x28]
push edx
push 0x66ea40
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x28], ebx
call fcn.0040d920
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp + 0x10]
call fcn.004078d0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x2c]
call fcn.004014a0
cmp dword [ebp - 0x28], edi
jge 0x40e3cd
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x5c
lea ecx, [ebp + 0x10]
push ecx
lea edx, [ebp - 0x2c]
push edx
call fcn.00408d00
add esp, 0xc
mov byte [ebp - 4], 8
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.00401710
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e378
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x10]
push ebx
push ecx
call esi
lea edx, [ebp - 0x28]
push edx
push 0x66ea40
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x24]
call fcn.0040d920
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp + 0x10]
call fcn.004078d0
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x54]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e3c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp - 0x28], edi
jl 0x40e330
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.00401710
mov byte [ebp - 4], 4
lea ecx, [ebp + 0x10]
call fcn.004014a0
jmp 0x40e405
mov ecx, dword [ebp - 0x10]
push ecx
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
lea edx, [ebp - 0x360]
push edx
lea ecx, [ebp - 0x10]
call fcn.00401b50
mov eax, dword [ebp - 0x10]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40e46d
mov edx, dword [ebp + 8]
push ebx
push 0xa
lea ecx, [ebp - 0x20]
push ecx
push edx
mov dword [ebp - 0x1a], ebx
mov word [ebp - 0x20], 0x24
mov dword [ebp - 0x1e], ebx
call dword [sym.imp.WS2_32.dll_send]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x10]
call fcn.004014a0
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x24]
call fcn.004014a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x4c]
call fcn.00405700
jmp 0x40e67f
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x28], 0x1000
cmp byte [ebp - 0x11], bl
jne 0x40e4db
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 8]
push ebx
push 0xa
push 0x70bdd0
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov ecx, dword [0x70bdd4]
mov dx, word [0x70bdd8]
mov esi, eax
mov eax, dword [0x70bdd0]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], ecx
mov word [ebp - 0x18], dx
cmp al, 0x24
je 0x40e4d2
push ebx
lea eax, [ebp - 0x30]
push eax
push esi
push 0x70bdd0
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
add dword [ebp + 0x10], esi
jmp 0x40e4db
mov ecx, dword [0x70bdd6]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + 8]
push ebx
push edx
push 0x70bdd0
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
je 0x40e575
push ebx
lea ecx, [ebp - 0x30]
push ecx
push esi
push 0x70bdd0
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 0x10]
add eax, esi
mov dword [ebp + 0x10], eax
cmp eax, dword [ebp - 0x50]
jae 0x40e58b
cmp esi, ebx
je 0x40e58b
cmp byte [ebp - 0x11], bl
jne 0x40e473
push ebx
mov dword [ebp - 0x1e], 0x55aa0000
mov word [ebp - 0x20], 0x24
mov edx, dword [ebp - 0x20]
push 0xa
mov dword [ebp - 0x1a], ebx
mov eax, dword [ebp - 0x1c]
mov cx, word [ebp - 0x18]
mov dword [0x70a9d0], edx
mov edx, dword [ebp + 8]
push 0x70a9d0
push edx
mov dword [0x70a9d4], eax
mov word [0x70a9d8], cx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x40e473
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40e442
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40e442
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push ebx
mov dword [ebp - 0x1e], 0x55aa0000
mov word [ebp - 0x20], 0x24
mov ecx, dword [ebp - 0x20]
push 0xa
mov dword [ebp - 0x1a], ebx
mov edx, dword [ebp - 0x1c]
mov ax, word [ebp - 0x18]
mov dword [0x70a9d0], ecx
mov ecx, dword [ebp + 8]
push 0x70a9d0
push ecx
mov dword [0x70a9d4], edx
mov word [0x70a9d8], ax
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x40e5df
push edi
call esi
jmp 0x40e442
lea ecx, [ebp - 0x10]
call fcn.004014f0
mov edx, dword [ebp + 0xc]
push eax
push 0x104
push edx
call fcn.00611c28
add esp, 0xc
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x10]
call fcn.004014a0
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x24]
call fcn.004014a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x4c]
call fcn.00405700
mov eax, 1
jmp 0x40e681
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x4c]
call fcn.00405700
jmp 0x40e67f
mov eax, dword [0x700724]
mov edx, dword [eax + 0xc]
mov ecx, 0x700724
call edx
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1e]
push eax
lea ecx, [ebp + 8]
push str.Bad_data_type._Received_type__04Xh
push ecx
call fcn.00405ab0
add esp, 0xc
mov byte [ebp - 4], bl
lea ecx, [ebp + 8]
jmp 0x40e454
mov dword [ebp - 4], 0xffffffff
xor edx, edx
mov dword [ebp - 0x38], esi
mov word [ebp - 0x4c], dx
mov dword [ebp - 0x3c], ebx
xor eax, eax
lea esp, [ebp - 0x36c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc