Function at 0x4097c0
Capabilities:
Encrypt data using rc4 ksa
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x28
mov eax, dword [0x6019e4]
xor eax, esp
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], edx
mov dword [esp + 8], eax
push esi
mov esi, ecx
mov ecx, dword [ebp + 0xc]
mov dword [esp + 4], esi
mov dword [esp + 8], ecx
push edi
cmp edx, 4
jge 0x409806
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
push ecx
mov edx, eax
xor ecx, ecx
call fcn.004095a0
movzx eax, word [esi]
add esp, 4
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
push eax
call edi
movzx eax, ax
mov dword [esp + 0x20], eax
movzx eax, word [esi + 2]
push eax
call edi
movzx edi, ax
mov eax, edi
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x18]
jg 0x4097f3
mov eax, dword [esp + 0x20]
movzx eax, ax
dec eax
cmp eax, 0xe
ja case.0x40984d.3
jmp dword [eax*4 + 0x409e8c]
cmp edi, 6
jne case.0x40984d.3
movsx edx, byte [esi + 4]
mov cl, byte [esi + 5]
call fcn.00408d80
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
cmp edi, 0xa
je 0x40988c
cmp edi, 0xc
jne case.0x40984d.3
movzx eax, word [esi + 6]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movd xmm0, dword [0x604f30]
movzx eax, ax
cvtdq2pd xmm0, xmm0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
movzx eax, word [esi + 8]
push eax
mulsd xmm1, qword [0x5f1f48]
divsd xmm1, xmm0
movsd qword [esp + 0x24], xmm1
call dword [sym.imp.WS2_32.dll_ntohs]
movd xmm0, dword [0x604f30]
mov edx, dword [0x62b088]
movzx eax, ax
cvtdq2pd xmm0, xmm0
movd xmm4, eax
cvtdq2pd xmm4, xmm4
mov eax, dword [0x62b084]
sub eax, dword [0x62b048]
movd xmm1, edx
mulsd xmm4, qword [0x5f1f48]
cvtdq2pd xmm1, xmm1
divsd xmm4, xmm0
movd xmm0, dword [0x62b070]
cvtdq2pd xmm0, xmm0
movd xmm5, eax
divsd xmm1, xmm0
mov eax, dword [0x62b074]
sub eax, dword [0x62b0a0]
movd xmm0, dword [0x62b060]
movd xmm6, eax
cvtdq2pd xmm5, xmm5
cvtdq2pd xmm0, xmm0
andps xmm5, xmmword [0x5f2090]
addsd xmm5, qword [esp + 0x20]
cvtdq2pd xmm6, xmm6
mulsd xmm5, xmm1
movd xmm1, dword [0x62b068]
andps xmm6, xmmword [0x5f2090]
addsd xmm6, xmm4
mulsd xmm5, qword [0x5f1f70]
cvtdq2pd xmm1, xmm1
movsd qword [esp + 0x20], xmm5
divsd xmm1, xmm0
mulsd xmm6, xmm1
mulsd xmm6, qword [0x5f1f70]
movsd qword [esp + 0x18], xmm6
cmp edi, 0xc
jne 0x4099b1
movzx eax, word [esi + 0xa]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [0x62b088]
movsd xmm5, qword [esp + 0x20]
movsd xmm6, qword [esp + 0x18]
movzx eax, ax
jmp 0x4099b3
xor eax, eax
movd xmm2, dword [0x62b068]
cvtdq2pd xmm2, xmm2
movzx ecx, byte [esi + 5]
divsd xmm6, xmm2
movd xmm2, edx
mov edx, eax
cvtdq2pd xmm2, xmm2
movaps xmm1, xmm6
divsd xmm5, xmm2
movaps xmm0, xmm5
call fcn.00408d10
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
cmp edi, 0xa
jb 0x409a1f
movzx eax, word [esi + 8]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x62b07c]
movzx edx, ax
lea eax, [edx - 0x14]
cmp eax, 0x1374
cmovbe ecx, edx
mov dword [0x62b07c], ecx
cmp edi, 8
jb 0x409a49
movzx eax, word [esi + 6]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x604f2c]
movzx edx, ax
lea eax, [edx - 0x40]
cmp eax, 0xfc0
cmovbe ecx, edx
mov dword [0x604f2c], ecx
cmp edi, 6
jb case.0x40984d.3
movsx edx, byte [esi + 5]
movsx ecx, byte [esi + 4]
call fcn.0040bae0
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
cmp edi, 4
jne case.0x40984d.3
mov esi, dword [sym.imp.WS2_32.dll_htons]
push 7
call esi
push 8
mov word [esp + 0x24], ax
call esi
mov word [esp + 0x22], ax
movzx eax, word [0x62b05c]
push eax
call esi
mov word [esp + 0x24], ax
movzx eax, word [0x62b09c]
push eax
call esi
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x10]
push edi
mov word [esp + 0x2a], ax
lea eax, [esp + 0x24]
push 8
push eax
call esi
add esp, 0xc
mov edx, edi
mov ecx, esi
call fcn.00409450
mov edx, dword [0x62b078]
test edx, edx
jne 0x409b3f
mov eax, dword [0x62b090]
shl eax, 2
push eax
call fcn.0058db11
mov edx, eax
add esp, 4
mov dword [0x62b078], edx
test edx, edx
je 0x409e0a
mov esi, dword [0x62b090]
xor edi, edi
test esi, esi
jle case.0x40984d.3
nop dword [eax]
mov eax, dword [0x62b098]
shl eax, 3
push eax
call fcn.0058db11
mov edx, dword [0x62b078]
add esp, 4
mov dword [edx + edi*4], eax
test eax, eax
je 0x409e4b
mov esi, dword [0x62b090]
inc edi
cmp edi, esi
jl 0x409b10
jmp 0x409b45
mov esi, dword [0x62b090]
test esi, esi
jle case.0x40984d.3
mov edi, dword [0x62b098]
xor ecx, ecx
test edi, edi
jle 0x409b75
nop dword [eax]
mov eax, dword [edx]
mov dword [eax + ecx*8], 0xff
mov eax, dword [edx]
mov byte [eax + ecx*8 + 4], 0
inc ecx
cmp ecx, edi
jl 0x409b60
add edx, 4
sub esi, 1
jne 0x409b53
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
movzx eax, word [esi + 4]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
lea eax, [ecx - 0x14]
cmp eax, 0x1374
ja case.0x40984d.3
mov dword [0x62b07c], ecx
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
call fcn.00408e10
mov esi, dword [sym.imp.WS2_32.dll_htons]
push 0xe
movzx edi, ax
call esi
push 6
mov word [esp + 0x24], ax
call esi
push edi
mov word [esp + 0x26], ax
call esi
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x10]
push edi
mov word [esp + 0x28], ax
lea eax, [esp + 0x24]
push 6
push eax
call esi
mov eax, dword [esp + 0x20]
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
mov al, byte [esi + 4]
cmp al, 1
jne 0x409d46
push dword [esi + 6]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x18], eax
movzx eax, word [esi + 0xa]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, word [0x604f30]
movzx edi, ax
mov eax, dword [esp + 8]
shl edi, 0xa
movzx eax, word [eax + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
xor edx, edx
shl eax, 0xa
mov dword [esp + 0x20], eax
mov eax, dword [0x62b084]
sub eax, dword [0x62b048]
movd xmm1, dword [0x62b088]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
mov eax, edi
cvtdq2pd xmm0, xmm0
div esi
andps xmm0, xmmword [0x5f2090]
xor edx, edx
cvttsd2si ecx, xmm0
movd xmm0, dword [0x62b070]
cvtdq2pd xmm0, xmm0
add cx, ax
movzx eax, cx
movzx ecx, word [0x604f30]
movd xmm2, eax
divsd xmm1, xmm0
cvtdq2pd xmm2, xmm2
mulsd xmm2, xmm1
movd xmm1, dword [0x62b068]
cvtdq2pd xmm1, xmm1
mulsd xmm2, qword [0x5f1f70]
cvttsd2si eax, xmm2
movzx edi, ax
mov eax, dword [0x62b074]
sub eax, dword [0x62b0a0]
movd xmm0, eax
mov eax, dword [esp + 0x20]
cvtdq2pd xmm0, xmm0
div ecx
andps xmm0, xmmword [0x5f2090]
cvttsd2si esi, xmm0
mov edx, dword [esp + 0x18]
movd xmm0, dword [0x62b060]
cvtdq2pd xmm0, xmm0
add si, ax
movzx eax, si
movd xmm2, eax
divsd xmm1, xmm0
cvtdq2pd xmm2, xmm2
mulsd xmm2, xmm1
mulsd xmm2, qword [0x5f1f70]
cvttsd2si eax, xmm2
movzx eax, ax
push eax
mov eax, dword [esp + 0xc]
push edi
mov cl, byte [eax + 5]
call fcn.00408f30
add esp, 8
jmp 0x409d64
cmp al, 2
jne case.0x40984d.3
push dword [0x604f30]
mov edx, edi
lea ecx, [esi + 5]
add edx, 0xfffffffb
call fcn.00408fd0
add esp, 4
cmp eax, 1
jne case.0x40984d.3
mov esi, dword [sym.imp.WS2_32.dll_htons]
push 0xf
call esi
push 4
mov word [esp + 0xc], ax
call esi
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x10]
push edi
mov word [esp + 0xe], ax
lea eax, [esp + 0xc]
push 4
push eax
call esi
mov eax, dword [esp + 0x20]
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
call fcn.00409450
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
cmp edi, 6
jb case.0x40984d.3
movzx eax, word [esi + 4]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
xor eax, eax
cmp ecx, 0xffff
cmove ecx, eax
mov dword [0x62b04c], ecx
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
pop edi
pop esi
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x21b
mov edx, 0x604d70
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0x21b
push 0x604d90
push 0x604db0
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.005885bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x21c
mov edx, 0x604dd4
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0x21c
push 0x604df4
push 0x604e14
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.005885bd
push esp
cwde
inc eax
add byte [esi - 0x68], bh
inc eax
add ch, dh
popfd
inc eax
add ch, dh
popfd
inc eax
add ch, dh
cdq
inc eax
add byte [edx + ebx*4 + 0x40], dh
add ch, dh
popfd
inc eax
add ch, dh
popfd
inc eax
add ch, dh
popfd
inc eax
add ch, dh
popfd
inc eax
add byte [edi - 0x2effbf63], ch
popfd
inc eax
add byte [edx - 0x36ffbf65], dl
wait
inc eax
add byte [ebx], bl
pushfd
inc eax
add ah, cl
int3