Function at 0x1002bd90
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
mov esi, dword [sym.imp.MSVCRT.dll_malloc]
push edi
push 0xb670
mov dword [ebp - 8], 0x10
call esi
mov ecx, dword [ebp + 0xc]
mov ebx, eax
mov eax, dword [ebp + 8]
mov edx, 1
mov dword [ebx], eax
mov dword [ebx + 0x14], ecx
mov byte [ebx + 0x38], 0
mov dword [ebx + 4], eax
add dword [eax + 4], edx
add esp, 4
cmp byte [ebp + 0x10], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0x10029350
jne 0x1002c094
lea eax, [ebp - 8]
mov dword [ebp - 0xc], edx
push eax
lea edx, [ebp - 0x2c]
push edx
push ecx
call dword [sym.imp.WS2_32.dll_getpeername]
push 0x10
call esi
mov esi, dword [sym.imp.WS2_32.dll_inet_ntoa]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x28]
add esp, 4
push eax
call esi
lea edi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002be10
mov ecx, dword [ebp - 0x28]
sub eax, edi
push ecx
mov dword [ebp + 0x10], eax
call esi
mov edi, dword [ebx + 0x18]
mov ecx, dword [ebp + 0x10]
mov esi, eax
push 0xc
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, dword [ebp + 8]
add esp, 4
xor edi, edi
mov dword [eax], edi
mov dword [eax + 4], esi
mov byte [eax + 8], 0
mov ecx, dword [eax]
cmp ecx, edi
jne 0x1002be55
mov edx, dword [esi + 0x2d4]
mov dword [eax], edx
jmp 0x1002be5d
mov ecx, dword [ecx + 0x765c]
mov dword [eax], ecx
cmp dword [eax], edi
jne 0x1002be45
push eax
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [ebp + 0xc]
add esp, 4
push 4
lea edx, [ebp - 0xc]
push edx
push 1
push 6
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1002be98
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
cmp dword [esi + 0x188], edi
jbe 0x1002bebd
lea ecx, [esi + 0x18c]
mov edx, dword [ebp + 0xc]
cmp dword [ecx], edx
je 0x1002bec0
inc eax
add ecx, 4
cmp eax, dword [esi + 0x188]
jb 0x1002bea8
jmp 0x1002bec0
mov edx, dword [ebp + 0xc]
mov ecx, dword [esi + 0x188]
cmp eax, ecx
jne 0x1002bedc
cmp ecx, 0x40
jae 0x1002bedc
mov dword [esi + eax*4 + 0x18c], edx
inc dword [esi + 0x188]
mov eax, dword [esi + 0x184]
cmp edx, eax
jle 0x1002bee8
mov eax, edx
mov dword [esi + 0x184], eax
mov eax, 0x30
push 0x28
mov dword [ebx + 0x24], edi
mov byte [ebx + 0x28], 0
mov word [ebx + 0x2a], di
mov dword [ebx + 0x2c], 0xffffffff
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x34], eax
mov dword [ebx + 0x7660], edi
call dword [sym.imp.MSVCRT.dll_malloc]
lea ecx, [eax + 0x14]
mov dword [eax], ecx
mov dword [eax + 4], edi
mov dword [eax + 0x18], eax
mov dword [ecx], edi
add esp, 4
mov dword [ebx + 0x4c], eax
mov dword [ebx + 0x50], edi
mov dword [ebx + 0x54], edi
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 8]
push edx
push eax
push edi
push edi
call fcn.1002a560
push 0x28
mov dword [ebx + 0x58], eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov dword [eax + 4], edi
mov dword [eax + 0x18], eax
mov dword [eax + 0x14], edi
lea ecx, [eax + 0x14]
mov dword [eax], ecx
mov dword [ebx + 0x5c], eax
mov eax, dword [ebx]
mov ecx, dword [eax + 0x2c]
mov dword [ebx + 0x84], ecx
mov edx, dword [eax + 0x30]
mov dword [ebx + 0x88], edx
mov ecx, dword [eax + 0x34]
mov dword [ebx + 0x8c], ecx
mov edx, dword [eax + 0x38]
mov dword [ebx + 0x90], edx
mov dword [ebx + 0x7c], 0x10032e90
mov dword [ebx + 0x80], edi
mov eax, dword [esi + 0x2d4]
mov dword [ebx + 0x765c], eax
mov dword [ebx + 0x7658], edi
mov eax, dword [esi + 0x2d4]
add esp, 4
cmp eax, edi
je 0x1002bfb5
mov dword [eax + 0x7658], ebx
mov dword [esi + 0x2d4], ebx
mov byte [ebx + 0x7647], 0
mov dword [ebx + 0x7643], edi
mov word [ebx + 0x7640], di
mov byte [ebx + 0x7642], 0
or eax, 0xffffffff
mov dword [ebx + 0x7618], eax
mov dword [ebx + 0x7624], eax
mov dword [ebx + 0x763c], eax
mov ecx, dword [esi + 0x2dc]
mov dword [ebx + 0x764c], ecx
mov edx, dword [esi + 0x2e0]
mov dword [ebx + 0x70], eax
mov dword [ebx + 0x7650], edx
mov byte [ebx + 0x7654], 0
mov byte [ebx + 0x7610], 0
mov dword [ebx + 0x75e0], edi
mov dword [ebx + 0x75ec], edi
mov dword [ebx + 0x75f8], edi
mov dword [ebx + 0x75fc], edi
mov dword [ebx + 0x7600], edi
mov dword [ebx + 0x7614], 5
mov dword [ebx + 0xb668], edi
mov dword [ebx + 0xb66c], edi
mov eax, dword [str.RFB_003.006_n]
mov ecx, dword [0x1004b414]
mov edx, dword [0x1004b418]
mov dword [ebp - 0x1c], eax
mov al, byte [0x1004b41c]
mov dword [ebp - 0x18], ecx
push 0xc
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x10], al
push ecx
mov eax, ebx
mov dword [ebp - 0x14], edx
call fcn.10030640
test eax, eax
jns 0x1002c094
mov esi, ebx
call fcn.10030370
mov edi, ebx
call fcn.1002c150
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [0x1005e8a4]
test esi, esi
je 0x1002c0fa
mov edi, edi
mov eax, dword [esi]
mov dword [ebp + 0x10], 0
test eax, eax
je 0x1002c0f3
lea edx, [ebp + 0x10]
push edx
push ebx
call eax
test al, al
je 0x1002c0f3
mov eax, dword [ebx + 0xb66c]
mov edi, dword [ebp + 0x10]
test eax, eax
je 0x1002c0d0
cmp dword [eax], esi
je 0x1002c0f3
mov eax, dword [eax + 8]
test eax, eax
jne 0x1002c0c5
push 0xc
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
test eax, eax
je 0x1002c0f3
mov dword [eax], esi
mov dword [eax + 4], edi
mov ecx, dword [ebx + 0xb66c]
mov dword [eax + 8], ecx
mov dword [ebx + 0xb66c], eax
mov esi, dword [esi + 0x20]
test esi, esi
jne 0x1002c0a0
mov edx, dword [ebx]
mov eax, dword [edx + 0x320]
push ebx
call eax
sub eax, 0
je 0x1002c13a
dec eax
je 0x1002c12b
dec eax
jne 0x1002c13e
mov esi, ebx
call fcn.10030370
mov edi, ebx
call fcn.1002c150
xor ebx, ebx
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov byte [ebx + 0x29], 0xff
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov byte [ebx + 0x29], 0
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0xc