Function at 0x10039850
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebx
push esi
sub esp, 0x70
mov eax, dword [esp + 0x80]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x64], eax
mov eax, dword [0x10066d00]
mov ecx, dword [0x10066cfc]
mov dword [esp + 0x68], ecx
mov ecx, eax
sub ecx, 0xb6d1e1f9
sub ecx, 1
add ecx, 0xb6d1e1f9
imul eax, ecx
and eax, 1
mov dword [esp + 0x6c], eax
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x6c]
cmp eax, 0
sete al
cmp ecx, 0xa
setl cl
mov byte [esp + 0x5a], cl
mov dl, al
xor dl, 0xff
mov byte [esp + 0x5b], dl
xor cl, 0xff
mov byte [esp + 0x5c], cl
mov cl, 1
xor cl, 1
mov byte [esp + 0x5d], cl
and dl, 0xff
mov byte [esp + 0x5e], dl
and al, cl
mov byte [esp + 0x5f], al
mov cl, byte [esp + 0x5f]
mov al, byte [esp + 0x5e]
mov ah, byte [esp + 0x5d]
mov dl, byte [esp + 0x5a]
mov ch, byte [esp + 0x5c]
and ch, 0xff
mov byte [esp + 0x57], ch
and dl, ah
mov byte [esp + 0x58], dl
or al, cl
mov byte [esp + 0x59], al
mov cl, byte [esp + 0x58]
mov al, byte [esp + 0x57]
or al, cl
mov byte [esp + 0x56], al
mov cl, byte [esp + 0x5c]
mov al, byte [esp + 0x5b]
mov ah, byte [esp + 0x56]
mov dl, byte [esp + 0x59]
xor dl, ah
mov byte [esp + 0x54], dl
or al, cl
xor al, 0xff
mov byte [esp + 0x55], al
mov al, byte [esp + 0x54]
mov cl, byte [esp + 0x55]
mov dl, byte [esp + 0x5d]
or dl, 1
and cl, dl
or al, cl
test al, 1
jne 0x10039943
jmp 0x10039c13
mov eax, dword [0x10066d00]
mov dword [esp + 0x48], eax
mov ecx, dword [0x10066cfc]
mov dword [esp + 0x4c], ecx
xor ecx, ecx
sub ecx, 1
add eax, ecx
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x48]
imul eax, ecx
mov dword [esp + 0x44], eax
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x44]
and eax, 1
cmp eax, 0
sete al
cmp ecx, 0xa
setl cl
mov dl, al
and dl, cl
mov byte [esp + 0x42], dl
xor al, cl
mov byte [esp + 0x43], al
mov cl, byte [esp + 0x43]
mov al, byte [esp + 0x42]
or al, cl
mov byte [esp + 0x41], al
mov al, byte [esp + 0x41]
test al, 1
jne 0x100399b4
jmp 0x10039c13
mov eax, dword [0x10066d00]
mov dword [esp + 0x3c], eax
mov eax, dword [0x10066cfc]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov edx, ecx
add edx, 0xb9cac972
sub edx, 1
sub edx, 0xb9cac972
imul ecx, edx
and ecx, 1
cmp ecx, 0
sete cl
mov byte [esp + 0x36], cl
cmp eax, 0xa
setl al
mov byte [esp + 0x37], al
mov dl, byte [esp + 0x37]
mov cl, byte [esp + 0x36]
mov al, cl
xor al, 0xff
mov byte [esp + 0x30], al
mov ch, dl
xor ch, 0xff
mov byte [esp + 0x31], ch
mov ah, 1
xor ah, 0
mov byte [esp + 0x32], ah
and al, 0
and cl, ah
and ch, 0
mov byte [esp + 0x33], ch
and dl, ah
mov byte [esp + 0x34], dl
or al, cl
mov byte [esp + 0x35], al
mov al, byte [esp + 0x32]
mov dl, byte [esp + 0x31]
mov cl, byte [esp + 0x30]
mov ah, byte [esp + 0x35]
mov dh, byte [esp + 0x34]
mov ch, byte [esp + 0x33]
or ch, dh
xor ah, ch
mov byte [esp + 0x2d], ah
or cl, dl
xor cl, 0xff
mov byte [esp + 0x2e], cl
or al, 0
mov byte [esp + 0x2f], al
mov al, byte [esp + 0x2d]
mov dl, byte [esp + 0x2f]
mov cl, byte [esp + 0x2e]
and cl, dl
or al, cl
test al, 1
jne 0x10039a7e
jmp 0x10039bf4
mov eax, dword [esp + 0x60]
add eax, 0x16
mov dword [esp + 0x28], eax
mov eax, dword [0x10065314]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
cmp dword [eax + 0x113b12d6], 1
sete al
mov byte [esp + 0x23], al
mov eax, dword [0x10066d00]
mov ecx, dword [0x10066cfc]
mov edx, eax
add edx, 0x2cc65222
sub edx, 1
sub edx, 0x2cc65222
imul eax, edx
and eax, 1
cmp eax, 0
sete al
mov byte [esp + 0x1d], al
cmp ecx, 0xa
setl cl
mov byte [esp + 0x1e], cl
xor al, 0xff
mov byte [esp + 0x1f], al
xor cl, 0xff
mov byte [esp + 0x20], cl
mov cl, 1
xor cl, 0
mov byte [esp + 0x21], cl
and al, 0
mov byte [esp + 0x22], al
mov cl, byte [esp + 0x21]
mov al, byte [esp + 0x1e]
mov dl, byte [esp + 0x20]
mov ah, byte [esp + 0x1d]
and ah, cl
mov byte [esp + 0x1a], ah
and dl, 0
mov byte [esp + 0x1b], dl
and al, cl
mov byte [esp + 0x1c], al
mov dl, byte [esp + 0x21]
mov ah, byte [esp + 0x20]
mov cl, byte [esp + 0x1f]
mov dh, byte [esp + 0x1c]
mov ch, byte [esp + 0x1b]
mov bl, byte [esp + 0x1a]
mov al, byte [esp + 0x22]
or al, bl
or ch, dh
xor al, ch
or cl, ah
xor cl, 0xff
or dl, 0
and cl, dl
or al, cl
test al, 1
jne 0x10039b54
jmp 0x10039bf4
mov cl, byte [esp + 0x23]
xor eax, eax
test cl, 1
mov dword [esp + 0x14], eax
jne 0x10039bee
jmp 0x10039b6c
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x10], eax
mov bh, byte [edx + eax]
mov esi, 0x16
xor edx, edx
div esi
mov eax, dword [esp + 0x10]
mov bl, byte [ecx + edx]
mov dl, bh
xor dl, 0xff
and dl, 0x5d
mov cl, 0xff
xor cl, 0x5d
and bh, cl
mov dh, bl
xor dh, 0xff
and dh, 0x5d
and bl, cl
mov ecx, dword [esp + 0x64]
or dl, bh
or dh, bl
xor dl, dh
mov byte [ecx + eax], dl
xor ecx, ecx
sub ecx, 1
sub eax, ecx
cmp eax, 5
mov dword [esp + 0x14], eax
jne 0x10039b6c
mov eax, dword [0x10065314]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
add eax, 0x113b12d6
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov dword [eax], 1
jmp 0x10039bee
add esp, 0x70
pop esi
pop ebx
ret
mov eax, dword [0x10065314]
mov dword [esp + 4], eax
mov eax, dword [esp + 4]
add eax, 0x113b12d6
mov dword [esp], eax
mov eax, dword [esp]
mov eax, dword [eax]
jmp 0x10039a7e
jmp 0x10039943