Function at 0x4033a0
Capabilities:
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:
sub esp, 0x81c
push ebx
push ebp
mov ebp, dword [esp + 0x82c]
push esi
push edi
mov esi, 0x46f304
lea edi, [ebp + 0xf4]
mov dword [esp + 0x18], edi
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x4033ea
test cl, cl
je 0x4033e6
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x4033ea
add eax, 2
add esi, 2
test cl, cl
jne 0x4033c2
xor eax, eax
jmp 0x4033ef
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4037af
mov esi, 0x46f2cc
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x403426
test cl, cl
je 0x403422
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x403426
add eax, 2
add esi, 2
test cl, cl
jne 0x4033fe
xor eax, eax
jmp 0x40342b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403447
mov eax, dword [ebp + 0x114]
cmp eax, 2
je 0x4037af
cmp eax, 3
je 0x4037af
mov al, byte [ebp + 0x34]
test al, al
mov eax, dword [esp + 0x830]
je 0x403568
test eax, eax
je 0x403466
push 0xf
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
lea edi, [ebp + 0xf9]
mov esi, str.COM1
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40349b
test cl, cl
je 0x403497
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40349b
add eax, 2
add esi, 2
test cl, cl
jne 0x403473
xor eax, eax
jmp 0x4034a0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4034ab
mov dx, 0x3fc
mov al, 0xa
out dx, al
mov esi, str.COM2
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x4034da
test cl, cl
je 0x4034d6
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x4034da
add eax, 2
add esi, 2
test cl, cl
jne 0x4034b2
xor eax, eax
jmp 0x4034df
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4034ea
mov dx, 0x2fc
mov al, 0xa
out dx, al
mov esi, str.COM3
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x403519
test cl, cl
je 0x403515
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x403519
add eax, 2
add esi, 2
test cl, cl
jne 0x4034f1
xor eax, eax
jmp 0x40351e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403529
mov dx, 0x3ef
mov al, 2
out dx, al
mov esi, str.COM4
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x403558
test cl, cl
je 0x403554
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x403558
add eax, 2
add esi, 2
test cl, cl
jne 0x403530
xor eax, eax
jmp 0x40355d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403568
mov dx, 0x2ef
mov al, 2
out dx, al
mov ebx, dword [esp + 0x83c]
mov esi, dword [esp + 0x838]
cmp ebx, 1
jbe 0x4035c4
push 3
push str.ATE0
push esi
call fcn.0045f690
add esp, 0xc
test eax, eax
je 0x4035c4
push 3
push str.ATH0
push esi
call fcn.0045f690
add esp, 0xc
test eax, eax
je 0x4035c4
push 3
push 0x46f2d0
push esi
call fcn.0045f690
add esp, 0xc
test eax, eax
je 0x4035c4
push 1
push ebx
push esi
push ebp
call fcn.00406450
add esp, 0x10
mov ecx, dword [ebp]
lea edi, [ebp + 4]
lea eax, [esp + 0x10]
push edi
push eax
push ebx
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403625
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x403625
mov edx, dword [ebp + 0x14]
push 0x3e8
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x403607
mov dword [esp + 0x10], 0
jmp 0x403625
mov ecx, dword [ebp]
lea eax, [esp + 0x10]
push 1
push eax
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov edx, dword [esp + 0x10]
mov eax, dword [ebp + 0xc]
add eax, edx
mov dword [ebp + 0xc], eax
mov esi, dword [sym.imp.KERNEL32.dll_ClearCommError]
mov edx, dword [ebp]
lea eax, [esp + 0x20]
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
call esi
mov eax, dword [esp + 0x28]
test eax, eax
ja 0x40362b
mov al, byte [ebp + 0x34]
test al, al
je 0x40377c
lea edi, [ebp + 0xf9]
mov esi, str.COM1
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x403683
test cl, cl
je 0x40367f
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x403683
add eax, 2
add esi, 2
test cl, cl
jne 0x40365b
xor eax, eax
jmp 0x403688
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40369e
mov dx, 0x3fd
in al, dx
and al, 0x60
cmp al, 0x60
jne 0x40368c
mov dx, 0x3fc
mov al, 8
out dx, al
mov esi, str.COM2
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x4036cd
test cl, cl
je 0x4036c9
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x4036cd
add eax, 2
add esi, 2
test cl, cl
jne 0x4036a5
xor eax, eax
jmp 0x4036d2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4036e8
mov dx, 0x2fd
in al, dx
and al, 0x60
cmp al, 0x60
jne 0x4036d6
mov dx, 0x2fc
mov al, 8
out dx, al
mov esi, str.COM3
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x403717
test cl, cl
je 0x403713
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x403717
add eax, 2
add esi, 2
test cl, cl
jne 0x4036ef
xor eax, eax
jmp 0x40371c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403732
mov dx, 0x3ed
in al, dx
and al, 0x60
cmp al, 0x60
jne 0x403720
mov dx, 0x3ef
mov al, 1
out dx, al
mov esi, str.COM4
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x403761
test cl, cl
je 0x40375d
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x403761
add eax, 2
add esi, 2
test cl, cl
jne 0x403739
xor eax, eax
jmp 0x403766
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40377c
mov dx, 0x2ed
in al, dx
and al, 0x60
cmp al, 0x60
jne 0x40376a
mov dx, 0x2ef
mov al, 1
out dx, al
mov eax, dword [esp + 0x10]
mov dword [0x60b8adc], eax
mov al, byte [ebp + 0x34]
test al, al
je 0x4037a0
mov eax, dword [esp + 0x830]
test eax, eax
je 0x4037a0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x81c
ret
mov ebp, dword [esp + 0x83c]
mov edi, dword [esp + 0x838]
cmp ebp, 1
jbe 0x403814
push 3
push str.ATE0
push edi
call fcn.0045f690
add esp, 0xc
test eax, eax
je 0x403814
push 3
push str.ATH0
push edi
call fcn.0045f690
add esp, 0xc
test eax, eax
je 0x403814
push 3
push 0x46f2d0
push edi
call fcn.0045f690
add esp, 0xc
test eax, eax
je 0x403814
mov ebx, dword [esp + 0x834]
push 1
push ebp
push edi
push ebx
call fcn.00406450
add esp, 0x10
jmp 0x40381b
mov ebx, dword [esp + 0x834]
mov eax, dword [esp + 0x18]
mov esi, 0x46f304
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403848
test cl, cl
je 0x403844
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403848
add eax, 2
add esi, 2
test cl, cl
jne 0x403824
xor eax, eax
jmp 0x40384d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40388d
mov ecx, dword [ebx + 0x38]
lea eax, [esp + 0x14]
push eax
push 0x4004667f
push ecx
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
jne 0x40388d
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x40388d
cmp eax, 0x800
jb 0x40387c
mov eax, 0x800
push 0
push eax
mov eax, dword [ebx + 0x38]
lea edx, [esp + 0x34]
push edx
push eax
call sub.WSOCK32.dll_recv
mov ecx, dword [ebx + 0x38]
push 0
push ebp
push edi
push ecx
call sub.WSOCK32.dll_send
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x81c
ret