Function at 0x4c6580
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
test cl, 1
je 0x4c659d
cmp dword [esi], 0xffffffff
jne 0x4c659d
mov eax, dword [ebx]
mov dword [esi], eax
test ecx, 0x2000
je 0x4c65b0
cmp dword [esi + 4], 0xffffffff
jne 0x4c65b0
mov eax, dword [ebx + 4]
jmp 0x4c65c2
test cl, 2
je 0x4c65c5
cmp dword [esi + 4], 0xffffffff
jne 0x4c65c5
imul eax, dword [ebx + 4], 0x3e8
mov dword [esi + 4], eax
test cl, 4
je 0x4c65d6
cmp dword [esi + 8], 0xffffffff
jne 0x4c65d6
mov eax, dword [ebx + 8]
mov dword [esi + 8], eax
test cl, 8
je 0x4c65e7
cmp dword [esi + 0xc], 0xffffffff
jne 0x4c65e7
mov eax, dword [ebx + 0xc]
mov dword [esi + 0xc], eax
test ecx, 0x4000
je 0x4c65fc
cmp dword [esi + 0x10], 0xffffffff
jne 0x4c65fc
mov dword [esi + 0x10], 1
test ecx, 0x10000
je 0x4c6611
cmp dword [esi + 0x10], 0xffffffff
jne 0x4c6611
mov dword [esi + 0x10], 0
test cl, 0x10
je 0x4c6630
cmp dword [esi + 0x14], 0xffffffff
jne 0x4c6630
movzx eax, word [ebx + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp + 0x10]
movzx eax, ax
mov dword [esi + 0x14], eax
test cl, 0x20
je 0x4c664f
cmp dword [esi + 0x18], 0xffffffff
jne 0x4c664f
movzx eax, word [ebx + 0x12]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp + 0x10]
movzx eax, ax
mov dword [esi + 0x18], eax
test ecx, 0x200
je 0x4c6672
cmp dword [esi + 0x91a0], 0
jne 0x4c6672
mov eax, dword [ebx + 0x30]
mov dword [esi + 0x91a0], eax
mov eax, dword [ebx + 0x34]
mov dword [esi + 0x91a4], eax
test ecx, 0x800
je 0x4c6686
cmp dword [esi + 0x1c], 0xffffffff
jne 0x4c6686
mov eax, dword [ebx + 0x14]
mov dword [esi + 0x1c], eax
test ecx, 0x1000
je 0x4c669a
cmp dword [esi + 0x20], 0xffffffff
jne 0x4c669a
mov eax, dword [ebx + 0x18]
mov dword [esi + 0x20], eax
test ecx, 0x8000
je 0x4c66ae
cmp dword [esi + 0x38], 0xffffffff
jne 0x4c66ae
mov eax, dword [ebx + 0x40]
mov dword [esi + 0x38], eax
test cl, 0x40
je 0x4c672f
cmp dword [esi + 0x78], 0xffffffff
jne 0x4c672f
mov eax, dword [ebx + 0x20]
test eax, eax
jle 0x4c672c
mov edi, dword [0x55f1a8]
mov ecx, edi
imul eax, eax, 0x58
push eax
call dword [0x51a4a0]
call edi
add esp, 4
mov dword [esi + 0x74], eax
test eax, eax
je 0x4c6872
mov eax, dword [ebx + 0x20]
xor edi, edi
test eax, eax
jle 0x4c6729
xor edx, edx
nop dword [eax]
mov eax, dword [esi + 0x74]
lea edx, [edx + 0x58]
mov dword [edx + eax - 0x58], 2
mov eax, dword [esi + 0x74]
mov dword [edx + eax - 0x44], 0
mov eax, dword [esi + 0x74]
mov dword [edx + eax - 0x40], 0
mov eax, dword [ebx + 0x1c]
mov ecx, dword [esi + 0x74]
mov eax, dword [eax + edi*4]
inc edi
mov dword [edx + ecx - 0x54], eax
mov eax, dword [ebx + 0x20]
cmp edi, eax
jl 0x4c66f0
mov ecx, dword [ebp + 0x10]
mov dword [esi + 0x78], eax
test cl, cl
jns 0x4c67a2
cmp dword [esi + 0x28], 0xffffffff
jne 0x4c67a2
mov eax, dword [ebx + 0x28]
test eax, eax
jle 0x4c679f
mov edi, dword [0x55f1a8]
mov ecx, edi
shl eax, 2
push eax
call dword [0x51a4a0]
call edi
add esp, 4
mov dword [esi + 0x24], eax
test eax, eax
je 0x4c6872
mov eax, dword [ebx + 0x28]
xor edi, edi
test eax, eax
jle 0x4c679c
nop dword [eax + eax]
mov dword [esi + 0x28], edi
mov eax, dword [ebx + 0x24]
push dword [eax + edi*4]
call fcn.004ca7d0
mov ecx, dword [esi + 0x24]
add esp, 4
mov dword [ecx + edi*4], eax
mov eax, dword [esi + 0x24]
cmp dword [eax + edi*4], 0
je 0x4c6872
mov eax, dword [ebx + 0x28]
inc edi
cmp edi, eax
jl 0x4c6770
mov ecx, dword [ebp + 0x10]
mov dword [esi + 0x28], eax
test ecx, 0x100
je 0x4c67c9
cmp dword [esi + 0x34], 0
jne 0x4c67c9
push dword [ebx + 0x2c]
call fcn.004ca7d0
add esp, 4
mov dword [esi + 0x34], eax
test eax, eax
je 0x4c6872
mov ecx, dword [ebp + 0x10]
test ecx, 0x400
je 0x4c6847
cmp dword [esi + 0x30], 0xffffffff
jne 0x4c6847
mov eax, dword [ebx + 0x3c]
test eax, eax
jle 0x4c6844
mov edi, dword [0x55f1a8]
lea eax, [eax + eax*4]
shl eax, 3
mov ecx, edi
push eax
call dword [0x51a4a0]
call edi
add esp, 4
mov dword [esi + 0x2c], eax
test eax, eax
je 0x4c6872
mov eax, dword [ebx + 0x3c]
xor edi, edi
test eax, eax
jle 0x4c6841
xor edx, edx
nop word [eax + eax]
mov ecx, dword [ebx + 0x38]
lea edx, [edx + 0x28]
mov eax, dword [esi + 0x2c]
inc edi
movups xmm0, xmmword [ecx + edx - 0x28]
movups xmmword [eax + edx - 0x28], xmm0
movups xmm0, xmmword [ecx + edx - 0x18]
movups xmmword [eax + edx - 0x18], xmm0
movq xmm0, qword [ecx + edx - 8]
movq qword [eax + edx - 8], xmm0
mov eax, dword [ebx + 0x3c]
cmp edi, eax
jl 0x4c6810
mov ecx, dword [ebp + 0x10]
mov dword [esi + 0x30], eax
test ecx, 0x20000
je 0x4c687f
cmp dword [esi + 0x91c0], 0
jne 0x4c687f
push dword [ebx + 0x44]
call fcn.004ca7d0
add esp, 4
mov dword [esi + 0x91c0], eax
test eax, eax
jne 0x4c687c
cmp dword [ebx + 0x44], eax
je 0x4c687c
pop edi
pop esi
mov eax, 0xf
pop ebx
pop ebp
ret
mov ecx, dword [ebp + 0x10]
pop edi
mov dword [esi + 0x70], ecx
xor eax, eax
pop esi
pop ebx
pop ebp
ret