Function at 0x4012d8
Capabilities:
Delete file
Read and send data from client to server
Read file on windows
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ebx, 0x410608
mov esi, 0x409130
mov edi, 0x40b604
mov eax, dword [esi]
add dword [0x40912c], eax
cmp dword [0x40912c], 0x7d0
jl 0x401306
call fcn.00401700
push 8
push dword [0x40b5e4]
push dword [0x40b5dc]
call sub.WS2_32.DLL_WSAEventSelect
inc eax
je 0x40134a
push 0x40b5f8
push 0x40b5e8
push dword [0x40b5dc]
call sub.WSOCK32.DLL_accept
mov dword [0x40b5e0], eax
cmp dword [0x40b5e0], 0xffffffff
jne 0x401355
add dword [esi], 0x14
and dword [esi], 0x7f
jmp 0x4016f8
add dword [esi], 0x14
and dword [esi], 0x7f
jmp 0x4016f8
push 1
push dword [0x40b5e4]
push dword [0x40b5e0]
call sub.WS2_32.DLL_WSAEventSelect
inc eax
je 0x4015d6
push 0
push 0x2800
push 0x40b608
push dword [0x40b5e0]
call sub.WSOCK32.DLL_recv
mov dword [0x40b5fc], eax
cmp dword [0x40b5fc], 0xffffffff
jne 0x4013aa
push dword [0x40b5e0]
call sub.WSOCK32.DLL_closesocket
add dword [esi], 0x14
and dword [esi], 0x7f
jmp 0x4016f8
movsx edx, byte [0x40b608]
and edx, 0xff
shl edx, 8
movsx ecx, byte [0x40b609]
and ecx, 0xff
or edx, ecx
mov dword [0x40b600], edx
mov eax, dword [0x40b5fc]
cmp eax, dword [0x40b600]
je 0x4013f2
push dword [0x40b5e0]
call sub.WSOCK32.DLL_closesocket
add dword [esi], 0x14
and dword [esi], 0x7f
jmp 0x4016f8
cmp byte [0x40b60e], 0
jne 0x401407
mov dword [0x412e1c], 0x2000
jmp 0x401411
mov dword [0x412e1c], 0x1000
movsx edx, byte [0x40b60a]
and edx, 0xff
shl edx, 0x18
movsx ecx, byte [0x40b60b]
and ecx, 0xff
shl ecx, 0x10
or edx, ecx
movsx eax, byte [0x40b60c]
and eax, 0xff
shl eax, 8
or edx, eax
movsx ecx, byte [0x40b60d]
and ecx, 0xff
or edx, ecx
mov dword [0x412e14], edx
mov edx, dword [0x412e14]
cmp edx, dword [0x412e18]
jne 0x40146f
add dword [esi], 0x14
and dword [esi], 0x7f
jmp 0x401479
mov eax, dword [0x412e14]
mov dword [0x412e18], eax
mov edx, dword [0x40b5fc]
mov byte [edx + 0x40b608], 0
mov ecx, dword [0x412e24]
mov byte [ebx + ecx], 0
mov eax, dword [0x412e14]
and eax, 0x7ffff
mov dword [0x412e20], eax
mov edx, dword [0x412e14]
shr edx, 0x13
mov dword [edi], edx
mov eax, dword [edi]
mov ecx, 0x3e8
cdq
idiv ecx
or al, 0x30
mov edx, dword [0x412e24]
mov byte [ebx + edx], al
mov eax, dword [edi]
mov ecx, 0x64
cdq
idiv ecx
mov ecx, 0xa
cdq
idiv ecx
or dl, 0x30
mov eax, dword [0x412e24]
mov byte [ebx + eax + 1], dl
mov eax, dword [edi]
mov ecx, 0xa
cdq
idiv ecx
mov ecx, 0xa
cdq
idiv ecx
or dl, 0x30
mov eax, dword [0x412e24]
mov byte [ebx + eax + 2], dl
mov eax, dword [edi]
mov ecx, 0xa
cdq
idiv ecx
or dl, 0x30
mov eax, dword [0x412e24]
mov byte [ebx + eax + 3], dl
mov edx, dword [0x412e24]
mov byte [ebx + edx + 4], 0
push 0x40b60f
push ebx
call fcn.004027b4
add esp, 8
push str..OUT
push ebx
call fcn.004027b4
add esp, 8
push 0
push 0x20
push 3
push 0
push 1
push closesocket
push ebx
call sub.KERNEL32.DLL_CreateFileA
mov dword [0x412e08], eax
cmp dword [0x412e08], 0xffffffff
je 0x40159a
push 0
push 0
push dword [0x412e20]
push dword [0x412e08]
call sub.KERNEL32.DLL_SetFilePointer
push 0
push 0x412e10
push dword [0x412e1c]
push 0x40de0a
push dword [0x412e08]
call sub.KERNEL32.DLL_ReadFile
push dword [0x412e08]
call sub.KERNEL32.DLL_CloseHandle
jmp 0x4015a2
xor ecx, ecx
mov dword [0x412e10], ecx
mov eax, dword [0x412e10]
mov dword [0x40b600], eax
mov edx, dword [0x40b600]
sar edx, 8
and dl, 0xff
mov byte [0x40de08], dl
mov cl, byte [0x40b600]
and cl, 0xff
mov byte [0x40de09], cl
add dword [0x40b600], 2
jmp 0x4015ec
push dword [0x40b5e0]
call sub.WSOCK32.DLL_closesocket
add dword [esi], 0x14
and dword [esi], 0x7f
jmp 0x4016f8
push 2
push dword [0x40b5e4]
push dword [0x40b5e0]
call sub.WS2_32.DLL_WSAEventSelect
inc eax
je 0x4016e7
push 0
push dword [0x40b600]
push 0x40de08
push dword [0x40b5e0]
call sub.WSOCK32.DLL_send
mov dword [0x40b5fc], eax
push dword [0x40b5e0]
call sub.WSOCK32.DLL_closesocket
cmp dword [0x40b5fc], 0xffffffff
je 0x4016df
mov eax, dword [0x40b5fc]
cmp eax, dword [0x40b600]
jne 0x4016df
mov dword [esi], 0x14
mov edx, dword [0x412e10]
cmp edx, dword [0x412e1c]
jae 0x4016f8
push ebx
call sub.KERNEL32.DLL_DeleteFileA
jmp 0x4016d9
mov eax, dword [edi]
mov ecx, 0x3e8
cdq
idiv ecx
or al, 0x30
mov edx, dword [0x412e24]
mov byte [ebx + edx], al
mov eax, dword [edi]
mov ecx, 0x64
cdq
idiv ecx
mov ecx, 0xa
cdq
idiv ecx
or dl, 0x30
mov eax, dword [0x412e24]
mov byte [ebx + eax + 1], dl
mov eax, dword [edi]
mov ecx, 0xa
cdq
idiv ecx
mov ecx, 0xa
cdq
idiv ecx
or dl, 0x30
mov eax, dword [0x412e24]
mov byte [ebx + eax + 2], dl
mov eax, dword [edi]
mov ecx, 0xa
cdq
idiv ecx
or dl, 0x30
mov eax, dword [0x412e24]
mov byte [ebx + eax + 3], dl
push ebx
call sub.KERNEL32.DLL_DeleteFileA
dec dword [edi]
jns 0x40166c
jmp 0x4016f8
add dword [esi], 0x14
and dword [esi], 0x7f
jmp 0x4016f8
push dword [0x40b5e0]
call sub.WSOCK32.DLL_closesocket
add dword [esi], 0x14
and dword [esi], 0x7f
pop edi
pop esi
pop ebx
pop ebp
ret