Function at 0x10046a4f
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x18
and dword [esp + 4], 0
push ebx
mov ebx, dword [esp + 0x20]
push ebp
push esi
lea esi, [ebx + 0x90]
push edi
mov eax, dword [esi + 0x10]
or eax, dword [esi + 0x14]
jne 0x10046a7f
mov eax, dword [esi + 0x18]
or eax, dword [esi + 0x1c]
jne 0x10046a7f
push 7
push ebx
call fcn.1004703b
pop ecx
pop ecx
mov eax, dword [esp + 0x34]
mov ebp, dword [esp + 0x30]
or dword [eax], 2
cmp dword [esi + 0xbc], 0
jne 0x10046c91
push ebx
call fcn.100457eb
pop ecx
test eax, eax
jne 0x10046dbe
test byte [esi + 0x500], 4
mov eax, dword [ebx + 0xc60]
mov dword [esi + 0xc0], eax
jne 0x10046b5f
cmp dword [esi + 0x90], 2
mov ecx, dword [esi + 0xc4]
jne 0x10046b1e
cmp dword [ecx + 0x1a0], 2
jne 0x10046b1e
and dword [esi + 0xb0], 0xfffffffd
lea eax, [esp + 0x18]
push eax
mov dword [esi + 0x90], 1
call fcn.100309e4
lea edi, [esi + 0x80]
mov esi, eax
mov eax, dword [esp + 0x38]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
and dword [eax], 0xfffffffd
mov eax, dword [ebx + 0xa5c]
cdq
push 0
push edx
push eax
push ebx
call fcn.10029c7f
add esp, 0x14
jmp 0x10046dbc
mov eax, dword [ebp + 0x2b8]
test dword [eax + 0x40], 0x40003
je 0x10046b3d
xor eax, eax
cmp dword [ecx + 0x1a0], 1
sete al
mov dword [esp + 0x14], eax
lea eax, [esp + 0x34]
push eax
push dword [ebx + 0x8e8]
push ebp
call fcn.10045267
add esp, 0xc
test eax, eax
jne 0x10046dbe
mov edi, dword [esp + 0x34]
jmp 0x10046b61
xor edi, edi
test edi, edi
jne 0x10046b74
test byte [esi + 0xb0], 0x20
jne 0x10046dbc
test edi, edi
jg 0x10046b8c
push esi
push ebp
call fcn.1004623e
pop ecx
pop ecx
test eax, eax
je 0x10046dbc
jmp 0x10046dbe
cmp dword [esp + 0x14], 0
mov dword [esi + 0xbc], edi
jne 0x10046c71
test byte [ebx + 0xa8c], 0x40
je 0x10046c71
cmp dword [ebx + 0xca8], 0
jne 0x10046be2
mov eax, dword [ebx + 0x8e8]
add eax, eax
push eax
call dword [0x1008d098]
pop ecx
mov dword [ebx + 0xca8], eax
test eax, eax
jne 0x10046be2
push str.Failed_to_alloc_scratch_buffer_
push ebx
call fcn.100293e3
pop ecx
pop ecx
push 0x1b
pop eax
jmp 0x10046dbe
xor edx, edx
xor ecx, ecx
test edi, edi
jle 0x10046c59
mov eax, dword [esi + 0xc0]
mov al, byte [edx + eax]
mov byte [esp + 0x34], al
cmp al, 0xa
mov eax, dword [ebx + 0xca8]
jne 0x10046c44
mov byte [ecx + eax], 0xd
mov eax, dword [ebx + 0xca8]
inc ecx
mov byte [ecx + eax], 0xa
test byte [ebx + 0xa8c], 0x40
jne 0x10046c4f
mov eax, dword [ebx + 0xf00]
mov ebp, dword [ebx + 0xf04]
and eax, ebp
cmp eax, 0xffffffff
je 0x10046c4f
add dword [ebx + 0xf00], 1
adc ebp, 0
mov eax, ebp
mov dword [esp + 0x34], ebp
mov dword [ebx + 0xf04], eax
jmp 0x10046c4f
mov bl, byte [esp + 0x34]
mov byte [ecx + eax], bl
mov ebx, dword [esp + 0x2c]
inc edx
inc ecx
cmp edx, edi
jl 0x10046bea
mov ebp, dword [esp + 0x30]
cmp ecx, edi
je 0x10046c71
mov eax, dword [ebx + 0xca8]
mov edi, ecx
mov dword [esi + 0xc0], eax
mov dword [esi + 0xbc], ecx
mov eax, dword [ebp + 0x2b8]
test dword [eax + 0x40], 0x30000
je 0x10046c91
push edi
push ebp
call fcn.10033e33
pop ecx
pop ecx
test eax, eax
jne 0x10046dbe
lea eax, [esp + 0x10]
push eax
push dword [esi + 0xbc]
push dword [esi + 0xc0]
push dword [ebp + 0x2e0]
push ebp
call fcn.10029915
add esp, 0x14
test eax, eax
jne 0x10046dbe
mov edi, dword [ebp + 0x2e0]
xor ecx, ecx
push ecx
push ecx
lea eax, [esp + 0x34]
push eax
push 4
lea eax, [esp + 0x44]
push eax
push ecx
push ecx
push 0x4004747b
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x10046cf9
push 4
lea eax, [esp + 0x38]
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test dword [ebx + 0xa8c], 0x4000000
je 0x10046d1a
push dword [esp + 0x10]
push dword [esi + 0xc0]
push 4
push ebx
call fcn.10029368
add esp, 0x10
mov eax, dword [esp + 0x10]
cdq
add dword [esi + 0x18], eax
adc dword [esi + 0x1c], edx
push dword [esi + 0x1c]
push dword [esi + 0x18]
push ebx
call fcn.10046f63
mov ecx, dword [esi + 0x500]
add esp, 0xc
test cl, 0x40
je 0x10046d47
test ecx, 0x100
je 0x10046d73
mov eax, dword [esi + 0x18]
cmp eax, dword [ebx + 0xf00]
jne 0x10046d73
mov eax, dword [esi + 0x1c]
cmp eax, dword [ebx + 0xf04]
jne 0x10046d73
or ecx, 4
push str.We_are_completely_uploaded_and_fine_n
push ebx
mov dword [esi + 0x500], ecx
call fcn.10029490
pop ecx
pop ecx
mov eax, dword [esi + 0xbc]
mov ecx, dword [esp + 0x10]
cmp eax, ecx
je 0x10046d91
sub eax, ecx
add dword [esi + 0xc0], ecx
mov dword [esi + 0xbc], eax
jmp 0x10046dbc
push ebx
call fcn.100457eb
pop ecx
test eax, eax
jne 0x10046dbe
mov eax, dword [ebx + 0xc60]
and dword [esi + 0xbc], 0
test byte [esi + 0x500], 4
mov dword [esi + 0xc0], eax
jne 0x10046b76
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret