Function at 0x4a0c30
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov byte [ebp - 1], 0
mov eax, dword [esi + 0x90]
or eax, dword [esi + 0x94]
jne 0x4a0c6b
mov eax, dword [esi + 0x98]
or eax, dword [esi + 0x9c]
jne 0x4a0c6b
push 7
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.004a14e0
add esp, 0xc
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 8], ebx
or dword [eax], 2
mov edi, dword [esi + 0x11c]
test edi, edi
je 0x4a0ce3
mov eax, dword [esi + 0x4b4]
shr eax, 5
cmp edi, eax
jge 0x4a0cd7
cmp byte [esi + 0x149], bl
jne 0x4a0cd7
cmp byte [esi + 0x144], bl
jne 0x4a0cd7
mov ecx, dword [esi + 0x98]
sub ecx, dword [esi + 0xb0]
mov eax, dword [esi + 0x9c]
sbb eax, dword [esi + 0xb4]
mov dword [ebp - 0xc], eax
mov eax, edi
cdq
add ecx, eax
mov eax, dword [ebp - 0xc]
adc eax, edx
cmp ecx, dword [esi + 0xc78]
jne 0x4a0cd2
cmp eax, dword [esi + 0xc7c]
je 0x4a0cd7
mov ebx, edi
mov dword [ebp - 8], edi
test edi, edi
je 0x4a0ce3
test ebx, ebx
je 0x4a0f24
cmp dword [esi + 0x8b8], 0
jne 0x4a0d09
push dword [esi + 0x4b4]
call dword [0x578348]
add esp, 4
mov dword [esi + 0x8b8], eax
test eax, eax
je 0x4a0e50
test ebx, ebx
je 0x4a0d2b
mov eax, dword [esi + 0x8b8]
cmp dword [esi + 0x120], eax
je 0x4a0d2b
push ebx
push dword [esi + 0x120]
push eax
call fcn.004f9390
add esp, 0xc
cmp byte [esi + 0x144], 0
mov edx, dword [esi + 0x8b8]
mov dword [esi + 0x120], edx
jne 0x4a1136
cmp dword [esi + 0xf8], 2
mov ecx, dword [esi + 0x124]
jne 0x4a0da3
cmp dword [ecx + 0x1a8], 2
jne 0x4a0da3
and dword [esi + 0xe4], 0xfffffffd
lea eax, [ebp - 0x1c]
push eax
mov dword [esi + 0xf8], 1
call fcn.00487840
push 0
movups xmm0, xmmword [eax]
mov eax, dword [ebp + 0x10]
movups xmmword [esi + 0xe8], xmm0
and dword [eax], 0xfffffffd
mov eax, dword [esi + 0x684]
cdq
push edx
push eax
push esi
call fcn.00481b00
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 0x1e0]
test dword [eax + 0x44], 0x40003
je 0x4a0dc0
cmp dword [ecx + 0x1a8], 1
sete byte [ebp - 1]
lea eax, [edx + ebx]
mov dword [esi + 0x120], eax
lea eax, [ebp + 0x10]
push eax
mov eax, dword [esi + 0x4b4]
sub eax, ebx
push eax
push esi
call fcn.0049f150
sub dword [esi + 0x120], ebx
add esp, 0xc
test eax, eax
jne 0x4a1151
mov edx, dword [ebp + 0x10]
add edx, ebx
mov dword [ebp + 0x10], edx
je 0x4a1136
test edx, edx
jle 0x4a113f
mov dword [esi + 0x11c], edx
cmp byte [ebp - 1], al
jne 0x4a0eff
cmp byte [esi + 0x6b7], al
je 0x4a0eff
cmp dword [esi + 0x924], eax
jne 0x4a0e5c
mov eax, dword [esi + 0x4b4]
add eax, eax
push eax
call dword [0x578348]
add esp, 4
mov dword [esi + 0x924], eax
test eax, eax
jne 0x4a0e5c
push str.Failed_to_alloc_scratch_buffer
push esi
call fcn.004931f0
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x4a0e75
push ebx
push dword [esi + 0x120]
push dword [esi + 0x924]
call fcn.004faeb0
add esp, 0xc
mov edx, ebx
mov ecx, ebx
cmp ebx, dword [ebp + 0x10]
jge 0x4a0ee4
nop
mov eax, dword [esi + 0x120]
mov bl, byte [edx + eax]
mov eax, dword [esi + 0x924]
cmp bl, 0xa
jne 0x4a0ed4
mov byte [ecx + eax], 0xd
inc ecx
mov eax, dword [esi + 0x924]
mov byte [ecx + eax], bl
cmp byte [esi + 0x6b7], 0
jne 0x4a0ed7
mov edi, dword [esi + 0xc78]
mov eax, edi
mov ebx, dword [esi + 0xc7c]
and eax, ebx
cmp eax, 0xffffffff
je 0x4a0ed7
add edi, 1
mov dword [esi + 0xc78], edi
adc ebx, 0
mov dword [esi + 0xc7c], ebx
jmp 0x4a0ed7
mov byte [ecx + eax], bl
inc edx
inc ecx
cmp edx, dword [ebp + 0x10]
jl 0x4a0e80
mov ebx, dword [ebp - 8]
mov edi, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
cmp ecx, edx
je 0x4a0eff
mov eax, dword [esi + 0x924]
mov edx, ecx
mov dword [esi + 0x120], eax
mov dword [esi + 0x11c], ecx
mov eax, dword [edi + 0x1e0]
test dword [eax + 0x44], 0x30000
je 0x4a0f27
push ebx
push edx
push esi
call fcn.004b56a0
add esp, 0xc
test eax, eax
je 0x4a0f27
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
lea eax, [ebp + 8]
push eax
push dword [esi + 0x11c]
push dword [esi + 0x120]
push dword [edi + 0x1fc]
push esi
call fcn.004933b0
add esp, 0x14
test eax, eax
jne 0x4a1151
lea eax, [ebp - 0x2c]
push eax
call fcn.00487840
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x1c], xmm0
movups xmm0, xmmword [esi + 0x130]
movups xmmword [ecx], xmm0
mov ecx, esp
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call fcn.004878e0
add esp, 0x20
test edx, edx
jl 0x4a0fd7
jg 0x4a0f8d
cmp eax, 0x3e8
jbe 0x4a0fd7
mov edi, dword [edi + 0x1fc]
lea eax, [ebp - 0xc]
push 0
push 0
push eax
push 4
lea eax, [ebp + 0x10]
push eax
push 0
push 0
push 0x4004747b
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x4a0fcc
push 4
lea eax, [ebp + 0x10]
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
movups xmm0, xmmword [ebp - 0x1c]
movups xmmword [esi + 0x130], xmm0
mov ebx, dword [esi + 0xb0]
mov eax, ebx
mov edi, dword [esi + 0xb4]
or eax, edi
mov dword [ebp + 0x10], ebx
mov dword [ebp - 8], edi
je 0x4a103a
mov eax, dword [ebp + 8]
cdq
cmp edi, edx
jg 0x4a0ffd
jl 0x4a1007
cmp ebx, eax
jb 0x4a1007
mov ebx, eax
mov dword [ebp + 0x10], eax
mov edi, edx
mov dword [ebp - 8], edx
push ebx
push dword [esi + 0x120]
push 2
push esi
call fcn.00493160
add esp, 0x10
sub dword [esi + 0xb0], ebx
sbb dword [esi + 0xb4], edi
mov edi, dword [ebp + 8]
mov eax, edi
cdq
mov ebx, eax
mov eax, edx
sub ebx, dword [ebp + 0x10]
sbb eax, dword [ebp - 8]
mov dword [ebp + 0x10], eax
jmp 0x4a1047
mov edi, dword [ebp + 8]
mov eax, edi
cdq
mov ebx, eax
mov dword [ebp + 0x10], edx
mov eax, edx
mov ecx, ebx
or ecx, eax
je 0x4a1088
mov eax, dword [esi + 0x120]
sub eax, ebx
push ebx
add eax, edi
push eax
push 4
push esi
call fcn.00493160
add dword [esi + 0x98], ebx
mov eax, dword [ebp + 0x10]
adc dword [esi + 0x9c], eax
push dword [esi + 0x9c]
push dword [esi + 0x98]
push esi
call fcn.004a13a0
mov edi, dword [ebp + 8]
add esp, 0x1c
cmp byte [esi + 0x149], 0
je 0x4a109a
cmp byte [esi + 0x14b], 0
je 0x4a10ce
mov eax, dword [esi + 0x98]
cmp eax, dword [esi + 0xc78]
jne 0x4a10ce
mov eax, dword [esi + 0x9c]
cmp eax, dword [esi + 0xc7c]
jne 0x4a10ce
push str.We_are_completely_uploaded_and_fine
push esi
mov byte [esi + 0x144], 1
call fcn.004932b0
mov edi, dword [ebp + 8]
add esp, 8
mov eax, dword [esi + 0x11c]
cmp eax, edi
je 0x4a10ef
add dword [esi + 0x120], edi
sub eax, edi
mov dword [esi + 0x11c], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x8b8], 0
jne 0x4a1115
push dword [esi + 0x4b4]
call dword [0x578348]
add esp, 4
mov dword [esi + 0x8b8], eax
test eax, eax
je 0x4a0e50
cmp byte [esi + 0x144], 0
mov eax, dword [esi + 0x8b8]
mov dword [esi + 0x120], eax
mov dword [esi + 0x11c], 0
je 0x4a114f
jmp 0x4a113f
test byte [esi + 0xe4], 0x20
jne 0x4a114f
and dword [esi + 0xe4], 0xfffffffd
push esi
call fcn.00492bc0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret