Function at 0x4ad810
Capabilities:
Set socket configuration
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x6009e4]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
xor eax, eax
mov dword [esp + 0x18], edx
xor ebx, ebx
mov dword [esp + 0xc], eax
push edi
xor edi, edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0xc], edi
mov esi, ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
test edx, edx
jne 0x4ad98b
lea ecx, [esp + 0xc]
call fcn.004ae180
mov dword [esp + 0x18], eax
cmp eax, dword [esi + 0x6c]
jne 0x4ad8c6
mov edi, dword [esp + 0xc]
test edi, edi
jne 0x4ad872
cmp dword [esi + 0x68], ebx
jmp 0x4ad8c4
mov ecx, dword [esi + 0x68]
test ecx, ecx
je 0x4ad8c6
mov edx, eax
shl edx, 4
sub edx, 4
jb 0x4ad894
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x4ad899
add edi, 4
add ecx, 4
sub edx, 4
jae 0x4ad883
cmp edx, 0xfffffffc
je 0x4ad8cb
mov al, byte [edi]
cmp al, byte [ecx]
jne 0x4ad8c6
cmp edx, 0xfffffffd
je 0x4ad8cb
mov al, byte [edi + 1]
cmp al, byte [ecx + 1]
jne 0x4ad8c6
cmp edx, 0xfffffffe
je 0x4ad8cb
mov al, byte [edi + 2]
cmp al, byte [ecx + 2]
jne 0x4ad8c6
cmp edx, 0xffffffff
je 0x4ad8cb
mov al, byte [edi + 3]
cmp al, byte [ecx + 3]
je 0x4ad8cb
mov ebx, 1
cmp dword [esi + 0x1c], 0
je 0x4ad959
lea ecx, [esp + 0x10]
call fcn.004ae300
mov edx, eax
mov dword [esp + 0x14], edx
cmp edx, dword [esi + 0x74]
jne 0x4ad98b
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4ad953
mov ecx, dword [esi + 0x70]
test ecx, ecx
je 0x4ad98b
lea edi, [edx*4]
mov edx, eax
sub edi, 4
jb 0x4ad921
nop
mov eax, dword [edx]
cmp eax, dword [ecx]
jne 0x4ad926
add edx, 4
add ecx, 4
sub edi, 4
jae 0x4ad910
cmp edi, 0xfffffffc
je 0x4ad959
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x4ad98b
cmp edi, 0xfffffffd
je 0x4ad959
mov al, byte [edx + 1]
cmp al, byte [ecx + 1]
jne 0x4ad98b
cmp edi, 0xfffffffe
je 0x4ad959
mov al, byte [edx + 2]
cmp al, byte [ecx + 2]
jne 0x4ad98b
cmp edi, 0xffffffff
je 0x4ad959
mov al, byte [edx + 3]
cmp al, byte [ecx + 3]
jmp 0x4ad957
cmp dword [esi + 0x70], 0
jne 0x4ad98b
test ebx, ebx
jne 0x4ad98b
mov ecx, dword [esp + 0xc]
push ecx
call fcn.0058bf82
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call fcn.0058bf82
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00584a28
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x68]
test eax, eax
je 0x4ad9a2
push eax
call fcn.0058bf82
add esp, 4
mov dword [esi + 0x68], 0
mov eax, dword [esi + 0x70]
test eax, eax
je 0x4ad9b9
push eax
call fcn.0058bf82
add esp, 4
mov dword [esi + 0x70], 0
cmp dword [esi + 0x20], 0
je 0x4ada00
xor edi, edi
cmp dword [esi + 0x6c], edi
jle 0x4ad9ee
mov eax, dword [esi + 0x20]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x4ad9e8
mov ecx, dword [esi + 0xc]
cmp dword [ecx], 0
jne 0x4ad9e8
push eax
push 0
mov edx, fcn.004aebb0
call fcn.004ae9f0
add esp, 8
inc edi
cmp edi, dword [esi + 0x6c]
jl 0x4ad9c6
push dword [esi + 0x20]
call fcn.0058bf82
add esp, 4
mov dword [esi + 0x20], 0
cmp dword [esp + 0x1c], 0
jne 0x4ad977
movzx eax, word [esi + 0x34]
mov ebx, dword [sym.imp.WS2_32.dll_htons]
push eax
call ebx
movzx eax, word [esi + 0x34]
push eax
call ebx
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x4adb8e
cmp word [esi + 0x3c], 0
je 0x4adb85
mov eax, dword [esp + 0x18]
mov dword [esi + 0x6c], eax
mov dword [esi + 0x68], ecx
test eax, eax
jle 0x4adb8e
shl eax, 2
push eax
call fcn.0058d200
add esp, 4
mov dword [esi + 0x20], eax
test eax, eax
je 0x4adc2d
xor ebx, ebx
cmp dword [esi + 0x6c], ebx
jle 0x4adb8e
xor edi, edi
nop dword [eax]
movzx eax, word [esi + 0x34]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esi + 0x68]
xor edx, edx
push esi
push 0
push 0x4ad780
mov word [edi + ecx + 2], ax
mov eax, dword [esi + 0x68]
mov ecx, dword [esi + 0xc]
add eax, edi
push 1
push eax
call fcn.004ac530
mov ecx, dword [esi + 0x20]
add esp, 0x14
mov dword [ecx + ebx*4], eax
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + ebx*4]
test ecx, ecx
je 0x4adb76
mov eax, dword [esi + 0x68]
lea edx, [esi + 0x3c]
add eax, edi
push eax
call fcn.004ac730
mov ecx, dword [esi + 0x68]
add esp, 4
add ecx, edi
mov edx, 0x1c
mov eax, 0x10
cmp word [ecx], 0x17
cmove eax, edx
push eax
mov eax, dword [esi + 0x20]
push ecx
mov ecx, dword [eax + ebx*4]
add ecx, 0x54
call fcn.00401000
mov eax, dword [esi + 0x20]
add esp, 8
mov eax, dword [eax + ebx*4]
push 4
mov ecx, dword [eax + 0x2c]
lea eax, [esi + 0x2c]
push eax
push 0xa
push 0
push ecx
mov dword [esp + 0x20], ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x4adcba
push 4
lea eax, [esi + 0x30]
push eax
push 0xb
push 0
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x4adc93
push 4
lea eax, [esi + 0x30]
push eax
push 0xb
push 0
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0
test eax, eax
jne 0x4adc6e
mov eax, dword [esi + 0x68]
xor ecx, ecx
push ecx
mov word [edi + eax + 2], cx
lea eax, [esp + 0x28]
push eax
push ecx
push ecx
push 4
lea eax, [esp + 0x3c]
push eax
push 0x9800000c
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
inc ebx
add edi, 0x10
cmp ebx, dword [esi + 0x6c]
jl 0x4ada70
jmp 0x4adb8e
push ecx
call fcn.0058bf82
add esp, 4
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test edx, edx
je 0x4adc09
test eax, eax
je 0x4adc16
cmp word [esi + 0x4c], 0
je 0x4adc09
cmp dword [esi + 0x1c], 0
je 0x4adc09
xor ecx, ecx
mov dword [esi + 0x74], edx
mov dword [esi + 0x70], eax
mov dword [esp + 0x14], ecx
test edx, edx
jle 0x4adc16
lea edx, [esi + 0x54]
nop
mov eax, dword [esi + 0x70]
push 0x10
push edx
mov edx, 0x10
mov edi, dword [eax + ecx*4]
lea ecx, [esp + 0x30]
mov eax, dword [esi + 0x1c]
mov ebx, dword [eax + 0x2c]
call fcn.004ac3b0
add esp, 8
mov dword [esp + 0x38], edi
lea eax, [esp + 0x28]
push 0x14
push eax
push 0xc
push 0x29
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [esp + 0x14]
lea edx, [esi + 0x54]
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, dword [esi + 0x74]
jl 0x4adbc0
jmp 0x4adc16
test eax, eax
je 0x4adc16
push eax
call fcn.0058bf82
add esp, 4
mov ecx, dword [esp + 0x3c]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00584a28
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x9c
mov edx, 0x61c044
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0x9c
push 0x61c068
push 0x61c08c
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.00587d2d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xab
mov edx, 0x61c0f8
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0xfd
call fcn.00587d2d
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xaa
mov edx, 0x61c0d4
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0xfd
call fcn.00587d2d
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xa9
mov edx, 0x61c0b0
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0xfd
call fcn.00587d2d
int3