Function at 0x4022e0
Capabilities:
Check for time delay via gettickcount
Copy 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
sub esp, 0x1c
mov eax, dword [0x41801c]
xor eax, ebp
mov dword [ebp - 4], eax
mov al, byte [0x41ad78]
mov ecx, dword [0x41ad98]
push ebx
push esi
push edi
test al, al
je 0x402356
cmp al, 0xff
jne 0x402559
mov eax, dword [0x41ad7c]
mov dword [0x41ad88], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
mov ecx, 0xc
push ecx
lea edx, [ebp - 0x1c]
mov dword [0x41ad7c], eax
mov eax, dword [0x41adbc]
push edx
push eax
mov byte [ebp - 0x1c], pe_nt_image_headers32
mov byte [ebp - 0x18], 0xff
mov word [ebp - 0x1a], cx
call dword [sym.imp.WS2_32.dll_send]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403791
mov esp, ebp
pop ebp
ret
mov ecx, dword [ecx + 8]
xor esi, esi
mov dword [0x41ad94], ecx
cmp ecx, esi
ja 0x4023a1
push str.Server_File_not_exists
call fcn.00402c60
add esp, 4
cmp byte [0x41a5f3], 0
je 0x40238d
mov eax, dword [0x41b814]
cmp eax, esi
je 0x40238d
push eax
call fcn.00409162
add esp, 4
push esi
mov byte [0x41a5f3], 0
mov byte [0x41a4e2], 0
call fcn.004044df
mov edx, dword [0x41ada0]
mov ecx, 0xc
push 0x416744
push edx
mov byte [ebp - 0x10], pe_nt_image_headers32
mov byte [ebp - 0xc], 1
mov word [ebp - 0xe], cx
mov dword [0x41ad90], esi
mov dword [ebp - 8], esi
call fcn.00408c14
add esp, 8
cmp eax, esi
jne 0x4023f9
cmp dword [0x41ac58], esi
je 0x4023f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x4023f5
push eax
call fcn.00408c53
push eax
call dword [0x41ac58]
add esp, 8
xor edi, edi
jmp 0x4023fb
mov edi, eax
movzx eax, word [ebp - 0xe]
mov edx, dword [0x41adbc]
push esi
push eax
lea ecx, [ebp - 0x10]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x41ad8c], eax
mov eax, dword [0x41ad9c]
cmp eax, esi
jne 0x402433
push 0x400
call fcn.00403db8
add esp, 4
mov ecx, dword [0x41ad90]
mov dword [0x41ad9c], eax
mov byte [0x41a4e2], 1
cmp ecx, dword [0x41ad94]
jae 0x4024fc
mov ebx, dword [sym.imp.WS2_32.dll_recv]
jmp 0x402460
mov edx, dword [0x41adbc]
push 0
push 0x400
push eax
push edx
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x40256c
fldz
add dword [0x41ad90], esi
fstp qword [0x41ad80]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x41ad8c]
cmp eax, 0x3e8
jb 0x4024a8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x41ad8c], eax
mov eax, dword [0x41ad9c]
test eax, eax
je 0x4024ea
test edi, edi
je 0x4024ea
push edi
push esi
push 1
push eax
call fcn.0040907b
add esp, 0x10
cmp eax, esi
je 0x4024e5
cmp dword [0x41ac58], 0
je 0x4024e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00408c53
push eax
call dword [0x41ac58]
add esp, 8
mov eax, dword [0x41ad9c]
mov ecx, dword [0x41ad90]
cmp ecx, dword [0x41ad94]
jb 0x402460
push eax
call fcn.00403ecf
add esp, 4
mov dword [0x41ad9c], 0
test edi, edi
je 0x40251c
push edi
call fcn.00409162
add esp, 4
call fcn.00402180
mov eax, dword [0x41ada4]
mov ecx, dword [0x41ada0]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edx, dword [0x41ada0]
push edx
call fcn.004091d6
mov eax, dword [0x41ad70]
add esp, 4
mov byte [0x41a4e2], 0
test eax, eax
je 0x402559
push 0
call eax
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403791
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x402579
push edi
call fcn.00409162
add esp, 4
mov edx, dword [0x41ada0]
push edx
call fcn.004091d6
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
mov byte [0x41a4e2], 0
xor al, al
pop ebx
call fcn.00403791
mov esp, ebp
pop ebp
ret