Function at 0x4c3a50
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x18
push ebx
push ebp
push edi
mov edi, eax
mov eax, dword [esi + 0x98]
xor ebp, ebp
or eax, dword [esi + 0x9c]
jne 0x4c3a86
mov ecx, dword [esi + 0xa0]
or ecx, dword [esi + 0xa4]
jne 0x4c3a86
push 7
lea edx, [esp + 0x18]
push esi
push edx
call fcn.004a8160
add esp, 0xc
mov ebx, 2
or dword [edi], ebx
cmp dword [esi + 0x138], ebp
jne 0x4c3ce4
cmp dword [esi + 0xe60], ebp
jne 0x4c3abf
mov eax, dword [esi + 0x980]
push eax
call dword [0x54ae68]
add esp, 4
mov dword [esi + 0xe60], eax
test eax, eax
je 0x4c3c22
mov ecx, dword [esi + 0xe60]
mov dword [esi + 0x13c], ecx
cmp dword [esi + 0x594], ebp
jne 0x4c3bc3
mov eax, dword [esi + 0x140]
cmp dword [esi + 0x110], ebx
jne 0x4c3b4b
cmp dword [eax + 0x1a8], ebx
jne 0x4c3b4b
and dword [esi + 0x12c], 0xfffffffd
lea edx, [esp + 0x14]
push edx
mov dword [esi + 0x110], 1
call fcn.004a4570
mov ecx, dword [eax]
mov dword [esi + 0x100], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0x104], edx
mov ecx, dword [eax + 8]
mov dword [esi + 0x108], ecx
mov edx, dword [eax + 0xc]
mov dword [esi + 0x10c], edx
and dword [edi], 0xfffffffd
mov eax, dword [esi + 0xb54]
cdq
push 0
push edx
push eax
push esi
call fcn.00497110
add esp, 0x14
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
mov edi, dword [esp + 0x28]
mov ecx, dword [edi + 0x5f0]
test dword [ecx + 0x40], 0x40003
je 0x4c3b6c
xor edx, edx
cmp dword [eax + 0x1a8], 1
sete dl
mov ebp, edx
mov ecx, dword [esi + 0x980]
lea eax, [esp + 0x10]
push eax
push ecx
push edi
call fcn.004c2de0
add esp, 0xc
test eax, eax
jne 0x4c3ed6
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x4c3bc7
jg 0x4c3bd6
and dword [esi + 0x12c], 0xfffffffd
cmp dword [edi + 0x584], 0
je 0x4c3ed4
push edi
call fcn.004c3150
add esp, 4
test eax, eax
je 0x4c3ed4
pop edi
pop ebp
pop ebx
add esp, 0x18
ret
mov edi, dword [esp + 0x28]
test byte [esi + 0x12c], 0x20
jne 0x4c3ed4
jmp 0x4c3b97
mov dword [esi + 0x138], ebx
test ebp, ebp
jne 0x4c3cbc
cmp dword [esi + 0xb9c], ebp
je 0x4c3cbc
cmp dword [esi + 0xec0], ebp
jne 0x4c3c2e
mov edx, dword [esi + 0x980]
add edx, edx
push edx
call dword [0x54ae68]
add esp, 4
mov dword [esi + 0xec0], eax
test eax, eax
jne 0x4c3c2e
push str.Failed_to_alloc_scratch_buffer_
push esi
call fcn.00499840
add esp, 8
pop edi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x18
ret
xor edi, edi
xor eax, eax
test ebx, ebx
jle 0x4c3c9e
jmp 0x4c3c40
mov ecx, dword [esi + 0x13c]
mov cl, byte [edi + ecx]
mov edx, dword [esi + 0xec0]
cmp cl, 0xa
jne 0x4c3c95
mov byte [eax + edx], 0xd
mov ecx, dword [esi + 0xec0]
inc eax
mov byte [eax + ecx], 0xa
cmp dword [esi + 0xb9c], 0
jne 0x4c3c98
mov ecx, dword [esi + 0x11a0]
mov edx, dword [esi + 0x11a4]
mov ebp, ecx
and ebp, edx
cmp ebp, 0xffffffff
je 0x4c3c98
add ecx, 1
adc edx, 0
mov dword [esi + 0x11a0], ecx
mov dword [esi + 0x11a4], edx
jmp 0x4c3c98
mov byte [eax + edx], cl
inc edi
inc eax
cmp edi, ebx
jl 0x4c3c40
mov edi, dword [esp + 0x28]
cmp eax, ebx
je 0x4c3cbc
mov ecx, dword [esi + 0xec0]
mov dword [esp + 0x10], eax
mov dword [esi + 0x13c], ecx
mov dword [esi + 0x138], eax
mov edx, dword [edi + 0x5f0]
test dword [edx + 0x40], 0x30000
je 0x4c3ce8
mov eax, dword [esp + 0x10]
push eax
push edi
call fcn.004b4120
add esp, 8
test eax, eax
je 0x4c3ce8
pop edi
pop ebp
pop ebx
add esp, 0x18
ret
mov edi, dword [esp + 0x28]
mov edx, dword [esi + 0x138]
mov eax, dword [esi + 0x13c]
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [edi + 0x618]
push edx
push eax
push ecx
push edi
call fcn.00499530
add esp, 0x14
test eax, eax
jne 0x4c3ed6
mov edi, dword [edi + 0x618]
push eax
push eax
lea edx, [esp + 0x1c]
push edx
push 4
lea eax, [esp + 0x20]
push eax
push 0
push 0
push 0x4004747b
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x4c3d53
push 4
lea ecx, [esp + 0x14]
push ecx
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, dword [esi + 0xb8]
mov ecx, dword [esi + 0xbc]
mov edx, edi
or edx, ecx
je 0x4c3db8
mov eax, dword [esp + 0xc]
cdq
cmp ecx, edx
jg 0x4c3d7c
jl 0x4c3d74
cmp edi, eax
jae 0x4c3d7c
mov ebp, edi
mov dword [esp + 0x18], ecx
jmp 0x4c3d82
mov ebp, eax
mov dword [esp + 0x18], edx
mov eax, dword [esi + 0x13c]
push ebp
push eax
push 2
push esi
call fcn.004996d0
mov ecx, dword [esp + 0x28]
add esp, 0x10
sub dword [esi + 0xb8], ebp
sbb dword [esi + 0xbc], ecx
mov ecx, dword [esp + 0xc]
mov eax, ecx
cdq
mov edi, eax
mov ebx, edx
sub edi, ebp
sbb ebx, dword [esp + 0x18]
jmp 0x4c3dc3
mov ecx, dword [esp + 0xc]
mov eax, ecx
cdq
mov edi, eax
mov ebx, edx
mov edx, edi
or edx, ebx
je 0x4c3e02
sub ecx, edi
add ecx, dword [esi + 0x13c]
push edi
push ecx
push 4
push esi
call fcn.004996d0
add dword [esi + 0xa0], edi
mov ecx, dword [esi + 0xa0]
adc dword [esi + 0xa4], ebx
mov eax, dword [esi + 0xa4]
push eax
push ecx
push esi
call fcn.004a8630
mov ecx, dword [esp + 0x28]
add esp, 0x1c
cmp dword [esi + 0x5a4], 0
je 0x4c3e14
cmp dword [esi + 0x5ac], 0
je 0x4c3e4c
mov edx, dword [esi + 0xa0]
cmp edx, dword [esi + 0x11a0]
jne 0x4c3e4c
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0x11a4]
jne 0x4c3e4c
push str.We_are_completely_uploaded_and_fine_n
push esi
mov dword [esi + 0x594], 1
call fcn.00499770
mov ecx, dword [esp + 0x14]
add esp, 8
mov eax, dword [esi + 0x138]
cmp eax, ecx
je 0x4c3e6d
add dword [esi + 0x13c], ecx
pop edi
sub eax, ecx
pop ebp
mov dword [esi + 0x138], eax
xor eax, eax
pop ebx
add esp, 0x18
ret
cmp dword [esi + 0xe60], 0
jne 0x4c3e94
mov ecx, dword [esi + 0x980]
push ecx
call dword [0x54ae68]
add esp, 4
mov dword [esi + 0xe60], eax
test eax, eax
je 0x4c3c22
cmp dword [esi + 0x594], 0
mov edx, dword [esi + 0xe60]
mov dword [esi + 0x13c], edx
mov dword [esi + 0x138], 0
je 0x4c3ed4
mov eax, dword [esp + 0x28]
and dword [esi + 0x12c], 0xfffffffd
cmp dword [eax + 0x584], 0
je 0x4c3ed4
push eax
call fcn.004c3150
add esp, 4
test eax, eax
jne 0x4c3ed6
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0x18
ret