Function at 0x10003610
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [esi + 0x37c]
sub eax, dword [esi + 0x370]
mov ecx, dword [esi + 0x374]
add ecx, dword [esi + 0x368]
mov edx, dword [esi + 0x350]
push 0
push eax
mov eax, dword [edx + 4]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
js 0x100038bf
add dword [esi + 0x370], eax
mov ecx, dword [esi + 0x370]
add dword [esi + 0x374], eax
add dword [esi + 0x380], eax
cmp ecx, dword [esi + 0x37c]
jge 0x1000366a
mov eax, 1
ret
mov ecx, dword [esi + 0x36c]
movzx edx, word [ecx + 6]
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
push edi
push edx
call ebx
movzx edi, ax
mov eax, dword [esi + 0x36c]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.WS2_32.dll_ntohl]
add eax, edi
xor edi, edi
mov dword [esi + 0x390], eax
cmp dword [esi + 0x378], edi
je 0x1000377f
mov eax, dword [esi + 0x36c]
cmp byte [eax], 0x49
jne 0x100037a8
cmp byte [eax + 1], 0x46
jne 0x100037a8
cmp byte [eax + 2], 0x57
jne 0x100037a8
movzx edx, word [eax + 6]
push edx
call ebx
movzx edi, ax
mov eax, dword [esi + 0x36c]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.WS2_32.dll_ntohl]
add eax, edi
mov dword [esi + 0x37c], eax
cmp eax, 0x1000
jl 0x100036f9
mov eax, 0x1000
mov edx, dword [esi + 0x36c]
xor edi, edi
mov dword [esi + 0x37c], eax
mov dword [esi + 0x370], edi
mov dword [esi + 0x380], edi
mov dword [esi + 0x378], edi
mov dword [esi + 0x388], edi
movzx eax, word [edx + 6]
push eax
call ebx
mov edx, dword [esi + 0x368]
movzx ecx, ax
lea eax, [ecx + edx + 0x14c]
mov dword [esi + 0x38c], eax
cmp dword [esi + 0x37c], edi
jne 0x100038b7
mov ecx, esi
call fcn.100038d0
test eax, eax
je 0x100037a8
mov dword [esi + 0x370], edi
mov dword [esi + 0x380], edi
mov dword [esi + 0x374], edi
lea eax, [edi + 1]
pop edi
mov dword [esi + 0x37c], 0x14c
mov dword [esi + 0x378], 1
pop ebx
ret
mov ecx, dword [esi + 0x36c]
movzx edx, word [ecx + 6]
push edx
call ebx
mov ecx, dword [esi + 0x37c]
movzx eax, ax
sub ecx, eax
mov dword [esi + 0x388], ecx
mov ecx, esi
call fcn.100038d0
test eax, eax
jne 0x100037ad
pop edi
xor eax, eax
pop ebx
ret
mov edx, dword [esi + 0x380]
cmp edx, dword [esi + 0x390]
jl 0x10003800
mov eax, dword [esi + 0x368]
add eax, 0x14c
mov dword [esi + 0x370], edi
mov dword [esi + 0x380], edi
mov dword [esi + 0x374], edi
mov dword [esi + 0x388], edi
pop edi
mov dword [esi + 0x38c], eax
mov dword [esi + 0x37c], 0x14c
mov dword [esi + 0x378], 1
mov eax, 1
pop ebx
ret
mov edi, dword [esi + 0x388]
sub edi, dword [esi + 0x384]
test edi, edi
jle 0x1000385b
mov ecx, dword [esi + 0x36c]
movzx edx, word [ecx + 6]
push edi
push edx
call ebx
mov ecx, dword [esi + 0x368]
movzx eax, ax
add eax, dword [esi + 0x384]
lea edx, [eax + ecx + 0x14c]
mov eax, dword [esi + 0x36c]
movzx ecx, word [eax + 6]
push edx
push ecx
call ebx
movzx edx, ax
mov eax, dword [esi + 0x368]
lea ecx, [edx + eax + 0x14c]
push ecx
call fcn.1000a8c0
add esp, 0xc
mov eax, dword [esi + 0x390]
sub eax, dword [esi + 0x380]
mov ecx, 0x1000
sub ecx, edi
mov dword [esi + 0x37c], eax
cmp eax, ecx
jl 0x1000387a
mov eax, ecx
mov edx, dword [esi + 0x36c]
mov dword [esi + 0x37c], eax
mov dword [esi + 0x370], 0
movzx eax, word [edx + 6]
push eax
call ebx
movzx ecx, ax
lea edx, [ecx + edi + 0x14c]
mov dword [esi + 0x374], edx
mov dword [esi + 0x384], 0
mov dword [esi + 0x388], edi
pop edi
mov eax, 1
pop ebx
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor eax, eax
ret