Function at 0x10058bf0
Capabilities:
Receive data
Receive data on socket
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x1018fbe8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov edi, ecx
push 1
lea ecx, [esp + 0x34]
lea eax, [edi + 0x64]
push eax
call fcn.10084010
mov edx, dword [esp + 0x4c]
mov esi, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea ecx, [esp + 0x1c]
xor ebp, ebp
push ecx
push 0x8004667e
push edx
mov dword [esp + 0x50], ebp
mov dword [esp + 0x28], 1
call esi
cmp eax, 0xffffffff
je 0x100592f0
mov ecx, dword [esp + 0x50]
lea eax, [esp + 0x1c]
push eax
push 0x8004667e
push ecx
call esi
cmp eax, 0xffffffff
je 0x100592f0
mov eax, dword [esp + 0x4c]
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea edx, [esp + 0x13]
push 1
push edx
push 1
push 6
push eax
mov byte [esp + 0x27], 1
call esi
mov edx, dword [esp + 0x50]
lea ecx, [esp + 0x13]
push 1
push ecx
push 1
push 6
push edx
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
lea esi, [edi + 4]
push 2
push esi
call ebx
push 2
push esi
mov dword [esp + 0x20], eax
call ebx
push 0x9c
mov dword [esp + 0x18], eax
call fcn.1017c342
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x10058fae
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x60]
push edx
mov edx, dword [esp + 0x5c]
push eax
mov eax, dword [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x60]
push edx
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x64]
push 1
push edx
push eax
push ecx
push esi
mov ecx, edi
mov dword [esi + 0x74], ebp
mov dword [esi + 0x78], ebp
mov dword [esi + 0x7c], 0x1e
mov dword [esi + 0x68], ebp
mov dword [esi + 0x6c], ebp
mov dword [esi + 0x70], ebp
call fcn.10058b10
push 0x9c
call fcn.1017c342
mov ebx, eax
add esp, 4
cmp ebx, ebp
je 0x10058ea8
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
push 0xffff
push 0xffffffffffffffff
push eax
mov eax, dword [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x60]
push eax
mov eax, dword [esp + 0x68]
push ebp
push ecx
push edx
push eax
push ebx
mov ecx, edi
mov dword [ebx + 0x74], ebp
mov dword [ebx + 0x78], ebp
mov dword [ebx + 0x7c], 0x1e
mov dword [ebx + 0x68], ebp
mov dword [ebx + 0x6c], ebp
mov dword [ebx + 0x70], ebp
call fcn.10058b10
mov ecx, dword [esp + 0x18]
mov edx, dword [edi + 8]
mov eax, dword [esp + 0x4c]
push ebp
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
je 0x100591d6
mov ecx, dword [esp + 0x14]
mov edx, dword [edi + 8]
mov eax, dword [esp + 0x50]
push ebp
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
je 0x100591d6
lea eax, [esi + 0x40]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea ecx, [esi + 0x20]
push ebp
lea edx, [esp + 0x24]
push ecx
lea eax, [esp + 0x2c]
push edx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], ebp
mov edx, dword [esi]
push eax
lea ecx, [esi + 0x38]
push 1
push ecx
push edx
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
je 0x10058fc5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x10058fc5
lea eax, [esi + 0x40]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, dword [esi + 0x68]
cmp eax, ebp
mov dword [esp + 0x60], eax
je 0x10058e41
mov eax, dword [esp + 0x60]
mov dword [esp + 0x58], ebp
lea edi, [eax + 8]
push ebp
mov ecx, edi
call fcn.100181f0
mov eax, dword [esp + 0x58]
add edi, 4
mov ecx, eax
dec eax
test ecx, ecx
mov dword [esp + 0x58], eax
jne 0x10058e19
mov edx, dword [esp + 0x60]
mov eax, dword [edx]
cmp eax, ebp
mov dword [esp + 0x60], eax
jne 0x10058e0e
mov eax, dword [esi + 0x68]
cmp eax, ebp
je 0x10058e59
mov edi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp edi, ebp
mov eax, edi
jne 0x10058e48
mov eax, dword [esi + 0x70]
mov dword [esi + 0x74], ebp
cmp eax, ebp
mov dword [esi + 0x68], ebp
mov dword [esi + 0x6c], ebp
je 0x10058e7a
mov edi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp edi, ebp
mov eax, edi
jne 0x10058e69
push esi
mov dword [esi + 0x78], ebp
mov dword [esi + 0x70], ebp
call fcn.1017c36b
add esp, 4
lea eax, [ebx + 0x40]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov esi, dword [ebx + 0x68]
cmp esi, ebp
mov dword [esp + 0x60], esi
je 0x10058f66
jmp 0x10058f41
mov edi, dword [esi + 0x68]
cmp edi, ebp
mov dword [esp + 0x60], edi
je 0x10058ede
jmp 0x10058eb9
mov edi, dword [esp + 0x60]
add edi, 8
xor ebx, ebx
push ebp
mov ecx, edi
call fcn.100181f0
add edi, 4
mov edx, ebx
dec ebx
test edx, edx
jne 0x10058ebe
mov eax, dword [esp + 0x60]
mov eax, dword [eax]
cmp eax, ebp
mov dword [esp + 0x60], eax
jne 0x10058eb5
mov eax, dword [esi + 0x68]
cmp eax, ebp
je 0x10058ef6
mov edi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp edi, ebp
mov eax, edi
jne 0x10058ee5
mov eax, dword [esi + 0x70]
mov dword [esi + 0x74], ebp
cmp eax, ebp
mov dword [esi + 0x68], ebp
mov dword [esi + 0x6c], ebp
je 0x10058f17
mov edi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp edi, ebp
mov eax, edi
jne 0x10058f06
push esi
mov dword [esi + 0x78], ebp
mov dword [esi + 0x70], ebp
call fcn.1017c36b
mov ecx, dword [esp + 0x50]
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
add esp, 4
push ecx
call esi
mov edx, dword [esp + 0x50]
push edx
jmp 0x100592ee
mov esi, dword [esp + 0x60]
add esi, 8
xor edi, edi
push ebp
mov ecx, esi
call fcn.100181f0
add esi, 4
mov ecx, edi
dec edi
test ecx, ecx
jne 0x10058f46
mov edx, dword [esp + 0x60]
mov eax, dword [edx]
cmp eax, ebp
mov dword [esp + 0x60], eax
jne 0x10058f3d
mov eax, dword [ebx + 0x68]
cmp eax, ebp
je 0x10058f7e
mov esi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp esi, ebp
mov eax, esi
jne 0x10058f6d
mov eax, dword [ebx + 0x70]
mov dword [ebx + 0x74], ebp
cmp eax, ebp
mov dword [ebx + 0x68], ebp
mov dword [ebx + 0x6c], ebp
je 0x10058f9f
mov esi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp esi, ebp
mov eax, esi
jne 0x10058f8e
push ebx
mov dword [ebx + 0x78], ebp
mov dword [ebx + 0x70], ebp
call fcn.1017c36b
add esp, 4
mov eax, dword [esp + 0x4c]
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
push eax
call esi
mov ecx, dword [esp + 0x50]
push ecx
jmp 0x100592ee
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x60]
add edi, 0x84
push edx
push eax
mov ecx, edi
mov dword [esp + 0x60], edi
call fcn.1005b4b0
cmp eax, ebp
jne 0x1005901e
cmp dword [edi], ebp
jne 0x10058ff5
mov ecx, dword [edi + 4]
push 1
push ecx
mov ecx, edi
call fcn.1005afa0
mov ecx, edi
call fcn.1005b700
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov edx, dword [edi]
mov ecx, dword [esp + 0x60]
mov edx, dword [edx + ecx*4]
mov dword [eax], edx
mov ecx, dword [edi]
mov edx, dword [esp + 0x60]
mov dword [ecx + edx*4], eax
mov dword [eax + 0xc], esi
lea eax, [ebx + 0x40]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea eax, [ebx + 0x20]
push ebp
lea ecx, [esp + 0x2c]
push eax
lea edx, [esp + 0x34]
push ecx
mov dword [esp + 0x38], ebp
mov dword [esp + 0x34], ebp
mov ecx, dword [ebx]
push edx
lea eax, [ebx + 0x38]
push 1
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
je 0x10059119
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x10059119
cmp dword [0x10201328], ebp
je 0x10059097
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esi]
push eax
push edx
push str.CSocketSystem::AddSocket__:_WSARecv_failed2__SOKCET__d___errno__d__
push str.SocketSystem
push 1
push 0x10200a94
call fcn.1008b760
add esp, 0x18
lea eax, [ebx + 0x40]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov esi, dword [ebx + 0x68]
cmp esi, ebp
mov dword [esp + 0x58], esi
je 0x100590d7
jmp 0x100590b3
mov esi, dword [esp + 0x58]
add esi, 8
xor edi, edi
mov ecx, esi
call fcn.1008a030
add esi, 4
mov eax, edi
dec edi
test eax, eax
jne 0x100590b8
mov ecx, dword [esp + 0x58]
mov eax, dword [ecx]
cmp eax, ebp
mov dword [esp + 0x58], eax
jne 0x100590af
mov eax, dword [ebx + 0x68]
cmp eax, ebp
je 0x100590ef
mov esi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp esi, ebp
mov eax, esi
jne 0x100590de
mov eax, dword [ebx + 0x70]
mov dword [ebx + 0x74], ebp
cmp eax, ebp
mov dword [ebx + 0x68], ebp
mov dword [ebx + 0x6c], ebp
je 0x100592cd
mov esi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp esi, ebp
mov eax, esi
jne 0x10059103
jmp 0x100592cd
mov ecx, dword [esp + 0x14]
mov esi, dword [edi + 4]
mov eax, ecx
xor edx, edx
shr eax, 4
div esi
mov dword [esp + 0x4c], esi
mov esi, edx
mov edx, dword [edi]
cmp edx, ebp
mov dword [esp + 0x50], esi
je 0x10059155
mov eax, dword [edx + esi*4]
cmp eax, ebp
je 0x10059151
cmp dword [eax + 8], ecx
je 0x1005914d
mov eax, dword [eax]
cmp eax, ebp
jne 0x10059140
jmp 0x10059151
cmp eax, ebp
jne 0x100591af
cmp edx, ebp
jne 0x1005918e
mov ecx, dword [esp + 0x4c]
lea esi, [ecx*4]
push esi
call fcn.1017c342
mov edx, dword [esp + 0x5c]
mov ecx, esi
mov edi, eax
xor eax, eax
shr ecx, 2
mov dword [edx], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, esi
mov esi, dword [esp + 0x50]
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x4c]
mov edi, edx
mov dword [edx + 4], eax
mov ecx, edi
call fcn.1005b700
mov ecx, dword [esp + 0x14]
mov dword [eax + 4], esi
mov dword [eax + 8], ecx
mov edx, dword [edi]
mov ecx, dword [edx + esi*4]
mov dword [eax], ecx
mov edx, dword [edi]
mov ecx, dword [esp + 0x14]
mov dword [edx + esi*4], eax
mov dword [eax + 0xc], ebx
mov eax, dword [esp + 0x6c]
cmp eax, ebp
je 0x100591bc
mov dword [eax], ecx
lea ecx, [esp + 0x30]
mov dword [esp + 0x44], 0xffffffff
call fcn.10084070
mov eax, dword [esp + 0x18]
jmp 0x10059303
mov edi, dword [esi + 0x68]
cmp edi, ebp
mov dword [esp + 0x60], edi
je 0x10059216
jmp 0x100591e7
mov edi, dword [esp + 0x60]
add edi, 8
mov dword [esp + 0x58], ebp
push ebp
mov ecx, edi
call fcn.100181f0
mov eax, dword [esp + 0x58]
add edi, 4
mov ecx, eax
dec eax
test ecx, ecx
mov dword [esp + 0x58], eax
jne 0x100591ee
mov edx, dword [esp + 0x60]
mov eax, dword [edx]
cmp eax, ebp
mov dword [esp + 0x60], eax
jne 0x100591e3
mov eax, dword [esi + 0x68]
cmp eax, ebp
je 0x1005922e
mov edi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp edi, ebp
mov eax, edi
jne 0x1005921d
mov eax, dword [esi + 0x70]
mov dword [esi + 0x74], ebp
cmp eax, ebp
mov dword [esi + 0x68], ebp
mov dword [esi + 0x6c], ebp
je 0x1005924f
mov edi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp edi, ebp
mov eax, edi
jne 0x1005923e
push esi
mov dword [esi + 0x78], ebp
mov dword [esi + 0x70], ebp
call fcn.1017c36b
mov esi, dword [ebx + 0x68]
add esp, 4
cmp esi, ebp
mov dword [esp + 0x60], esi
je 0x10059294
jmp 0x1005926f
mov esi, dword [esp + 0x60]
add esi, 8
xor edi, edi
push ebp
mov ecx, esi
call fcn.100181f0
add esi, 4
mov eax, edi
dec edi
test eax, eax
jne 0x10059274
mov ecx, dword [esp + 0x60]
mov eax, dword [ecx]
cmp eax, ebp
mov dword [esp + 0x60], eax
jne 0x1005926b
mov eax, dword [ebx + 0x68]
cmp eax, ebp
je 0x100592ac
mov esi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp esi, ebp
mov eax, esi
jne 0x1005929b
mov eax, dword [ebx + 0x70]
mov dword [ebx + 0x74], ebp
cmp eax, ebp
mov dword [ebx + 0x68], ebp
mov dword [ebx + 0x6c], ebp
je 0x100592cd
mov esi, dword [eax]
push eax
call fcn.1017c36b
add esp, 4
cmp esi, ebp
mov eax, esi
jne 0x100592bc
mov dword [ebx + 0x78], ebp
push ebx
mov dword [ebx + 0x70], ebp
call fcn.1017c36b
mov edx, dword [esp + 0x50]
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
add esp, 4
push edx
call esi
mov eax, dword [esp + 0x50]
push eax
call esi
lea ecx, [esp + 0x30]
mov dword [esp + 0x44], 0xffffffff
call fcn.10084070
xor eax, eax
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret 0x24