Function at 0x46f070
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x2c
mov eax, dword [0x50d174]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push ebp
mov ebp, dword [esp + 0x3c]
push esi
mov esi, dword [esp + 0x3c]
push edi
mov edi, dword [esp + 0x48]
mov dword [esp + 0x1c], ebp
mov eax, dword [esi + 0x90]
or eax, dword [esi + 0x94]
mov byte [esp + 0x13], 0
jne 0x46f0be
mov eax, dword [esi + 0x98]
or eax, dword [esi + 0x9c]
jne 0x46f0be
push 7
push esi
call fcn.00474970
add esp, 8
or dword [edi], 2
cmp dword [esi + 0x144], 0
jne 0x46f460
mov eax, dword [esi + 0xce0]
test eax, eax
jne 0x46f0f5
push dword [esi + 0x904]
call dword [0x51b3d8]
add esp, 4
mov dword [esi + 0xce0], eax
test eax, eax
je 0x46f393
cmp byte [esi + 0x138], 0
mov dword [esi + 0x148], eax
jne 0x46f55d
cmp dword [esi + 0x110], 2
mov ecx, dword [esi + 0x150]
jne 0x46f171
cmp dword [ecx + 0x1b0], 2
jne 0x46f171
and dword [esi + 0x134], 0xfffffffd
lea eax, [esp + 0x28]
push eax
mov dword [esi + 0x110], 1
call fcn.0046f630
push 0
movups xmm0, xmmword [eax]
movups xmmword [esi + 0x100], xmm0
and dword [edi], 0xfffffffd
mov eax, dword [esi + 0xac0]
cdq
push edx
push eax
push esi
call fcn.00459650
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0042a04a
add esp, 0x2c
ret
mov eax, dword [ebp + 0x2c8]
test dword [eax + 0x40], 0x40003
je 0x46f18c
cmp dword [ecx + 0x1b0], 1
sete byte [esp + 0x13]
mov edi, dword [ebp]
mov ebx, dword [esi + 0x904]
mov dword [esp + 0x24], ebx
cmp byte [edi + 0x14d], 0
je 0x46f1b0
sub ebx, 0xc
add dword [edi + 0x148], 0xa
mov dword [esp + 0x24], ebx
push 1
push edi
call fcn.00459ed0
push dword [edi + 0x102c]
mov eax, dword [edi + 0x1028]
push ebx
push 1
push dword [edi + 0x148]
call eax
mov ebx, eax
push 0
push edi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebx
call fcn.00459ed0
add esp, 0x20
cmp ebx, 0x10000000
jne 0x46f215
mov eax, str.operation_aborted_by_callback
mov esi, 0x2a
push eax
push edi
call fcn.00468be0
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0042a04a
add esp, 0x2c
ret
cmp ebx, 0x10000001
jne 0x46f24e
mov eax, dword [ebp + 0x2c8]
test byte [eax + 0x44], 0x10
je 0x46f230
mov eax, str.Read_callback_asked_for_PAUSE_when_not_supported_
jmp 0x46f259
or dword [edi + 0x134], 0x20
cmp byte [edi + 0x14d], 0
je 0x46f247
add dword [edi + 0x148], 0xfffffff6
xor ebx, ebx
jmp 0x46f330
cmp ebx, dword [esp + 0x24]
jbe 0x46f27d
mov eax, str.read_function_returned_funny_value
push eax
push edi
mov esi, 0x1a
call fcn.00468be0
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0042a04a
add esp, 0x2c
ret
cmp byte [edi + 0x14f], 0
jne 0x46f334
cmp byte [edi + 0x14d], 0
je 0x46f334
cmp byte [edi + 0x802], 0
mov eax, 0x5008c8
mov ebp, 0x4e9638
cmovne ebp, eax
lea eax, [esp + 0x28]
push ebp
push ebx
push str._x_s
push 0xb
push eax
call fcn.00475f60
sub dword [edi + 0x148], eax
add ebx, eax
push eax
lea eax, [esp + 0x40]
push eax
push dword [edi + 0x148]
call fcn.0049c830
mov ecx, ebp
add esp, 0x20
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46f2e0
mov eax, dword [edi + 0x148]
sub ecx, edx
push ecx
add eax, ebx
push ebp
push eax
call fcn.0049c830
add esp, 0xc
cmp dword [esp + 0x14], 0
jne 0x46f318
push str.Signaling_end_of_chunked_upload_via_terminating_chunk._n
push edi
mov byte [edi + 0x138], 1
call fcn.00468cc0
add esp, 8
lea ecx, [ebp + 1]
nop dword [eax + eax]
mov al, byte [ebp]
inc ebp
test al, al
jne 0x46f320
sub ebp, ecx
add ebx, ebp
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x18], ebx
test ebx, ebx
je 0x46f55d
jle 0x46f56a
cmp byte [esp + 0x13], 0
mov dword [esi + 0x144], ebx
jne 0x46f43f
cmp byte [esi + 0x802], 0
je 0x46f43f
cmp dword [esi + 0xd2c], 0
jne 0x46f3ab
mov eax, dword [esi + 0x904]
add eax, eax
push eax
call dword [0x51b3d8]
add esp, 4
mov dword [esi + 0xd2c], eax
test eax, eax
jne 0x46f3ab
push str.Failed_to_alloc_scratch_buffer_
push esi
call fcn.00468be0
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0042a04a
add esp, 0x2c
ret
xor ecx, ecx
xor edx, edx
test ebx, ebx
jle 0x46f423
mov eax, dword [esi + 0x148]
mov al, byte [edx + eax]
mov byte [esp + 0x13], al
mov eax, dword [esi + 0xd2c]
add eax, ecx
cmp byte [esp + 0x13], 0xa
mov dword [esp + 0x14], eax
jne 0x46f413
mov byte [eax], 0xd
inc ecx
mov eax, dword [esi + 0xd2c]
mov byte [ecx + eax], 0xa
cmp byte [esi + 0x802], 0
jne 0x46f41d
mov edi, dword [esi + 0x1018]
mov eax, edi
mov ebp, dword [esi + 0x101c]
and eax, ebp
cmp eax, 0xffffffff
je 0x46f41d
add edi, 1
mov dword [esi + 0x1018], edi
adc ebp, 0
mov dword [esi + 0x101c], ebp
jmp 0x46f41d
mov bl, byte [esp + 0x13]
mov byte [eax], bl
mov ebx, dword [esp + 0x18]
inc edx
inc ecx
cmp edx, ebx
jl 0x46f3b3
mov ebp, dword [esp + 0x1c]
cmp ecx, ebx
je 0x46f43f
mov eax, dword [esi + 0xd2c]
mov ebx, ecx
mov dword [esi + 0x148], eax
mov dword [esi + 0x144], ecx
mov eax, dword [ebp + 0x2c8]
test dword [eax + 0x40], 0x30000
je 0x46f460
push ebx
push ebp
call fcn.00485280
add esp, 8
test eax, eax
jne 0x46f616
lea eax, [esp + 0x20]
push eax
push dword [esi + 0x144]
push dword [esi + 0x148]
push dword [ebp + 0x2f0]
push ebp
call fcn.00469290
add esp, 0x14
test eax, eax
jne 0x46f616
mov edi, dword [ebp + 0x2f0]
push eax
push eax
lea eax, [esp + 0x2c]
push eax
push 4
lea eax, [esp + 0x24]
push eax
push 0
push 0
push 0x4004747b
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x46f4c8
push 4
lea eax, [esp + 0x18]
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [esi + 0x948], 0
je 0x46f4e6
push dword [esp + 0x20]
push dword [esi + 0x148]
push 4
push esi
call fcn.00468b50
add esp, 0x10
mov ecx, dword [esp + 0x20]
mov eax, ecx
cdq
add eax, dword [esi + 0x98]
mov dword [esi + 0x98], eax
adc edx, dword [esi + 0x9c]
cmp byte [esi + 0x14d], 0
mov dword [esi + 0x9c], edx
je 0x46f517
cmp byte [esi + 0x14f], 0
je 0x46f540
cmp eax, dword [esi + 0x1018]
jne 0x46f540
cmp edx, dword [esi + 0x101c]
jne 0x46f540
push str.We_are_completely_uploaded_and_fine_n
push esi
mov byte [esi + 0x138], 1
call fcn.00468cc0
mov ecx, dword [esp + 0x28]
add esp, 8
mov eax, dword [esi + 0x144]
cmp eax, ecx
je 0x46f5a2
sub eax, ecx
add dword [esi + 0x148], ecx
mov dword [esi + 0x144], eax
jmp 0x46f5ff
test byte [esi + 0x134], 0x20
jne 0x46f614
and dword [esi + 0x134], 0xfffffffd
cmp byte [ebp + 0x293], 0
je 0x46f614
push ebp
call fcn.0046e050
add esp, 4
test eax, eax
je 0x46f614
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0042a04a
add esp, 0x2c
ret
mov eax, dword [esi + 0xce0]
test eax, eax
jne 0x46f5c9
push dword [esi + 0x904]
call dword [0x51b3d8]
add esp, 4
mov dword [esi + 0xce0], eax
test eax, eax
je 0x46f393
cmp byte [esi + 0x138], 0
mov dword [esi + 0x148], eax
mov dword [esi + 0x144], 0
je 0x46f5ff
and dword [esi + 0x134], 0xfffffffd
cmp byte [ebp + 0x293], 0
je 0x46f5ff
push ebp
call fcn.0046e050
add esp, 4
test eax, eax
jne 0x46f616
push dword [esi + 0x9c]
push dword [esi + 0x98]
push esi
call fcn.00474770
add esp, 0xc
xor eax, eax
mov ecx, dword [esp + 0x38]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0042a04a
add esp, 0x2c
ret