Function at 0x406fb0
Capabilities:
Set socket configuration

Disassembly:
mov ecx, dword [esp + 0xc]
push ebx
push ebp
push esi
cmp ecx, 2
push edi
jne 0x40702e
mov esi, dword [esp + 0x14]
mov ax, word [esi + 2]
push eax
call dword [sym.imp.WSOCK32.dll_ntohs]
mov ecx, dword [esp + 0x24]
mov word [ecx], ax
mov al, byte [esi + 4]
test al, al
je 0x406fdf
mov esi, dword [esi + 4]
jmp 0x406ff4
add esi, 9
push esi
call fcn.00406d20
add esp, 4
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov esi, eax
mov ebx, dword [sym.imp.WSOCK32.dll_inet_ntoa]
push esi
call ebx
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
call ebx
mov edi, dword [esp + 0x20]
mov ecx, ebp
mov edx, ecx
mov esi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
ret
mov ebx, dword [esp + 0x14]
mov al, byte [ebx]
cmp al, 5
jne 0x4070e0
cmp ecx, 1
jne 0x407098
mov esi, dword [ebx + 4]
mov ebp, dword [sym.imp.WSOCK32.dll_inet_ntoa]
push esi
call ebp
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
call ebp
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x20]
mov esi, eax
mov eax, dword [esp + 0x14]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ax, word [ebx + 8]
push eax
call dword [sym.imp.WSOCK32.dll_ntohs]
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
mov word [ecx], ax
mov eax, 1
pop ebx
ret
cmp al, 5
jne 0x4070e0
cmp ecx, 3
jne 0x4070e0
mov edi, dword [esp + 0x20]
xor ecx, ecx
mov cl, byte [ebx + 4]
lea esi, [ebx + 5]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [ebx + 4]
mov esi, dword [esp + 0x24]
mov bx, word [eax + ebx + 5]
push ebx
mov word [esi], bx
call dword [sym.imp.WSOCK32.dll_ntohs]
mov word [esi], ax
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
test al, al
jne 0x407195
mov dl, byte [ebx + 1]
test dl, dl
jne 0x407143
cmp ecx, 1
jne 0x407143
mov esi, dword [ebx + 4]
mov ebp, dword [sym.imp.WSOCK32.dll_inet_ntoa]
push esi
call ebp
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
call ebp
mov ecx, edi
mov edi, dword [esp + 0x20]
mov esi, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ax, word [ebx + 8]
push eax
call dword [sym.imp.WSOCK32.dll_ntohs]
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
mov word [ecx], ax
mov eax, 0xa
pop ebx
ret
test al, al
jne 0x407195
mov al, byte [ebx + 1]
test al, al
jne 0x407195
cmp ecx, 3
jne 0x407195
mov edi, dword [esp + 0x20]
xor ecx, ecx
mov cl, byte [ebx + 4]
lea esi, [ebx + 5]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [ebx + 4]
mov esi, dword [esp + 0x24]
mov ax, word [eax + ebx + 5]
push eax
mov word [esi], ax
call dword [sym.imp.WSOCK32.dll_ntohs]
mov word [esi], ax
xor eax, eax
mov al, byte [ebx + 4]
pop edi
pop esi
pop ebp
add eax, 7
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret