Function at 0x40c9f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x798
push ebx
push ebp
mov ebp, dword [esp + 0x7a4]
cmp dword [ebp], 0xba010000
push esi
push edi
jne 0x40cce2
mov eax, dword [ebp + 0xe]
and eax, 0xffffff
cmp eax, 0x10000
jne 0x40cce2
movzx ecx, byte [ebp + 0x12]
movzx edx, byte [ebp + 0x13]
shl ecx, 8
lea edi, [ecx + edx + 0x14]
cmp edi, 0x80
jbe 0x40cb21
cmp edi, 0x800
jae 0x40cb21
mov ecx, 0x7fa
sub ecx, edi
xor eax, eax
mov edx, ecx
shr edx, 8
mov byte [esp + 0x14], al
mov byte [esp + 0x15], al
mov byte [esp + 0x16], 1
mov byte [esp + 0x17], 0xbe
mov byte [esp + 0x18], dl
mov byte [esp + 0x19], cl
lea esi, [edi + ebp]
movzx edx, byte [esi]
mov bl, byte [esp + eax + 0x14]
mov dl, byte [edx + str.3s_ckv_6n.f]
xor dl, bl
inc esi
mov byte [esp + eax + 0x28], dl
inc eax
cmp eax, 6
jb 0x40ca73
cmp eax, ecx
jae 0x40caa6
movzx edx, byte [esi]
mov dl, byte [edx + str.3s_ckv_6n.f]
not dl
inc esi
mov byte [esp + eax + 0x28], dl
inc eax
cmp eax, ecx
jb 0x40ca91
mov esi, dword [0x42d4a0]
lea eax, [esp + 0x14]
push eax
lea edx, [esp + 0x14]
push edx
add edi, 0xffffff80
push edi
push ecx
lea eax, [esp + 0x38]
inc esi
push eax
mov dword [0x42d4a0], esi
call fcn.0040ccf0
add esp, 0x14
test eax, eax
je 0x40cce2
mov eax, dword [esp + 0x10]
mov bl, byte [ebp + 0x54]
mov esi, dword [esp + 0x7b0]
mov ecx, eax
shr ecx, 9
mov dl, byte [ecx + 0x42cba0]
xor dl, bl
mov byte [esi], dl
mov cl, byte [ebp + 0x55]
and eax, 0xff
mov al, byte [eax + 0x42cba0]
xor al, cl
mov ecx, dword [esp + 0x14]
mov edx, ecx
shr edx, 1
and edx, 0xff
mov byte [esi + 1], al
movzx eax, byte [edx + 0x42cba0]
jmp 0x40cc6a
xor edi, edi
xor ebx, ebx
mov dword [esp + 0x10], edi
lea eax, [esp + 0x427]
movzx esi, byte [edi + ebp]
xor ecx, ecx
mov edx, 0x80
sar edx, cl
test esi, edx
setne dl
inc ecx
mov byte [eax], dl
dec eax
cmp ecx, 8
jb 0x40cb36
inc edi
cmp edi, 0x80
jb 0x40cb30
mov esi, 0x10
lea esp, [esp]
cmp esi, 0x400
mov ecx, esi
jae 0x40cb89
lea ebx, [ebx]
xor edx, edx
mov eax, ecx
div esi
mov al, byte [esp + ecx + 0x28]
cmp al, byte [esp + edx + 0x28]
jne 0x40cb89
inc ecx
cmp ecx, 0x400
jb 0x40cb70
cmp ecx, ebx
jbe 0x40cb9e
xor edx, edx
mov eax, ecx
div esi
cmp eax, 2
jb 0x40cb9e
mov ebx, ecx
mov dword [esp + 0x10], esi
inc esi
cmp esi, 0x200
jb 0x40cb60
test ebx, ebx
jbe 0x40cce2
xor edi, edi
xor esi, esi
mov byte [esp + edi + 0x1c], 0
xor bl, bl
mov ecx, 7
nop
xor edx, edx
lea eax, [esi + edi*8]
div dword [esp + 0x10]
mov eax, dword [esp + 0x10]
sub eax, edx
mov dl, byte [esp + eax + 0x27]
shl dl, cl
or bl, dl
inc esi
dec ecx
cmp esi, 8
jb 0x40cbc0
movzx eax, byte [edi + ebp + 0x80]
mov cl, byte [eax + str.3s_ckv_6n.f]
xor cl, bl
mov byte [esp + edi + 0x1c], cl
inc edi
cmp edi, 0xa
jb 0x40cbb1
mov edi, dword [0x42d4a0]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
push 0
lea ecx, [esp + 0x28]
push 0xa
inc edi
push ecx
mov dword [0x42d4a0], edi
call fcn.0040ccf0
add esp, 0x14
test eax, eax
je 0x40cce2
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x7b0]
mov edx, eax
shr edx, 9
mov cl, byte [edx + 0x42cba0]
xor cl, byte [ebp + 0x54]
and eax, 0xff
mov byte [esi], cl
mov dl, byte [eax + 0x42cba0]
mov ecx, dword [esp + 0x10]
mov bl, byte [ebp + 0x55]
mov eax, ecx
shr eax, 1
xor dl, bl
and eax, 0xff
mov byte [esi + 1], dl
movzx eax, byte [eax + 0x42cba0]
mov edx, ecx
and edx, 1
mov bl, byte [ebp + 0x56]
shl edx, 8
or eax, edx
mov edx, ecx
shr edx, 9
and edx, 0xff
movzx edx, byte [edx + 0x42cba0]
shl eax, 8
or eax, edx
shr ecx, 0x11
movzx ecx, byte [ecx + 0x42cba0]
shl eax, 8
or eax, ecx
mov ecx, eax
shr ecx, 1
mov dl, cl
xor dl, al
and dl, 7
xor dl, bl
xor dl, cl
mov ecx, eax
mov byte [esi + 2], dl
mov bl, byte [ebp + 0x57]
shr ecx, 9
xor cl, bl
mov byte [esi + 3], cl
mov cl, byte [ebp + 0x58]
shr eax, 0x11
xor al, cl
mov byte [esi + 4], al
mov eax, dword [0x42d4a4]
pop edi
pop esi
inc eax
pop ebp
mov dword [0x42d4a4], eax
mov eax, 1
pop ebx
add esp, 0x798
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x798
ret