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

Disassembly:
sub esp, 0x858
mov eax, dword [0x4915c0]
xor eax, esp
mov dword [esp + 0x850], eax
mov eax, dword [ebx + 0x20]
cmp eax, 0xffffffff
push ebp
push esi
push edi
je 0x42afbd
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx + 0x20], 0xffffffff
xor esi, esi
push esi
xor eax, eax
push 2
push 2
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebx + 0x20], eax
jne 0x42affe
or eax, eax
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x850]
xor ecx, esp
call fcn.00455843
add esp, 0x858
ret
push 4
lea ecx, [esp + 0x30]
push ecx
push 0x1006
push 0xffff
push eax
mov dword [esp + 0x40], 0x1388
call dword [sym.imp.WS2_32.dll_setsockopt]
push str.192.168.0.1
mov word [esp + 0x34], 2
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x45
mov dword [esp + 0x38], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x1ff
lea edx, [esp + 0x65d]
push esi
push edx
mov word [esp + 0x3e], ax
mov byte [esp + 0x664], 0
call fcn.00457910
push 0x1ff
lea eax, [esp + 0x269]
push esi
push eax
mov byte [esp + 0x270], 0
call fcn.00457910
add esp, 0x18
push esi
push 0x80
push 3
push esi
xor eax, eax
push 1
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov eax, dword [ebx + 0x1c]
push SysReAllocString
push eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x14], edi
jne 0x42b0c6
mov dword [esp + 0xc], 0xfffffffe
jmp 0x42b48e
lea ecx, [esp + 0x20]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [esp + 0x24]
cmp eax, esi
mov ecx, dword [esp + 0x20]
jg 0x42b10e
jl 0x42b0e8
cmp ecx, 0x100000
jae 0x42b0f4
mov dword [ebx + 0x844], 0x3c
jmp 0x42b118
cmp eax, esi
jg 0x42b10e
jl 0x42b102
cmp ecx, 0x800000
jae 0x42b10e
mov dword [ebx + 0x844], 0x96
jmp 0x42b118
mov dword [ebx + 0x844], 0x12c
call dword [0x49297c]
push 0x19
call fcn.0043997e
mov ebp, eax
add esp, 4
cmp ebp, esi
jne 0x42b13b
mov dword [esp + 0xc], 0xfffffffd
jmp 0x42b47d
xor eax, eax
mov dword [ebp], eax
mov dword [ebp + 4], eax
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x14], eax
mov byte [ebp + 0x18], al
mov byte [ebp], al
mov byte [ebp + 1], 2
mov edx, dword [str.ipTIME_FIRM_WARE]
mov dword [ebp + 2], edx
mov eax, dword [0x481e6c]
mov dword [ebp + 6], eax
mov ecx, dword [0x481e70]
mov dword [ebp + 0xa], ecx
mov edx, dword [0x481e74]
mov dword [ebp + 0xe], edx
mov eax, dword [str.octet]
push 0x10
lea edx, [esp + 0x34]
push edx
mov dword [ebp + 0x13], eax
mov cl, byte [0x481e80]
push esi
push 0x19
mov byte [ebp + 0x17], cl
mov eax, dword [ebx + 0x20]
push ebp
push eax
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, esi
jle 0x42b475
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [ebx + 0x20]
xor eax, eax
lea edx, [esp + 0x44]
push edx
push esi
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
push 0x200
lea eax, [esp + 0x268]
push eax
push ecx
mov dword [esp + 0x40], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, esi
jle 0x42b475
movzx ax, byte [esp + 0x259]
xor edx, edx
mov dh, byte [esp + 0x258]
or dx, ax
cmp dx, 4
jne 0x42b475
movzx ax, byte [esp + 0x25b]
mov cx, word [esp + 0x42]
xor edx, edx
mov dh, byte [esp + 0x25a]
mov word [esp + 0x32], cx
or dx, ax
movzx eax, dx
cmp ax, si
je 0x42b2ac
push 0x1ff
lea ecx, [esp + 0x45d]
push esi
push ecx
call fcn.00457910
add esp, 0xc
mov byte [esp + 0x458], 0
mov byte [esp + 0x459], 5
mov byte [esp + 0x45a], 0
mov byte [esp + 0x45b], 4
mov ecx, 8
mov esi, str.block_number_is_not_initial_state
lea edi, [esp + 0x45c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x20]
push 0x10
lea edx, [esp + 0x34]
push edx
push 0
push 0x200
lea eax, [esp + 0x468]
push eax
push ecx
movsw word es:[edi], word [esi]
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [esp + 0xc], 0xfffffc17
jmp 0x42b47d
push 0x200
lea edx, [esp + 0x65c]
push 0
push edx
mov esi, 1
call fcn.00457910
push 0x204
lea eax, [esp + 0x60]
push 0
push eax
call fcn.00457910
add esp, 0x18
xor ecx, ecx
push ecx
push ecx
push ecx
xor eax, eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x200
lea edx, [esp + 0x664]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, esi
jne 0x42b475
mov eax, dword [esp + 0x10]
movsx edx, si
shl edx, 8
mov ecx, esi
sar ecx, 8
sar edx, 8
test eax, eax
mov byte [esp + 0x50], 0
mov byte [esp + 0x51], 3
push 0x10
mov byte [esp + 0x56], cl
mov byte [esp + 0x57], dl
je 0x42b4c7
mov ecx, 0x80
lea esi, [esp + 0x65c]
lea edi, [esp + 0x58]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x34]
push ecx
push 0
add eax, 4
push eax
mov eax, dword [ebx + 0x20]
lea edx, [esp + 0x60]
push edx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jle 0x42b475
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
xor eax, eax
mov ecx, edx
add ecx, edi
adc eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x24]
jb 0x42b399
ja 0x42b38d
cmp ecx, dword [esp + 0x20]
jb 0x42b399
cmp edx, 0x200
jb 0x42b47d
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [ebx + 0x20]
lea edx, [esp + 0x44]
push edx
push 0
push 0x200
lea eax, [esp + 0x268]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jle 0x42b475
movzx ax, byte [esp + 0x259]
xor edx, edx
mov dh, byte [esp + 0x258]
or dx, ax
cmp dx, 4
jne 0x42b475
movzx dx, byte [esp + 0x25b]
xor ecx, ecx
mov ch, byte [esp + 0x25a]
push 0x200
lea eax, [esp + 0x65c]
push 0
push eax
or cx, dx
add cx, 1
add edi, dword [esp + 0x1c]
movzx esi, cx
adc dword [esp + 0x28], 0
mov dword [esp + 0x24], edi
call fcn.00457910
push 0x204
lea ecx, [esp + 0x60]
push 0
push ecx
call fcn.00457910
mov edi, dword [esp + 0x2c]
add esp, 0x18
movsx eax, si
shl eax, 9
push 0
sub eax, 0x200
cdq
push 0
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea edx, [esp + 0x14]
push edx
push 0x200
lea eax, [esp + 0x664]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
je 0x42b30b
mov dword [esp + 0xc], 0xfffffffc
test ebp, ebp
je 0x42b48a
push ebp
call fcn.00439979
add esp, 4
mov edi, dword [esp + 0x14]
mov eax, dword [ebx + 0x20]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
cmp edi, 0xffffffff
mov dword [ebx + 0x20], 0xffffffff
je 0x42b4ab
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x85c]
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00455843
add esp, 0x858
ret
mov edx, dword [ebx + 0x20]
lea eax, [esp + 0x34]
push eax
push 0
push 4
lea ecx, [esp + 0x60]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
jmp 0x42b47d