Function at 0x408540
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov eax, 0x103c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00495550
mov esi, dword [ebp + 0x10]
push esi
lea eax, [ebp - 0x1014]
mov ecx, dword [ebp + 8]
push ecx
push str._s:_d
mov dword [ebp - 0x1044], eax
push eax
call fcn.00408520
lea eax, [ebp - 0x1014]
mov dword [esp], eax
call fcn.0040b570
add esp, 0x10
mov dword [ebp - 0x1028], eax
test eax, eax
js 0x4087b2
sub esp, 0xc
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x10000
push 4
push eax
push 0x1001
push 0xffff
mov eax, dword [ebp - 0x1028]
push eax
call sub.WS2_32.DLL_setsockopt
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x14]
add esp, 0xc
mov dword [ebp - 0x102c], esi
test eax, eax
jne 0x408739
test esi, esi
jle 0x40869f
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, dword [ebp + 0xc]
add eax, 0x20
mov dword [ebp - 0x1024], edx
mov dword [ebp - 0x1040], eax
jmp 0x408606
test esi, esi
jle 0x40869f
mov eax, dword [ebp - 0x1024]
add eax, edi
mov dword [ebp - 0x1024], eax
mov edi, esi
cmp esi, 0x10000
jle 0x408615
mov edi, 0x10000
push eax
push edi
mov eax, dword [ebp - 0x1024]
push eax
mov ebx, dword [ebp - 0x1028]
push ebx
call fcn.00405090
add esp, 0x10
test eax, eax
jne 0x408700
mov edx, dword [ebp + 0x14]
sub esi, edi
test edx, edx
je 0x4085f0
mov ebx, 0x64
mov eax, esi
imul ebx
sub esp, 0x10
mov dword [ebp - 0x1038], eax
mov dword [ebp - 0x1034], edx
mov eax, dword [ebp - 0x102c]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x1034]
push eax
mov eax, dword [ebp - 0x1038]
push eax
call fcn.00495580
add esp, 0x1c
sub ebx, eax
push ebx
mov eax, dword [ebp + 8]
push eax
push str.sending:__s__4d_______r
call fcn.004080c0
pop eax
mov eax, dword [ebp - 0x1040]
push eax
call sub.msvcrt.dll_fflush
add esp, 0x10
test esi, esi
jg 0x4085f8
mov edi, dword [ebp + 0x14]
test edi, edi
jne 0x40875a
lea edx, [ebp - 0x1014]
push esi
push 4
push edx
mov ebx, dword [ebp - 0x1028]
push ebx
call fcn.004052b0
add esp, 0x10
test eax, eax
jne 0x40876f
cld
mov edi, 0x4a08ca
mov ecx, 4
mov esi, dword [ebp - 0x1044]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40879c
sub esp, 0xc
mov eax, dword [ebp - 0x1028]
push eax
call fcn.00413ca0
xor eax, eax
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
mov ecx, dword [ebp - 0x1028]
push ecx
call fcn.0040af60
call fcn.0040aef0
add esp, 0xc
push eax
push str._failed_to_write_data__s__n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.00407d20
or eax, 0xffffffff
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
push eax
push eax
push 0x3a
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_strrchr
add esp, 0x10
test eax, eax
je 0x4085cb
inc eax
mov dword [ebp + 8], eax
jmp 0x4085cb
sub esp, 0xc
push 0x4a08ac
call fcn.004080c0
add esp, 0x10
jmp 0x4086aa
push ecx
push ecx
push str._error_reading_response__n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.00407d20
pop eax
mov eax, dword [ebp - 0x1028]
push eax
call fcn.00413ca0
or eax, 0xffffffff
add esp, 0x10
jmp 0x4086f8
lea eax, [ebp - 0x1014]
mov byte [ebp - 0x1010], 0
push edx
push eax
push str._error_response__s__n
jmp 0x408776
call fcn.0040aef0
push edx
push eax
push 0x4a0867
jmp 0x40871d