Function at 0x451510
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x20
mov eax, dword [esi + 0x90]
or eax, dword [esi + 0x94]
mov dword [esp + 8], 0
jne 0x451547
mov ecx, dword [esi + 0x98]
or ecx, dword [esi + 0x9c]
jne 0x451547
push 7
lea edx, [esp + 0x14]
push esi
push edx
call fcn.0044f130
add esp, 0xc
push ebx
push ebp
push edi
mov edi, dword [esp + 0x34]
or dword [edi], 2
mov ebp, dword [esi + 0x12c]
xor ebx, ebx
mov dword [esp + 0x10], ebx
test ebp, ebp
je 0x4515c3
mov eax, dword [esi + 0x528]
shr eax, 5
cmp ebp, eax
jge 0x4515b7
cmp dword [esi + 0x15c], ebx
jne 0x4515b7
cmp dword [esi + 0x148], ebx
jne 0x4515b7
mov ecx, dword [esi + 0x98]
sub ecx, dword [esi + 0xb0]
mov edi, dword [esi + 0x9c]
sbb edi, dword [esi + 0xb4]
mov eax, ebp
cdq
add ecx, eax
adc edi, edx
cmp ecx, dword [esi + 0xda0]
jne 0x4515ad
cmp edi, dword [esi + 0xda4]
je 0x4515b3
mov ebx, ebp
mov dword [esp + 0x10], ebp
mov edi, dword [esp + 0x34]
test ebp, ebp
je 0x4515c3
test ebx, ebx
je 0x451866
cmp dword [esi + 0x9e0], 0
jne 0x4515ea
mov ecx, dword [esi + 0x528]
push ecx
call dword [0x7d0020]
add esp, 4
mov dword [esi + 0x9e0], eax
test eax, eax
je 0x451787
test ebx, ebx
je 0x451609
mov eax, dword [esi + 0x130]
mov ecx, dword [esi + 0x9e0]
cmp eax, ecx
je 0x451609
push ebx
push eax
push ecx
call fcn.004d0720
add esp, 0xc
cmp dword [esi + 0x148], 0
mov ebp, dword [esi + 0x9e0]
mov dword [esi + 0x130], ebp
jne 0x4516f6
mov eax, dword [esi + 0x134]
mov ecx, 2
cmp dword [esi + 0x108], ecx
jne 0x45169b
cmp dword [eax + 0x1a0], ecx
jne 0x45169b
and dword [esi + 0xf4], 0xfffffffd
lea edx, [esp + 0x1c]
push edx
mov dword [esi + 0x108], 1
call fcn.0044c690
mov ecx, dword [eax]
mov dword [esi + 0xf8], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0xfc], edx
mov ecx, dword [eax + 8]
mov dword [esi + 0x100], ecx
mov edx, dword [eax + 0xc]
mov dword [esi + 0x104], edx
and dword [edi], 0xfffffffd
mov eax, dword [esi + 0x6fc]
cdq
push 0
push edx
push eax
push esi
call fcn.00429c00
add esp, 0x14
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx + 0x308]
test dword [edx + 0x44], 0x40003
je 0x4516be
xor ecx, ecx
cmp dword [eax + 0x1a0], 1
sete cl
mov dword [esp + 0x14], ecx
add ebp, ebx
mov dword [esi + 0x130], ebp
mov eax, dword [esi + 0x528]
lea edx, [esp + 0x34]
push edx
sub eax, ebx
push eax
push esi
call fcn.004507e0
sub dword [esi + 0x130], ebx
add esp, 0xc
test eax, eax
jne 0x451a59
mov ecx, dword [esp + 0x34]
lea ebp, [ecx + ebx]
test ebp, ebp
jne 0x451705
test byte [esi + 0xf4], 0x20
jne 0x451a57
jmp 0x451707
jg 0x451736
mov eax, dword [esi + 0xc]
and dword [esi + 0xf4], 0xfffffffd
cmp dword [eax + 0x2a8], 0
je 0x451a57
push esi
call fcn.00450ba0
add esp, 4
test eax, eax
je 0x451a57
pop edi
pop ebp
pop ebx
add esp, 0x20
ret
cmp dword [esp + 0x14], 0
mov dword [esi + 0x12c], ebp
jne 0x451840
cmp dword [esi + 0x740], 0
je 0x451840
cmp dword [esi + 0xa4c], 0
jne 0x451793
mov edx, dword [esi + 0x528]
add edx, edx
push edx
call dword [0x7d0020]
add esp, 4
mov dword [esi + 0xa4c], eax
test eax, eax
jne 0x451793
push str.Failed_to_alloc_scratch_buffer
push esi
call fcn.0042cb90
add esp, 8
pop edi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x20
ret
test ebx, ebx
je 0x4517ae
mov eax, dword [esi + 0x130]
mov ecx, dword [esi + 0xa4c]
push ebx
push eax
push ecx
call fcn.004d3550
add esp, 0xc
mov edi, ebx
mov eax, ebx
cmp ebx, ebp
jge 0x451828
jmp 0x4517c0
mov edx, dword [esi + 0x130]
mov cl, byte [edi + edx]
cmp cl, 0xa
jne 0x451819
mov ecx, dword [esi + 0xa4c]
mov byte [eax + ecx], 0xd
mov edx, dword [esi + 0xa4c]
inc eax
mov byte [eax + edx], 0xa
cmp dword [esi + 0x740], 0
jne 0x451822
mov ecx, dword [esi + 0xda0]
mov edx, dword [esi + 0xda4]
mov ebx, ecx
and ebx, edx
cmp ebx, 0xffffffff
mov ebx, dword [esp + 0x10]
je 0x451822
add ecx, 1
adc edx, 0
mov dword [esi + 0xda0], ecx
mov dword [esi + 0xda4], edx
jmp 0x451822
mov edx, dword [esi + 0xa4c]
mov byte [eax + edx], cl
inc edi
inc eax
cmp edi, ebp
jl 0x4517c0
cmp eax, ebp
je 0x451840
mov ecx, dword [esi + 0xa4c]
mov ebp, eax
mov dword [esi + 0x130], ecx
mov dword [esi + 0x12c], eax
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 0x308]
test dword [eax + 0x44], 0x30000
je 0x451866
push ebx
push ebp
push esi
call fcn.0043df20
add esp, 0xc
test eax, eax
jne 0x451a59
mov edx, dword [esi + 0x12c]
mov eax, dword [esi + 0x130]
mov edi, dword [esp + 0x30]
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [edi + 0x324]
push edx
push eax
push ecx
push esi
call fcn.0042c8a0
add esp, 0x14
test eax, eax
jne 0x451a59
mov edi, dword [edi + 0x324]
push eax
push eax
lea edx, [esp + 0x1c]
push edx
push 4
lea eax, [esp + 0x44]
push eax
push 0
push 0
push 0x4004747b
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x4518d5
push 4
lea ecx, [esp + 0x38]
push ecx
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WSOCK32.dll_setsockopt]
mov edi, dword [esi + 0xb0]
mov ecx, dword [esi + 0xb4]
mov edx, edi
or edx, ecx
je 0x45193a
mov eax, dword [esp + 0xc]
cdq
cmp ecx, edx
jg 0x4518fe
jl 0x4518f6
cmp edi, eax
jae 0x4518fe
mov ebp, edi
mov dword [esp + 0x18], ecx
jmp 0x451904
mov ebp, eax
mov dword [esp + 0x18], edx
mov eax, dword [esi + 0x130]
push ebp
push eax
push 2
push esi
call fcn.0042ca70
mov ecx, dword [esp + 0x28]
add esp, 0x10
sub dword [esi + 0xb0], ebp
sbb dword [esi + 0xb4], 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 0x451945
mov ecx, dword [esp + 0xc]
mov eax, ecx
cdq
mov edi, eax
mov ebx, edx
mov edx, edi
or edx, ebx
je 0x451986
mov eax, dword [esi + 0x130]
sub eax, edi
push edi
add eax, ecx
push eax
push 4
push esi
call fcn.0042ca70
add dword [esi + 0x98], edi
mov edx, dword [esi + 0x98]
adc dword [esi + 0x9c], ebx
mov ecx, dword [esi + 0x9c]
push ecx
push edx
push esi
call fcn.0044f5f0
mov ecx, dword [esp + 0x28]
add esp, 0x1c
cmp dword [esi + 0x15c], 0
je 0x451998
cmp dword [esi + 0x164], 0
je 0x4519d0
mov eax, dword [esi + 0x98]
cmp eax, dword [esi + 0xda0]
jne 0x4519d0
mov edx, dword [esi + 0x9c]
cmp edx, dword [esi + 0xda4]
jne 0x4519d0
push str.We_are_completely_uploaded_and_fine
push esi
mov dword [esi + 0x148], 1
call fcn.0042cb10
mov ecx, dword [esp + 0x14]
add esp, 8
mov eax, dword [esi + 0x12c]
cmp eax, ecx
je 0x4519f1
add dword [esi + 0x130], ecx
pop edi
sub eax, ecx
pop ebp
mov dword [esi + 0x12c], eax
xor eax, eax
pop ebx
add esp, 0x20
ret
cmp dword [esi + 0x9e0], 0
jne 0x451a18
mov eax, dword [esi + 0x528]
push eax
call dword [0x7d0020]
add esp, 4
mov dword [esi + 0x9e0], eax
test eax, eax
je 0x451787
cmp dword [esi + 0x148], 0
mov ecx, dword [esi + 0x9e0]
mov dword [esi + 0x130], ecx
mov dword [esi + 0x12c], 0
je 0x451a57
mov eax, dword [esi + 0xc]
and dword [esi + 0xf4], 0xfffffffd
cmp dword [eax + 0x2a8], 0
je 0x451a57
push esi
call fcn.00450ba0
add esp, 4
test eax, eax
jne 0x451a59
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0x20
ret