Function at 0x4a87d0
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, 0x270
mov eax, dword [edx + 0x84]
mov ebx, edx
mov dword [esp + 0x94], ecx
push dword [edx + 0x80]
call dword [eax + 0x5c]
add esp, 4
test eax, eax
je 0x4a8853
mov esi, eax
mov eax, dword [eax]
lea edi, [esp + 0x100]
mov dword [esp + 0x100], 0
push 4
push edi
push 0x1006
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x4a8868
mov eax, dword [esi]
mov dword [esp + 0x100], 0
push 4
push edi
push 0x1005
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x4a8868
xor eax, eax
mov dword [esp + 4], ebx
cmp eax, dword [ebx + 4]
jno 0x4a888a
mov esi, connect
jmp 0x4a8a6b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x94]
mov dword [ecx + 4], eax
mov dword [ecx], 0
mov ecx, ebx
call fcn.0049e120
jmp 0x4a8b56
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x4a889b
lock inc dword [eax + 4]
jle 0x4a904c
mov esi, dword [ebx + 0xc]
mov dword [esp + 0xc], eax
test esi, esi
js 0x4a904c
mov edi, dword [ebx + 8]
je 0x4a88c8
movzx eax, byte [0x62314d]
xor ecx, ecx
mov edx, esi
call fcn.0048bb80
test eax, eax
jne 0x4a88cd
jmp 0x4a904c
mov eax, 1
push esi
push edi
mov dword [esp + 0x34], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov edx, dword [ebx + 0x18]
test edx, edx
js 0x4a904c
mov edi, dword [ebx + 0x14]
je 0x4a8908
movzx eax, byte [0x62314d]
xor ecx, ecx
mov ebx, edx
call fcn.0048bb80
test eax, eax
je 0x4a904c
mov edx, ebx
jmp 0x4a890d
mov eax, 1
mov dword [esp + 0x10], edx
push edx
push edi
mov dword [esp + 0x10], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [esp + 4]
movzx eax, word [ecx + 0x4a]
movzx edx, word [ecx + 0x48]
mov word [esp + 0x28], ax
xor eax, eax
mov word [esp + 0x18], dx
cmp eax, dword [ecx + 0x1c]
jno 0x4a8947
mov edi, connect
jmp 0x4a8a6b
mov eax, dword [ecx + 0x24]
test eax, eax
js 0x4a904c
mov ecx, dword [esp + 4]
mov ebx, eax
mov edi, dword [ecx + 0x20]
je 0x4a8976
movzx eax, byte [0x62314d]
xor ecx, ecx
mov edx, ebx
call fcn.0048bb80
test eax, eax
jne 0x4a897b
jmp 0x4a904c
mov eax, 1
push ebx
push edi
mov dword [esp + 0x24], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 4]
xor edx, edx
mov ecx, dword [eax + 0x40]
cmp edx, dword [eax + 0x28]
mov dword [esp + 0x14], ecx
jno 0x4a89ba
mov dword [esp + 0x24], getsockopt
mov eax, dword [esp + 4]
cmp edx, dword [eax + 0x34]
jno 0x4a8a13
mov dword [esp + 0x20], getsockopt
jmp 0x4a8a61
mov edi, dword [eax + 0x30]
test edi, edi
js 0x4a904c
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x2c]
je 0x4a89f0
mov dword [esp + 0x24], ecx
xor ecx, ecx
mov edx, edi
movzx eax, byte [0x62314d]
call fcn.0048bb80
test eax, eax
je 0x4a904c
mov ecx, dword [esp + 0x24]
jmp 0x4a89f5
mov eax, 1
mov dword [esp + 0x24], edi
push edi
push ecx
mov dword [esp + 0x40], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor edx, edx
mov eax, dword [esp + 4]
cmp edx, dword [eax + 0x34]
jo 0x4a89ad
mov edi, dword [eax + 0x3c]
test edi, edi
js 0x4a904c
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x38]
je 0x4a8a49
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov edx, edi
movzx eax, byte [0x62314d]
call fcn.0048bb80
test eax, eax
je 0x4a904c
mov ecx, dword [esp + 0x20]
jmp 0x4a8a4e
mov eax, 1
mov dword [esp + 0x20], edi
push edi
push ecx
mov dword [esp + 0x3c], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 4]
mov edi, ebx
movzx eax, byte [eax + 0x44]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 8]
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], ebx
neg esi
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], edi
mov dword [esp + 0x6c], edi
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 4]
mov dword [esp + 0x68], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x70], ecx
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x74], edi
mov edi, dword [esp + 0x34]
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x80], edi
lea edi, [esp + 0x4c]
mov dword [esp + 0x88], ecx
mov byte [esp + 0x8c], al
movzx eax, word [esp + 0x18]
mov word [esp + 0x90], ax
movzx eax, word [esp + 0x28]
mov word [esp + 0x92], ax
seto ah
cmp edx, 0xffffffff
sete cl
or cl, ah
je 0x4a8b5e
mov ecx, ebx
call fcn.0049e120
xor eax, eax
cmp eax, dword [esp + 0x4c]
jo 0x4a8b4c
mov eax, dword [esp + 0x48]
cmp eax, 0xffffffff
je 0x4a8b45
lock dec dword [eax + 4]
jne 0x4a8b45
push eax
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, edi
call fcn.0049e080
mov eax, dword [esp + 0x94]
mov byte [eax], 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [edx]
test eax, eax
je 0x4a8b18
js 0x4a904c
lea ecx, [eax + 1]
lock cmpxchg dword [edx], ecx
jne 0x4a8b60
mov dword [esp + 0x98], edx
cmp dword [edx + 0x48], 0
je 0x4a8bc6
cmp dword [edx + 0x4c], 0
je 0x4a8bc6
add edx, 0x10
mov cl, 1
xor eax, eax
mov dword [esp + 0x2c], edx
lock cmpxchg byte [edx], cl
jne 0x4a9866
mov edi, dword [esp + 0x54]
test edi, edi
js 0x4a904c
mov esi, dword [esp + 0x50]
je 0x4a8bee
movzx eax, byte [0x62314d]
xor ecx, ecx
mov edx, edi
call fcn.0048bb80
test eax, eax
jne 0x4a8bf3
jmp 0x4a904c
mov ecx, ebx
call fcn.0049e120
mov eax, dword [esp + 0x98]
lock dec dword [eax]
jne 0x4a8b1f
lea ecx, [esp + 0x98]
call fcn.0049ff50
jmp 0x4a8b1f
mov eax, 1
mov dword [esp + 8], edi
push edi
push esi
mov dword [esp + 0x18], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov edi, dword [esp + 0x60]
test edi, edi
js 0x4a904c
mov esi, dword [esp + 0x5c]
je 0x4a8c31
movzx eax, byte [0x62314d]
xor ecx, ecx
mov edx, edi
call fcn.0048bb80
test eax, eax
jne 0x4a8c36
jmp 0x4a904c
mov eax, 1
push edi
push esi
mov dword [esp + 0x20], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
movzx eax, word [esp + 0x90]
mov word [esp + 0x28], ax
movzx eax, word [esp + 0x92]
mov word [esp + 0x1c], ax
xor eax, eax
cmp eax, dword [esp + 0x64]
jno 0x4a8c71
mov esi, connect
jmp 0x4a8d6b
mov esi, dword [esp + 0x6c]
test esi, esi
js 0x4a904c
mov ecx, dword [esp + 0x68]
je 0x4a8ca5
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov edx, esi
movzx eax, byte [0x62314d]
call fcn.0048bb80
test eax, eax
je 0x4a904c
mov ecx, dword [esp + 0x14]
jmp 0x4a8caa
mov eax, 1
push esi
push ecx
mov dword [esp + 0x2c], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor edx, edx
mov eax, dword [esp + 0x88]
cmp edx, dword [esp + 0x70]
mov dword [esp + 0x20], eax
jno 0x4a8cdb
mov dword [esp + 0x14], getsockopt
mov ecx, connect
jmp 0x4a8d15
mov edx, dword [esp + 0x74]
lea ecx, [esp + 0x100]
mov dword [esp + 0x14], getsockopt
push dword [esp + 0x78]
call fcn.0040dac0
add esp, 4
mov edx, dword [esp + 0x108]
mov ecx, dword [esp + 0x100]
mov eax, dword [esp + 0x104]
mov dword [esp + 0x3c], edx
xor edx, edx
cmp edx, dword [esp + 0x7c]
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
jno 0x4a8d25
jmp 0x4a8d63
mov edx, dword [esp + 0x80]
lea ecx, [esp + 0x100]
push dword [esp + 0x84]
call fcn.0040dac0
add esp, 4
mov eax, dword [esp + 0x100]
mov edx, dword [esp + 0x104]
mov ecx, dword [esp + 0x108]
mov dword [esp + 0x14], eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], ecx
movzx edx, byte [esp + 0x8c]
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], ecx
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0xb4], edi
lea ecx, [esp + 0x100]
mov dword [esp + 0xb8], eax
movzx eax, word [esp + 0x28]
mov dword [esp + 0xbc], edi
mov word [esp + 0xec], ax
movzx eax, word [esp + 0x1c]
mov word [esp + 0xee], ax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc0], esi
mov dword [esp + 0xc8], esi
mov dword [esp + 0xc4], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xcc], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xd0], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xd4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xd8], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0xdc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0xe0], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0xe4], eax
mov eax, dword [esp + 0xc]
mov byte [esp + 0xe8], dl
lea edx, [eax + 0x28]
lea eax, [esp + 0xa8]
mov dword [esp + 0x24], edx
push eax
call fcn.004b0d70
add esp, 4
mov edx, dword [esp + 0x100]
lea esi, [esp + 0x104]
lea edi, [esp + 0x228]
mov ecx, 0x11
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x148]
mov eax, edx
neg eax
mov eax, dword [esp + 0x150]
jno 0x4a904e
mov dword [esp + 8], esi
lea edi, [esp + 0xa8]
lea esi, [esp + 0x228]
mov ecx, 0x11
mov edx, dword [esp + 0x14c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 8]
mov dword [esp + 0xf0], edx
mov dword [esp + 8], edx
mov dword [esp + 0xec], ecx
mov dword [esp + 0xf4], eax
mov eax, dword [edx - 0x10]
mov edi, dword [edx - 4]
cmp edi, eax
jne 0x4a8ed9
mov esi, dword [esp + 8]
mov ecx, esi
add ecx, 0xfffffff0
call fcn.004b0ee0
mov eax, dword [esi - 0x10]
mov edi, dword [esi - 4]
mov esi, dword [esp + 8]
xor edx, edx
mov ecx, dword [esi - 8]
add ecx, edi
cmp ecx, eax
cmovb eax, edx
sub ecx, eax
mov eax, ecx
shl eax, 7
lea eax, [eax + ecx*8]
add eax, dword [esi - 0xc]
push 0x88
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [edi + 1]
mov dword [esp + 4], edi
xor edi, edi
mov dword [esi - 4], eax
mov esi, dword [esp + 0xc]
cmp eax, dword [esi + 0x4c]
jbe 0x4a9253
mov ebx, dword [esp + 8]
mov eax, dword [ebx - 8]
mov edx, dword [ebx - 0x10]
mov esi, dword [ebx - 0xc]
lea ecx, [eax + 1]
cmp ecx, edx
cmovb edx, edi
neg edx
lea ecx, [eax + edx + 1]
mov dword [ebx - 8], ecx
mov ecx, dword [esp + 4]
mov dword [ebx - 4], ecx
mov ecx, eax
shl ecx, 7
lea ecx, [ecx + eax*8]
mov eax, dword [esi + ecx + 4]
cmp eax, reloc.WS2_32.dll_accept
je 0x4a904c
add esi, ecx
lea edi, [esp + 0x108]
mov ecx, dword [esi]
add esi, 8
mov dword [esp + 0x100], ecx
mov dword [esp + 0x104], eax
mov ecx, 0x20
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0x24]
test eax, eax
mov dword [esp + 4], eax
je 0x4a904c
mov edx, dword [esp + 0xc]
xor ebx, ebx
mov esi, dword [edx + 0x18]
mov eax, dword [edx + 0x20]
mov edx, dword [edx + 0x1c]
cmp eax, esi
mov ecx, esi
mov dword [esp + 0x10], eax
mov edi, esi
mov dword [esp + 0x28], esi
mov dword [esp + 8], edx
cmovb ecx, ebx
sub eax, ecx
mov ecx, dword [esp + 4]
sub edi, eax
mov dword [esp + 0x18], edi
cmp edi, ecx
lea ecx, [eax + ecx]
cmovb ecx, esi
cmp eax, ecx
je 0x4a9007
mov ecx, dword [esp + 8]
lea eax, [eax + eax*8]
lea esi, [ecx + eax*8]
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x18]
cmp ecx, eax
cmovb eax, ecx
xor ebx, ebx
shl eax, 3
lea edi, [eax + eax*8]
mov ecx, esi
lea edx, [esp + 0x4c]
call fcn.004b0f80
test al, al
jne 0x4a914b
add esi, 0x48
inc ebx
add edi, 0xffffffb8
jne 0x4a8feb
mov edx, dword [esp + 0x18]
cmp edx, dword [esp + 4]
jae 0x4a904c
mov ecx, dword [esp + 4]
mov esi, dword [esp + 8]
cmp ecx, edx
lea eax, [ecx*8]
cmovb edx, ecx
lea edi, [eax + eax*8]
shl edx, 3
lea eax, [edx + edx*8]
sub edi, eax
mov ecx, esi
lea edx, [esp + 0x4c]
call fcn.004b0f80
test al, al
jne 0x4a914b
add esi, 0x48
inc ebx
add edi, 0xffffffb8
jne 0x4a9030
ud2
mov dword [esp + 0x10], edx
mov dword [esp + 8], eax
xor ecx, ecx
mov edx, 0x88
movzx eax, byte [0x62314d]
call fcn.0048bb80
test eax, eax
je 0x4a904c
push 0x88
push ebx
mov dword [esp + 0xc], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [esp + 8]
mov ebx, esi
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov edx, ecx
and edx, esi
movdqu xmm0, xmmword [eax + edx]
pmovmskb esi, xmm0
test esi, esi
jne 0x4a90c4
mov edi, 0x10
nop word cs:[eax + eax]
nop dword [eax + eax]
add edx, edi
add edi, 0x10
and edx, ecx
movdqu xmm0, xmmword [eax + edx]
pmovmskb esi, xmm0
test esi, esi
je 0x4a90b0
tzcnt esi, esi
add esi, edx
and esi, ecx
movzx edx, byte [eax + esi]
test dl, dl
js 0x4a90e4
movdqa xmm0, xmmword [eax]
pmovmskb edx, xmm0
tzcnt esi, edx
movzx edx, byte [eax + esi]
lea edi, [esi - 0x10]
shr ebx, 0x19
and dl, 1
and edi, ecx
mov byte [eax + esi], bl
movzx ecx, dl
neg esi
mov byte [eax + edi + 0x10], bl
mov ebx, dword [esp + 8]
imul edx, esi, 0x58
lea esi, [esp + 0x228]
lea edi, [eax + edx - 0x54]
sub dword [ebx + 8], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + edx - 0x58], ecx
mov ecx, 0x11
rep movsd dword es:[edi], dword [esi]
mov dword [eax + edx - 0x10], 1
mov ecx, dword [esp + 4]
mov esi, dword [esp + 0xc]
mov dword [eax + edx - 0xc], ecx
mov dword [eax + edx - 8], 0
mov dword [eax + edx - 4], 1
inc dword [ebx + 0xc]
jmp 0x4a9268
cmp dword [esp + 4], ebx
jbe 0x4a904c
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 8]
lea esi, [ebx + eax]
xor eax, eax
mov ecx, edx
cmp esi, edx
cmovb ecx, eax
sub esi, ecx
lea ecx, [esi + esi*8]
mov dword [esp + 0x1c], esi
mov esi, dword [edi + ecx*8]
mov dword [esp + 0x18], esi
lea esi, [edi + ecx*8 + 4]
lea edi, [esp + 0x188]
mov ecx, 0x11
rep movsd dword es:[edi], dword [esi]
mov esi, ebx
not esi
add esi, dword [esp + 4]
cmp esi, ebx
jae 0x4a91c4
mov edi, dword [esp + 0x1c]
lea ecx, [edi + 1]
cmp ecx, edx
mov ecx, edx
cmovae eax, edx
mov edx, dword [esp + 8]
neg eax
lea eax, [edi + eax + 1]
push esi
push edi
push eax
call fcn.004b10b0
add esp, 0xc
mov esi, dword [esp + 0xc]
jmp 0x4a91ee
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0xc]
lea ecx, [edi + 1]
cmp ecx, edx
mov ecx, edx
cmovae eax, edx
mov edx, dword [esp + 8]
neg eax
lea eax, [edi + eax + 1]
mov dword [esi + 0x20], eax
push ebx
push eax
push edi
call fcn.004b10b0
add esp, 0xc
mov eax, dword [esp + 4]
lea edi, [esp + 0x1e0]
mov ecx, 0x11
dec eax
mov dword [esi + 0x24], eax
lea esi, [esp + 0x188]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x18]
mov eax, ecx
neg eax
jo 0x4a904c
mov dword [esp + 0x188], ecx
lea edi, [esp + 0x18c]
lea esi, [esp + 0x1e0]
mov ecx, 0x11
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x188]
call fcn.0049e080
lea ecx, [esp + 0x100]
call fcn.0049e120
mov esi, dword [esp + 0xc]
xor edi, edi
cmp edi, dword [esp + 0xa8]
jo 0x4a9268
lea ecx, [esp + 0xa8]
call fcn.0049e080
mov ebx, dword [esp + 0x54]
lea eax, [esi + 0x18]
mov dword [esp + 0x20], eax
test ebx, ebx
js 0x4a904c
mov edi, dword [esp + 0x50]
je 0x4a929a
movzx eax, byte [0x62314d]
xor ecx, ecx
mov edx, ebx
call fcn.0048bb80
test eax, eax
jne 0x4a929f
jmp 0x4a904c
mov eax, 1
mov dword [esp + 4], ebx
push ebx
push edi
mov dword [esp + 0x10], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ebx, dword [esp + 0x60]
test ebx, ebx
js 0x4a904c
mov edi, dword [esp + 0x5c]
je 0x4a92dd
movzx eax, byte [0x62314d]
xor ecx, ecx
mov edx, ebx
call fcn.0048bb80
test eax, eax
jne 0x4a92e2
jmp 0x4a904c
mov eax, 1
push ebx
push edi
mov dword [esp + 0x18], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
movzx eax, word [esp + 0x92]
movzx edi, word [esp + 0x90]
mov word [esp + 0x28], ax
xor eax, eax
mov word [esp + 0x18], di
cmp eax, dword [esp + 0x64]
jno 0x4a9320
mov dword [esp + 0x14], getsockopt
jmp 0x4a9423
mov edi, dword [esp + 0x6c]
test edi, edi
js 0x4a904c
mov ecx, dword [esp + 0x68]
je 0x4a9354
mov dword [esp + 0x1c], ecx
xor ecx, ecx
mov edx, edi
movzx eax, byte [0x62314d]
call fcn.0048bb80
test eax, eax
je 0x4a904c
mov ecx, dword [esp + 0x1c]
jmp 0x4a9359
mov eax, 1
mov dword [esp + 0x14], edi
push edi
push ecx
mov dword [esp + 0x40], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor ecx, ecx
mov eax, dword [esp + 0x88]
cmp ecx, dword [esp + 0x70]
mov dword [esp + 0x34], eax
jno 0x4a9386
mov ecx, connect
jmp 0x4a93b9
mov edx, dword [esp + 0x74]
lea ecx, [esp + 0x100]
push dword [esp + 0x78]
call fcn.0040dac0
add esp, 4
mov eax, dword [esp + 0x104]
mov ecx, dword [esp + 0x100]
mov edx, dword [esp + 0x108]
mov dword [esp + 0xa4], eax
xor eax, eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], edx
cmp eax, dword [esp + 0x7c]
jno 0x4a93d3
mov dword [esp + 0x3c], getsockopt
jmp 0x4a9417
mov edx, dword [esp + 0x80]
lea ecx, [esp + 0x100]
push dword [esp + 0x84]
call fcn.0040dac0
add esp, 4
mov eax, dword [esp + 0x100]
mov edx, dword [esp + 0x104]
mov ecx, dword [esp + 0x108]
mov dword [esp + 0x3c], eax
mov dword [esp + 0xa0], edx
mov dword [esp + 0x9c], ecx
movzx eax, byte [esp + 0x8c]
mov byte [esp + 0x33], al
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x24]
mov dword [esp + 0x1c], ebx
cmp eax, edx
jne 0x4a9440
mov ecx, dword [esp + 0x20]
call fcn.004b12d0
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x24]
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 4]
mov ebx, dword [esp + 8]
mov esi, dword [ecx + 0x20]
xor ecx, ecx
add esi, eax
cmp esi, edx
cmovb edx, ecx
inc eax
sub esi, edx
lea edx, [esi + esi*8]
mov esi, dword [esp + 0xc]
mov esi, dword [esi + 0x1c]
mov dword [esi + edx*8], edi
mov dword [esi + edx*8 + 4], ebx
mov dword [esi + edx*8 + 8], edi
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x10]
mov dword [esi + edx*8 + 0xc], edi
mov dword [esi + edx*8 + 0x10], ebx
mov dword [esi + edx*8 + 0x14], edi
mov edi, dword [esp + 0x14]
movzx ebx, byte [esp + 0x33]
mov dword [esi + edx*8 + 0x18], edi
mov dword [esi + edx*8 + 0x20], edi
mov edi, dword [esp + 0x38]
mov dword [esi + edx*8 + 0x1c], edi
mov edi, dword [esp + 0x44]
mov dword [esi + edx*8 + 0x24], edi
mov edi, dword [esp + 0x40]
mov dword [esi + edx*8 + 0x2c], edi
mov edi, dword [esp + 0xa4]
mov dword [esi + edx*8 + 0x28], edi
mov edi, dword [esp + 0x3c]
mov dword [esi + edx*8 + 0x30], edi
mov edi, dword [esp + 0x9c]
mov dword [esi + edx*8 + 0x38], edi
mov edi, dword [esp + 0xa0]
mov dword [esi + edx*8 + 0x34], edi
mov edi, dword [esp + 0x34]
mov dword [esi + edx*8 + 0x3c], edi
mov byte [esi + edx*8 + 0x40], bl
movzx edi, word [esp + 0x18]
movzx ebx, word [esp + 0x28]
mov word [esi + edx*8 + 0x44], di
mov word [esi + edx*8 + 0x46], bx
mov esi, dword [esp + 0xc]
mov dword [esi + 0x24], eax
cmp eax, dword [esi + 0x48]
xchg byte [esi + 0x10], cl
jbe 0x4a95d9
mov edi, dword [esp + 0x2c]
cmp cl, 2
jne 0x4a9519
push edi
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle]
cmp dword [esi + 0x48], 0
je 0x4a904c
cmp dword [esi + 0x4c], 0
je 0x4a904c
mov cl, 1
xor eax, eax
lock cmpxchg byte [edi], cl
jne 0x4a9880
mov eax, dword [esi + 0x24]
test eax, eax
je 0x4a904c
mov ecx, dword [esi + 0x20]
mov edi, esi
mov esi, dword [esi + 0x18]
xor ebx, ebx
lea edx, [ecx + 1]
cmp edx, esi
mov edx, dword [edi + 0x1c]
cmovb esi, ebx
dec eax
neg esi
lea esi, [ecx + esi + 1]
lea ecx, [ecx + ecx*8]
mov dword [edi + 0x20], esi
mov dword [edi + 0x24], eax
mov eax, dword [edx + ecx*8]
mov esi, eax
neg esi
jo 0x4a904c
lea esi, [edx + ecx*8]
mov dword [esp + 0x1e0], eax
lea edi, [esp + 0x1e4]
mov ecx, 0x11
lea eax, [esp + 0x1e0]
add esi, 4
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x100]
mov edx, dword [esp + 0x24]
push eax
call fcn.004b0d70
add esp, 4
cmp ebx, dword [esp + 0x100]
jno 0x4a95f6
lea esi, [esp + 0x104]
lea edi, [esp + 0x18c]
mov ecx, 0x14
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x188], getsockopt
jmp 0x4a961a
mov eax, dword [esp + 0x2c]
cmp cl, 2
lea edi, [esp + 0x4c]
jne 0x4a8bcd
push eax
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle]
jmp 0x4a8bcd
lea edi, [esp + 0x188]
lea esi, [esp + 0x100]
mov ecx, 0x16
xor eax, eax
rep movsd dword es:[edi], dword [esi]
cmp eax, dword [esp + 0x188]
jno 0x4a904c
mov eax, dword [esp + 0x1d4]
mov edx, dword [eax - 4]
test edx, edx
je 0x4a904c
mov ecx, dword [esp + 0x18c]
mov edi, dword [eax - 0x10]
xor ebx, ebx
mov dword [esp + 4], ecx
mov ecx, dword [eax - 8]
lea esi, [ecx + 1]
cmp esi, edi
mov esi, dword [esp + 0x1d8]
cmovae ebx, edi
dec edx
neg ebx
lea edi, [ecx + ebx + 1]
mov dword [esp + 0xc], esi
mov esi, dword [eax - 0xc]
mov dword [eax - 8], edi
mov edi, ecx
mov dword [eax - 4], edx
shl edi, 7
lea edi, [edi + ecx*8]
mov ecx, dword [esi + edi + 4]
cmp ecx, reloc.WS2_32.dll_accept
je 0x4a904c
add esi, edi
mov edi, dword [esi]
add esi, 8
test edx, edx
mov dword [esp + 0x100], edi
mov dword [esp + 0x104], ecx
lea edi, [esp + 0x108]
mov ecx, 0x20
rep movsd dword es:[edi], dword [esi]
mov ebx, dword [esp + 0x2c]
je 0x4a96d0
lea ecx, [esp + 0x100]
call fcn.0049e120
neg dword [esp + 4]
lea edi, [esp + 0x4c]
jo 0x4a9837
lea ecx, [esp + 0x18c]
call fcn.0049e080
jmp 0x4a9837
mov esi, dword [esp + 0xc]
pcmpeqd xmm1, xmm1
mov ecx, dword [esi]
mov edx, ecx
sub edx, eax
sar edx, 3
imul edx, edx, 0xba2e8ba3
lea edi, [edx - 0x10]
movdqu xmm2, xmmword [ecx + edx]
mov dword [esp + 8], edx
and edi, dword [esi + 4]
pcmpeqb xmm2, xmm1
movdqu xmm0, xmmword [ecx + edi]
pmovmskb edx, xmm2
pcmpeqb xmm0, xmm1
pmovmskb esi, xmm0
test esi, esi
je 0x4a9718
bsr si, si
xor esi, 0xf
jmp 0x4a971c
mov si, 0x10
or edx, 0x10000
tzcnt edx, edx
add esi, edx
mov dl, 0x80
cmp si, 0xf
ja 0x4a9739
mov edx, dword [esp + 0xc]
inc dword [edx + 8]
mov dl, 0xff
mov esi, dword [esp + 8]
add eax, 0xffffffa8
mov byte [ecx + esi], dl
mov byte [ecx + edi + 0x10], dl
mov ecx, dword [esp + 0xc]
lea edi, [esp + 0xa8]
mov esi, eax
dec dword [ecx + 0xc]
neg dword [esp + 4]
mov ecx, 0x16
rep movsd dword es:[edi], dword [esi]
jo 0x4a9770
lea ecx, [esp + 0x18c]
call fcn.0049e080
mov ecx, dword [esp + 0xf4]
mov eax, dword [esp + 0xf0]
mov esi, dword [esp + 0xf8]
mov edi, dword [esp + 0xfc]
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0xa8]
mov dword [esp + 4], eax
call fcn.0049e080
test edi, edi
je 0x4a980e
mov edx, dword [esp + 4]
xor eax, eax
cmp esi, edx
mov ecx, edx
mov ebx, edx
cmovb ecx, eax
sub esi, ecx
mov ecx, edi
sub ebx, esi
mov dword [esp + 8], ecx
sub edi, ebx
mov dword [esp + 0x10], ebx
lea ebx, [esi + ecx]
cmova ebx, edx
cmovb edi, eax
sub ebx, esi
je 0x4a97ec
mov eax, esi
shl eax, 7
lea esi, [eax + esi*8]
add esi, dword [esp + 0xc]
mov ecx, esi
call fcn.0049e120
add esi, 0x88
dec ebx
jne 0x4a97dc
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x2c]
cmp eax, dword [esp + 8]
jae 0x4a980e
mov esi, dword [esp + 0xc]
mov ecx, esi
call fcn.0049e120
add esi, 0x88
dec edi
jne 0x4a97fe
cmp dword [esp + 4], 0
je 0x4a9827
push dword [esp + 0xc]
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea ecx, [esp + 0x100]
call fcn.0049e120
lea edi, [esp + 0x4c]
xor eax, eax
xor esi, esi
xchg byte [ebx], al
cmp al, 2
jne 0x4a9848
push ebx
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle]
cmp esi, dword [esp + 0x188]
jo 0x4a8bcd
lea ecx, [esp + 0x188]
call fcn.0049e080
jmp 0x4a8bcd
mov ecx, dword [esp + 0x2c]
call fcn.004defa0
mov edi, dword [esp + 0x54]
test edi, edi
jns 0x4a8ba7
jmp 0x4a904c
mov ecx, edi
call fcn.004defa0
mov eax, dword [esi + 0x24]
test eax, eax
jne 0x4a9546
jmp 0x4a904c