Function at 0x1002eaa0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
push ebx
mov ebx, dword [ebp + 8]
cmp byte [ebx + 0x294], 0
push esi
push edi
mov dword [ebp - 0xc], 0x10
mov dword [ebp - 0x10], 1
mov dword [ebp - 4], 0
jne 0x1002eaf0
mov eax, dword [ebx + 0x290]
cmp eax, 0xffffffff
je 0x1002eaf0
push 0
push eax
push ebx
call fcn.1002acc0
mov byte [ebx + 0x294], 0xff
jmp 0x1002eaf0
mov eax, dword [ebp + 0xc]
lea edi, [ebp - 0x140]
lea esi, [ebx + 0x188]
mov ecx, 0x104
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x34]
push ecx
push 0
mov dword [ebp - 0x30], eax
mov eax, dword [ebx + 0x184]
push 0
lea edx, [ebp - 0x140]
push edx
inc eax
push eax
mov dword [ebp - 0x34], 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 8], eax
test eax, eax
je 0x1002efb9
js 0x1002f017
add dword [ebp - 4], eax
mov eax, dword [ebx + 0x15c]
cmp eax, 0xffffffff
je 0x1002ec8c
lea ecx, [ebp - 0x140]
push ecx
push eax
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1002ec8c
mov eax, dword [ebx + 0x15c]
mov esi, dword [sym.imp.WS2_32.dll_recv]
push 0
push 5
lea edx, [ebp - 0x1c]
push edx
push eax
call esi
test eax, eax
je 0x1002f0a2
cmp eax, 0xffffffff
je 0x1002f0a2
mov edx, dword [ebx + 0x15c]
push 0
push 4
lea ecx, [ebp - 0x17]
push ecx
push edx
call esi
test eax, eax
je 0x1002f0a2
cmp eax, 0xffffffff
je 0x1002f0a2
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1002f029
push 4
lea eax, [ebp - 0x10]
push eax
push 1
push 6
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x1002f042
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp + 8]
mov ecx, eax
add esi, 0x164
lea edi, [ebp - 0x2c]
rep movsb byte es:[edi], byte [esi]
push eax
lea ecx, [ebp - 0x2c]
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1002f062
push 0
push 9
lea edx, [ebp - 0x1c]
push edx
push ebx
mov byte [ebp - 0x18], 3
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 9
jne 0x1002f082
mov esi, dword [ebp + 8]
push 0
push ebx
push esi
call fcn.1002acc0
mov ecx, dword [ebp - 0x140]
xor eax, eax
test ecx, ecx
je 0x1002ec83
mov esi, dword [esi + 0x15c]
cmp dword [ebp + eax*4 - 0x13c], esi
je 0x1002ec52
inc eax
cmp eax, ecx
jb 0x1002ec42
jmp 0x1002ec83
lea edx, [ecx - 1]
cmp eax, edx
jae 0x1002ec7c
lea esp, [esp]
mov ecx, dword [ebp + eax*4 - 0x138]
mov dword [ebp + eax*4 - 0x13c], ecx
mov ecx, dword [ebp - 0x140]
inc eax
lea edx, [ecx - 1]
cmp eax, edx
jb 0x1002ec60
dec ecx
mov dword [ebp - 0x140], ecx
dec dword [ebp - 8]
je 0x1002efad
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x17c]
cmp eax, 0xffffffff
je 0x1002ed4c
lea ecx, [ebp - 0x140]
push ecx
push eax
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1002ed4c
mov ecx, dword [ebx + 0x17c]
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x2c]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
test esi, esi
js 0x1002f01d
push 4
lea edx, [ebp - 0x10]
push edx
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x1002f0b5
push 0
push esi
push ebx
call fcn.1002acc0
mov ecx, dword [ebp - 0x140]
xor eax, eax
test ecx, ecx
je 0x1002ed43
mov edx, dword [ebx + 0x17c]
cmp dword [ebp + eax*4 - 0x13c], edx
je 0x1002ed17
inc eax
cmp eax, ecx
jb 0x1002ed07
jmp 0x1002ed43
lea edx, [ecx - 1]
cmp eax, edx
jae 0x1002ed3c
mov edi, edi
mov ecx, dword [ebp + eax*4 - 0x138]
mov dword [ebp + eax*4 - 0x13c], ecx
mov ecx, dword [ebp - 0x140]
inc eax
lea edx, [ecx - 1]
cmp eax, edx
jb 0x1002ed20
dec ecx
mov dword [ebp - 0x140], ecx
dec dword [ebp - 8]
je 0x1002efad
mov eax, dword [ebx + 0x29c]
cmp eax, 0xffffffff
je 0x1002eebd
lea ecx, [ebp - 0x140]
push ecx
push eax
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1002eebd
cmp dword [ebx + 0x2a0], 0
jne 0x1002ed8f
mov edx, dword [ebx + 0x29c]
push 0xffffffffffffffff
push edx
push ebx
call fcn.1002acc0
mov dword [ebx + 0x2a0], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebx + 0x29c]
lea ecx, [ebp - 0x2c]
push ecx
push 2
push 1
lea edx, [ebp - 0x1c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jns 0x1002edbc
mov byte [ebx + 0x2a4], 0
jmp 0x1002ee5b
cmp byte [ebx + 0x2a4], 0
mov edx, dword [ebp - 0xc]
je 0x1002ee10
mov eax, edx
lea esi, [ebx + 0x2a8]
lea edi, [ebp - 0x2c]
cmp edx, 4
jb 0x1002edec
mov ecx, dword [edi]
cmp ecx, dword [esi]
jne 0x1002ee10
sub eax, 4
add esi, 4
add edi, 4
cmp eax, 4
jae 0x1002edd8
test eax, eax
je 0x1002ee54
mov cl, byte [esi]
cmp cl, byte [edi]
jne 0x1002ee10
cmp eax, 1
jbe 0x1002ee54
mov cl, byte [esi + 1]
cmp cl, byte [edi + 1]
jne 0x1002ee10
cmp eax, 2
jbe 0x1002ee54
mov al, byte [esi + 2]
cmp al, byte [edi + 2]
je 0x1002ee54
mov ecx, edx
lea esi, [ebp - 0x2c]
lea edi, [ebx + 0x2a8]
rep movsb byte es:[edi], byte [esi]
push edx
mov edx, dword [ebx + 0x29c]
lea ecx, [ebp - 0x2c]
push ecx
push edx
mov byte [ebx + 0x2a4], 0xff
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
js 0x1002f0c8
mov eax, dword [ebx + 0x29c]
push 0
push 1
push 0x1004c05c
push eax
call dword [sym.imp.WS2_32.dll_send]
mov esi, ebx
call fcn.1002e5d0
mov ecx, dword [ebp - 0x140]
xor eax, eax
test ecx, ecx
je 0x1002eeb3
mov edx, dword [ebx + 0x29c]
lea ecx, [ecx]
cmp dword [ebp + eax*4 - 0x13c], edx
je 0x1002ee80
inc eax
cmp eax, ecx
jb 0x1002ee70
jmp 0x1002eeb3
lea edx, [ecx - 1]
cmp eax, edx
jae 0x1002eeac
jmp 0x1002ee90
mov ecx, dword [ebp + eax*4 - 0x138]
mov dword [ebp + eax*4 - 0x13c], ecx
mov ecx, dword [ebp - 0x140]
inc eax
lea edx, [ecx - 1]
cmp eax, edx
jb 0x1002ee90
dec ecx
mov dword [ebp - 0x140], ecx
mov eax, dword [ebp - 8]
dec eax
je 0x1002efad
push 0xc
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
add esp, 4
mov dword [edi], 0
mov dword [edi + 4], ebx
mov byte [edi + 8], 0
mov eax, dword [edi]
test eax, eax
jne 0x1002eeea
mov ecx, dword [edi + 4]
mov edx, dword [ecx + 0x2d4]
mov dword [edi], edx
jmp 0x1002eef2
mov eax, dword [eax + 0x765c]
mov dword [edi], eax
mov esi, dword [edi]
test esi, esi
je 0x1002ef96
cmp byte [esi + 0x29], 0
jne 0x1002eed7
mov ecx, dword [esi + 0x14]
lea eax, [ebx + 0x188]
push eax
push ecx
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1002ef8a
mov eax, dword [esi + 0x14]
lea edx, [ebp - 0x140]
push edx
push eax
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1002ef8a
mov eax, dword [esi + 0x24]
cmp eax, 3
ja case.default.0x1002ef34
jmp dword [eax*4 + 0x1002f0dc]
mov eax, esi
call fcn.1002b2f0
mov eax, esi
call fcn.1002c140
jmp 0x1002eed7
mov eax, esi
call fcn.100364d0
mov eax, esi
call fcn.1002c140
jmp 0x1002eed7
mov eax, esi
call fcn.10036610
mov eax, esi
call fcn.1002c140
jmp 0x1002eed7
push esi
call fcn.1002b470
mov eax, esi
call fcn.1002c140
jmp 0x1002eed7
mov eax, esi
call fcn.1002cb20
mov eax, esi
call fcn.1002c140
jmp 0x1002eed7
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
cmp byte [ebx + 0x33c], 0
jne 0x1002eaf0
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0xc
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 4
mov dword [esi], 0
mov dword [esi + 4], ebx
mov byte [esi + 8], 0
mov eax, dword [esi]
test eax, eax
jne 0x1002efe6
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x2d4]
mov dword [esi], edx
jmp 0x1002efee
mov eax, dword [eax + 0x765c]
mov dword [esi], eax
mov eax, dword [esi]
test eax, eax
je 0x1002f001
cmp byte [eax + 0x29], 0
jne 0x1002efd3
call fcn.1002c140
jmp 0x1002efd3
push esi
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [ebp - 4]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x28c], 2
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp + 8]
push ebx
mov dword [edx + 0x28c], 2
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 8]
push ebx
mov dword [eax + 0x28c], 2
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 8]
push ebx
mov dword [ecx + 0x28c], 2
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, ebx
call fcn.1002e8c0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
pop esi
mov byte [ebx + 0x2a4], 0
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 8