Function at 0x4ae620
Capabilities:
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x58
mov eax, dword [edx + 0x90]
mov ebx, ecx
cmp eax, 0x3b9aca00
jne 0x4ae6ba
mov ecx, dword [edx + 0x74]
mov eax, dword [edx + 0x78]
mov esi, dword [edx + 0x6c]
cmp ecx, eax
jb 0x4ae6a5
mov eax, dword [edx + 0x70]
mov dword [esp + 0x20], esi
lea edi, [esp + 0x20]
lea ecx, [esp + 0x40]
mov dword [esp + 0x24], eax
mov eax, dword [edx + 0x7c]
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], eax
mov eax, dword [edx + 0x84]
push 0
push edi
push dword [edx + 0x80]
push ecx
mov edi, edx
call dword [eax + 0x24]
add esp, 0x10
cmp byte [esp + 0x40], 4
jne 0x4ae91a
movq xmm0, qword [esp + 0x28]
xor ecx, ecx
mov dword [edi + 0x74], 0
movd eax, xmm0
movq qword [edi + 0x78], xmm0
add esi, ecx
sub eax, ecx
mov dword [ebx + 4], esi
mov dword [ebx + 8], eax
mov dword [ebx], 0
jmp 0x4aebc0
mov ecx, dword [edx + 0x88]
mov dword [esp + 0x30], edx
mov edx, dword [edx + 0x8c]
lea esi, [esp + 0x10]
mov dword [esp + 8], ebx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], eax
push esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x4aec17
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
movq xmm0, qword [0x623138]
movd ebx, xmm0
pshufd xmm0, xmm0, 0x55
mov dword [esp + 0xc], ecx
movd edx, xmm0
mov eax, ebx
or eax, edx
jne 0x4ae767
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
push esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x4aec17
movq xmm0, qword [esp + 0x10]
mov ebx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
movq qword [0x623138], xmm0
mov eax, ebx
mov ecx, dword [esp + 0xc]
or eax, edx
je 0x4aec1d
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], ebx
mov dword [esp + 4], edx
push edx
push ebx
push ecx
push edi
call fcn.004db7b0
mov esi, edx
mov ecx, eax
mul ebx
imul edi, esi, 0x3b9aca00
imul esi, ebx
mov ebx, dword [esp + 0x3c]
add esi, edx
mov edx, ecx
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0xc]
imul edx, dword [esp + 4]
add esi, edx
sub ebx, eax
mov edx, 0x3b9aca00
mov eax, ecx
sbb edi, esi
mul edx
mov esi, edx
mov dword [esp + 0xc], eax
mov eax, ebx
mov edx, 0x3b9aca00
imul ecx, edi, 0x3b9aca00
add esi, dword [esp + 0x34]
mul edx
add edx, ecx
push dword [esp + 4]
push dword [esp + 0x3c]
push edx
push eax
call fcn.004db7b0
mov ebx, eax
add ebx, dword [esp + 0xc]
adc edx, esi
push 0
push 0x3b9aca00
push edx
push ebx
call fcn.004db7b0
imul ecx, eax, 0x3b9aca00
mov esi, edx
mov edx, eax
sub ebx, ecx
lea ecx, [esp + 0x20]
push ebx
push esi
call fcn.0047bf60
add esp, 8
cmp ecx, 0x3b9aca00
jne 0x4ae8a6
movzx eax, byte [0x62314d]
xor ecx, ecx
mov edx, 0x1a
call fcn.0048bb80
mov esi, dword [esp + 8]
test eax, eax
je 0x4aec1d
mov word [eax + 0x18], 0x6573
mov dword [eax + 0x14], 0x6e6f7073
mov dword [eax + 0x10], 0x65722067
mov dword [eax + 0xc], 0x6e696461
mov dword [eax + 8], 0x65722074
mov dword [eax + 4], 0x756f2064
mov dword [eax], 0x656d6974
mov dword [esp + 0x10], 0x1a
mov dword [esp + 0x14], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x18], 0x1a
lea ecx, [esp + 0x40]
mov edx, 0x16
push eax
call fcn.004aa810
add esp, 4
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov dword [esi + 8], ecx
mov dword [esi + 4], eax
mov dword [esi], 1
jmp 0x4aebc0
mov ebx, dword [esp + 0x30]
mov esi, eax
mov edi, edx
mov dword [esp + 4], ecx
mov eax, dword [ebx + 0x84]
push dword [ebx + 0x80]
call dword [eax + 0x5c]
mov edx, ebx
add esp, 4
mov ebx, dword [esp + 8]
test eax, eax
je 0x4ae63b
mov dword [esp + 0x38], eax
mov eax, dword [eax]
mov ecx, 0x3e8
mov dword [esp + 0xc], eax
mov eax, edi
mul ecx
mov edx, 0x3e8
mov ecx, eax
mov eax, esi
seto bl
mul edx
mov esi, edx
mov edi, eax
mov edx, 0xffffffff
add esi, ecx
mov dword [esp + 0x34], edi
setb al
or al, bl
mov byte [esp + 0x3c], al
je 0x4aea21
mov ebx, dword [esp + 8]
jmp 0x4aea9d
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], esi
call fcn.00499640
cmp al, 0xd
jne 0x4ae9fe
movzx eax, byte [0x62314d]
xor ecx, ecx
mov edx, 0x1a
call fcn.0048bb80
test eax, eax
je 0x4aec1d
mov word [eax + 0x18], 0x6573
mov dword [eax + 0x14], 0x6e6f7073
mov dword [eax + 0x10], 0x65722067
mov dword [eax + 0xc], 0x6e696461
mov dword [eax + 8], 0x65722074
mov dword [eax + 4], 0x756f2064
mov dword [eax], 0x656d6974
mov dword [esp + 0x20], 0x1a
mov dword [esp + 0x24], eax
lea eax, [esp + 0x20]
mov dword [esp + 0x28], 0x1a
lea ecx, [esp + 0x10]
mov edx, 0x16
push eax
call fcn.004aa810
add esp, 4
cmp byte [esp + 0x40], 3
jne 0x4aea0e
mov dword [esp + 8], ebx
mov ebx, dword [esi + 4]
mov edi, dword [esi]
mov eax, dword [ebx]
test eax, eax
je 0x4ae9cb
push edi
call eax
add esp, 4
cmp dword [ebx + 4], 0
je 0x4ae9e9
cmp dword [ebx + 8], 9
jb 0x4ae9da
mov edi, dword [edi - 4]
push edi
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [esp + 8]
jmp 0x4aea0e
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [ebx + 4], eax
mov dword [ebx + 8], ecx
jmp 0x4aebba
mov ebx, dword [esp + 4]
mov ecx, 0x431bde83
mov eax, ebx
mul ecx
mov eax, edi
mov ecx, edx
shr ecx, 0x12
add eax, ecx
mov eax, esi
adc eax, 0
mov eax, esi
jae 0x4aea4d
mov ebx, dword [esp + 8]
mov esi, eax
mov edx, 0xffffffff
jmp 0x4aea9d
add ecx, edi
mov edi, eax
mov esi, eax
mov eax, ebx
mov edx, 0x431bde83
adc edi, 0
mul edx
mov eax, ebx
xor ebx, ebx
shr edx, 0x12
imul edx, edx, 0xf4240
sub eax, edx
mov edx, edi
setne bl
add ebx, ecx
mov ebx, dword [esp + 8]
adc edx, 0
mov edx, 0xffffffff
jb 0x4aea9d
xor edx, edx
test eax, eax
setne dl
add ecx, edx
adc edi, 0
xor edx, edx
neg edi
sbb edx, edx
or edx, ecx
je 0x4aebc8
mov dword [esp + 0x20], edx
push 4
lea edi, [esp + 0x24]
push edi
push 0x1006
push 0xffff
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x4aeb01
mov eax, dword [esp + 0x38]
cmp byte [esp + 0x3c], 0
mov ecx, dword [eax]
mov eax, 0xffffffff
jne 0x4aeb66
mov eax, dword [esp + 4]
mov edx, 0x431bde83
mov dword [esp + 8], ecx
mul edx
mov eax, dword [esp + 0x34]
shr edx, 0x12
add eax, edx
mov eax, esi
adc eax, 0
mov eax, 0xffffffff
jae 0x4aeb10
mov ecx, dword [esp + 8]
jmp 0x4aeb66
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor esi, esi
xor ecx, ecx
jmp 0x4aebac
mov edi, dword [esp + 4]
mov ecx, esi
imul esi, edx, 0xf4240
sub edi, esi
mov esi, dword [esp + 0x34]
mov dword [esp + 4], edi
add esi, edx
adc ecx, 0
xor edx, edx
test edi, edi
setne dl
add edx, esi
mov edx, ecx
adc edx, 0
jae 0x4aeb45
mov ecx, dword [esp + 8]
lea edi, [esp + 0x20]
jmp 0x4aeb66
xor eax, eax
cmp dword [esp + 4], 0
lea edi, [esp + 0x20]
setne al
add esi, eax
adc ecx, 0
xor eax, eax
neg ecx
mov ecx, dword [esp + 8]
sbb eax, eax
or eax, esi
je 0x4aebe2
mov dword [esp + 0x20], eax
push 4
push edi
push 0x1005
push 0xffff
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x4aeb8b
mov al, 4
mov dword [esp + 4], eax
jmp 0x4aeb99
mov dword [esp + 4], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x30]
xor esi, esi
mov ecx, dword [esp + 4]
cmp cl, 4
je 0x4ae63b
shl esi, 8
movzx edx, cl
mov dword [ebx + 8], eax
or edx, esi
mov dword [ebx + 4], edx
mov dword [ebx], 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [0x5e37e0]
cmp cl, 4
jne 0x4aec0a
mov eax, dword [esp + 0x38]
lea edi, [esp + 0x20]
mov ecx, dword [eax]
jmp 0x4aead7
mov ecx, dword [0x5e37e0]
mov eax, dword [0x5e37e4]
mov edx, dword [esp + 0x30]
mov esi, ecx
mov dword [esp + 4], ecx
shrd esi, eax, 8
mov ecx, dword [esp + 4]
cmp cl, 4
je 0x4ae63b
jmp 0x4aebac
mov eax, dword [0x5e37e4]
mov esi, ecx
shrd esi, eax, 8
jmp 0x4aebac
call dword [sym.imp.KERNEL32.dll_GetLastError]
ud2