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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x28
mov eax, dword [0x6009e4]
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 0x408f96
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00584a28
mov esp, ebp
pop ebp
ret
push ecx
mov edx, eax
xor ecx, ecx
call fcn.00408d30
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 0x408f83
mov eax, dword [esp + 0x20]
movzx eax, ax
dec eax
cmp eax, 0xe
ja case.0x408fdd.3
jmp dword [eax*4 + 0x40961c]
cmp edi, 6
jne case.0x408fdd.3
movsx edx, byte [esi + 4]
mov cl, byte [esi + 5]
call fcn.00408510
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00584a28
mov esp, ebp
pop ebp
ret
cmp edi, 0xa
je 0x40901c
cmp edi, 0xc
jne case.0x408fdd.3
movzx eax, word [esi + 6]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movd xmm0, dword [0x6038f8]
movzx eax, ax
cvtdq2pd xmm0, xmm0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
movzx eax, word [esi + 8]
push eax
mulsd xmm1, qword [0x5f0f48]
divsd xmm1, xmm0
movsd qword [esp + 0x24], xmm1
call dword [sym.imp.WS2_32.dll_ntohs]
movd xmm0, dword [0x6038f8]
mov edx, dword [0x623408]
movzx eax, ax
cvtdq2pd xmm0, xmm0
movd xmm4, eax
cvtdq2pd xmm4, xmm4
mov eax, dword [0x623404]
sub eax, dword [0x6233c8]
movd xmm1, edx
mulsd xmm4, qword [0x5f0f48]
cvtdq2pd xmm1, xmm1
divsd xmm4, xmm0
movd xmm0, dword [0x6233f0]
cvtdq2pd xmm0, xmm0
movd xmm5, eax
divsd xmm1, xmm0
mov eax, dword [0x6233f4]
sub eax, dword [0x623420]
movd xmm0, dword [0x6233e0]
movd xmm6, eax
cvtdq2pd xmm5, xmm5
cvtdq2pd xmm0, xmm0
andps xmm5, xmmword [0x5f1090]
addsd xmm5, qword [esp + 0x20]
cvtdq2pd xmm6, xmm6
mulsd xmm5, xmm1
movd xmm1, dword [0x6233e8]
andps xmm6, xmmword [0x5f1090]
addsd xmm6, xmm4
mulsd xmm5, qword [0x5f0f70]
cvtdq2pd xmm1, xmm1
movsd qword [esp + 0x20], xmm5
divsd xmm1, xmm0
mulsd xmm6, xmm1
mulsd xmm6, qword [0x5f0f70]
movsd qword [esp + 0x18], xmm6
cmp edi, 0xc
jne 0x409141
movzx eax, word [esi + 0xa]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [0x623408]
movsd xmm5, qword [esp + 0x20]
movsd xmm6, qword [esp + 0x18]
movzx eax, ax
jmp 0x409143
xor eax, eax
movd xmm2, dword [0x6233e8]
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.004084a0
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00584a28
mov esp, ebp
pop ebp
ret
cmp edi, 0xa
jb 0x4091af
movzx eax, word [esi + 8]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x6233fc]
movzx edx, ax
lea eax, [edx - 0x14]
cmp eax, 0x1374
cmovbe ecx, edx
mov dword [0x6233fc], ecx
cmp edi, 8
jb 0x4091d9
movzx eax, word [esi + 6]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x6038f4]
movzx edx, ax
lea eax, [edx - 0x40]
cmp eax, 0xfc0
cmovbe ecx, edx
mov dword [0x6038f4], ecx
cmp edi, 6
jb case.0x408fdd.3
movsx edx, byte [esi + 5]
movsx ecx, byte [esi + 4]
call fcn.0040b280
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00584a28
mov esp, ebp
pop ebp
ret
cmp edi, 4
jne case.0x408fdd.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 [0x6233dc]
push eax
call esi
mov word [esp + 0x24], ax
movzx eax, word [0x62341c]
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.00408be0
mov edx, dword [0x6233f8]
test edx, edx
jne 0x4092cf
mov eax, dword [0x623410]
shl eax, 2
push eax
call fcn.0058d200
mov edx, eax
add esp, 4
mov dword [0x6233f8], edx
test edx, edx
je 0x40959a
mov esi, dword [0x623410]
xor edi, edi
test esi, esi
jle case.0x408fdd.3
nop dword [eax]
mov eax, dword [0x623418]
shl eax, 3
push eax
call fcn.0058d200
mov edx, dword [0x6233f8]
add esp, 4
mov dword [edx + edi*4], eax
test eax, eax
je 0x4095db
mov esi, dword [0x623410]
inc edi
cmp edi, esi
jl 0x4092a0
jmp 0x4092d5
mov esi, dword [0x623410]
test esi, esi
jle case.0x408fdd.3
mov edi, dword [0x623418]
xor ecx, ecx
test edi, edi
jle 0x409305
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 0x4092f0
add edx, 4
sub esi, 1
jne 0x4092e3
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00584a28
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.0x408fdd.3
mov dword [0x6233fc], ecx
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00584a28
mov esp, ebp
pop ebp
ret
call fcn.004085a0
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.00584a28
mov esp, ebp
pop ebp
ret
mov al, byte [esi + 4]
cmp al, 1
jne 0x4094d6
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 [0x6038f8]
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 [0x623404]
sub eax, dword [0x6233c8]
movd xmm1, dword [0x623408]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
mov eax, edi
cvtdq2pd xmm0, xmm0
div esi
andps xmm0, xmmword [0x5f1090]
xor edx, edx
cvttsd2si ecx, xmm0
movd xmm0, dword [0x6233f0]
cvtdq2pd xmm0, xmm0
add cx, ax
movzx eax, cx
movzx ecx, word [0x6038f8]
movd xmm2, eax
divsd xmm1, xmm0
cvtdq2pd xmm2, xmm2
mulsd xmm2, xmm1
movd xmm1, dword [0x6233e8]
cvtdq2pd xmm1, xmm1
mulsd xmm2, qword [0x5f0f70]
cvttsd2si eax, xmm2
movzx edi, ax
mov eax, dword [0x6233f4]
sub eax, dword [0x623420]
movd xmm0, eax
mov eax, dword [esp + 0x20]
cvtdq2pd xmm0, xmm0
div ecx
andps xmm0, xmmword [0x5f1090]
cvttsd2si esi, xmm0
mov edx, dword [esp + 0x18]
movd xmm0, dword [0x6233e0]
cvtdq2pd xmm0, xmm0
add si, ax
movzx eax, si
movd xmm2, eax
divsd xmm1, xmm0
cvtdq2pd xmm2, xmm2
mulsd xmm2, xmm1
mulsd xmm2, qword [0x5f0f70]
cvttsd2si eax, xmm2
movzx eax, ax
push eax
mov eax, dword [esp + 0xc]
push edi
mov cl, byte [eax + 5]
call fcn.004086c0
add esp, 8
jmp 0x4094f4
cmp al, 2
jne case.0x408fdd.3
push dword [0x6038f8]
mov edx, edi
lea ecx, [esi + 5]
add edx, 0xfffffffb
call fcn.00408760
add esp, 4
cmp eax, 1
jne case.0x408fdd.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.00584a28
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
call fcn.00408be0
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00584a28
mov esp, ebp
pop ebp
ret
cmp edi, 6
jb case.0x408fdd.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 [0x6233cc], ecx
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
pop edi
pop esi
xor ecx, esp
call fcn.00584a28
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x21b
mov edx, 0x603738
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0x21b
push 0x603758
push 0x603778
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.00587d2d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x21c
mov edx, 0x60379c
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0x21c
push 0x6037bc
push 0x6037dc
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.00587d2d
in al, 0x8f
inc eax
add byte [esi], cl
nop
inc eax
add byte [ebp - 0x7affbf6b], al
xchg ebp, eax
inc eax
add byte [ebp + 0x4004091], al
xchg edx, eax
inc eax
add byte [ebp - 0x7affbf6b], al
xchg ebp, eax
inc eax
add byte [ebp - 0x7affbf6b], al
xchg ebp, eax
inc eax
add byte [edi], bh
xchg ebp, eax
inc eax
add byte [ecx - 0x6b], ah
inc eax
add byte [edx], ah
xchg ebx, eax
inc eax
add byte [ecx - 0x6d], bl
inc eax
add byte [ebx - 0x33ffbf6d], ch
int3