Function at 0x40bdc0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.0040c780
mov edi, edx
mov dword [esp + 0xc], ecx
mov ebx, dword [esp + 0x15c8]
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.0040c8d0
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x1c], edi
je 0x40be8e
test esi, esi
mov ecx, esi
jle 0x40c586
xor eax, eax
cmp ecx, 1
je 0x40be58
mov ecx, dword [esp + 0x15c4]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x1c]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0xc]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x2c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x2c]
add eax, 2
cmp ecx, eax
jne 0x40be40
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x40c586
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0xc]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c4]
inc dword [esp + eax*4 + 0x2c]
jmp 0x40c586
lea eax, [edi + edi*8]
mov dword [esp + 0x18], eax
mov ebx, eax
shl ebx, 6
test esi, esi
mov dword [esp + 0x20], ebx
jle 0x40bf43
cmp esi, 1
jne 0x40c12a
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x40bee5
mov ecx, dword [esp + 0xc]
add ecx, ebx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x40bee5
mov word [esp + edi*4 + 0xb0], cx
mov word [esp + edi*4 + 0xb2], ax
inc edi
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.0040c8d0
add esp, 0xc
test edi, edi
sete byte [esp + 7]
je 0x40bf5a
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0xb0]
mov edx, ecx
not edx
or edx, 0xff
add edx, ecx
inc dword [esp + edx*4 + 0x534]
shr ecx, 8
inc dword [esp + ecx*4 + 0x930]
inc eax
cmp edi, eax
jne 0x40bf10
mov eax, dword [esp + 0x930]
jmp 0x40bf63
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.0040c8d0
add esp, 0xc
xor edi, edi
mov byte [esp + 7], 1
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x10], edi
cmp eax, edi
setne cl
inc ecx
mov dword [esp + 0x24], ecx
lea eax, [esp + 0xb0]
mov dword [esp], eax
lea eax, [esp + 0x1130]
xor ecx, ecx
lea esi, [esp + 0x534]
xor edx, edx
jmp 0x40bfbe
mov edx, dword [esp + 0x14]
inc edx
add ecx, 8
mov esi, dword [esp + 0x28]
add esi, 0x400
mov eax, ebp
cmp edx, dword [esp + 0x24]
je 0x40c059
mov dword [esp + 0x14], edx
mov edx, dword [esp]
mov dword [esp + 8], edx
mov dword [esp], eax
xor eax, eax
xor edx, edx
mov dword [esp + edx*4 + 0xd30], eax
mov ebp, dword [esi + edx*4 - 4]
mov edi, ebp
and edi, eax
xor ebp, eax
lea eax, [edi*2]
add eax, ebp
mov dword [esp + edx*4 + 0xd34], eax
mov edi, dword [esi + edx*4]
mov ebp, edi
and ebp, eax
xor edi, eax
lea eax, [edi + ebp*2]
add edx, 2
cmp edx, 0x100
jne 0x40bfd0
mov dword [esp + 0x28], esi
cmp byte [esp + 7], 0
mov esi, dword [esp + 0x10]
mov ebx, dword [esp]
mov ebp, dword [esp + 8]
jne 0x40bfa0
xor edx, edx
movzx eax, word [ebp + edx*4]
shr eax, cl
mov edi, eax
not edi
or edi, 0xff
add edi, eax
mov eax, dword [esp + edi*4 + 0xd34]
lea ebp, [eax + 1]
mov dword [esp + edi*4 + 0xd34], ebp
mov ebp, dword [esp + 8]
mov edi, dword [ebp + edx*4]
mov dword [ebx + eax*4], edi
inc edx
cmp esi, edx
jne 0x40c020
jmp 0x40bfa0
mov edi, dword [esp + 0x10]
test edi, edi
mov ebx, dword [esp + 0x15c8]
mov ebp, dword [esp + 0x18]
je 0x40c472
cmp edi, 1
jne 0x40c082
mov eax, dword [esp]
mov word [eax], 1
jmp 0x40c341
mov esi, dword [esp]
movzx eax, word [esi + 4]
add word [esi], ax
cmp edi, 3
jl 0x40c195
mov eax, 2
mov ecx, 2
sub ecx, edi
mov dword [esp + 8], ecx
xor edx, edx
mov ebx, 1
jmp 0x40c0d4
movzx ebp, word [esi + eax*4]
mov ecx, esi
add word [ecx + ebx*4], bp
inc eax
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 8]
lea esi, [ecx + ebx]
inc esi
inc ebx
cmp esi, 1
mov esi, dword [esp]
je 0x40c1a4
movzx ecx, word [esi + edx*4]
cmp eax, edi
jge 0x40c0e5
movzx ebp, word [esi + eax*4]
cmp cx, bp
jae 0x40c110
mov word [esi + ebx*4], cx
mov word [esi + edx*4], bx
inc edx
cmp eax, edi
jge 0x40c119
cmp edx, ebx
jge 0x40c0b0
mov ecx, esi
movzx esi, word [esi + edx*4]
movzx ebp, word [ecx + eax*4]
cmp si, bp
jae 0x40c0b6
jmp 0x40c11f
mov word [esi + ebx*4], bp
inc eax
cmp eax, edi
jl 0x40c0f2
mov ecx, esi
movzx esi, word [esi + edx*4]
add word [ecx + ebx*4], si
mov word [ecx + edx*4], bx
inc edx
jmp 0x40c0bb
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0xc]
lea edx, [ebx + eax]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x40c15b
add eax, 2
cmp ecx, eax
je 0x40beb3
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x40c176
mov word [esp + edi*4 + 0xb0], si
mov word [esp + edi*4 + 0xb2], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x40c150
mov word [esp + edi*4 + 0xb0], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0xb2], si
inc edi
jmp 0x40c150
lea eax, [edi - 2]
mov word [esi + edi*4 - 8], 0
jmp 0x40c231
mov word [esi + edi*4 - 8], 0
lea edx, [edi - 3]
mov eax, edi
and eax, 3
xor eax, 2
mov ecx, edx
je 0x40c1dd
mov ecx, edx
nop
nop
nop
nop
mov esi, dword [esp]
movzx esi, word [esi + ecx*4]
mov ebx, dword [esp]
movzx esi, word [ebx + esi*4]
inc esi
mov ebx, dword [esp]
mov word [ebx + ecx*4], si
mov esi, dword [esp]
dec ecx
dec eax
jne 0x40c1c0
lea eax, [edi - 2]
cmp edx, 3
jb 0x40c231
inc ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esi + ecx*4 - 4]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + ecx*4 - 4], dx
movzx edx, word [esi + ecx*4 - 8]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + ecx*4 - 8], dx
movzx edx, word [esi + ecx*4 - 0xc]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + ecx*4 - 0xc], dx
movzx edx, word [esi + ecx*4 - 0x10]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + ecx*4 - 0x10], dx
add ecx, 0xfffffffc
jne 0x40c1f0
lea ecx, [edi - 1]
mov dword [esp + 8], 1
xor edx, edx
jmp 0x40c26c
mov esi, ebx
and esi, 2
mov edi, ebx
or ebx, 2
imul ebx, esi
xor esi, 2
and edi, 0x7ffffffd
imul edi, esi
add ebx, edi
inc edx
mov dword [esp + 8], ebx
test ebx, ebx
mov edi, dword [esp + 0x10]
jle 0x40c332
test eax, eax
js 0x40c2a0
lea ebx, [eax + 1]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp]
movzx edi, word [edi + eax*4]
cmp edx, edi
jne 0x40c2b0
inc esi
dec eax
cmp ebx, esi
jne 0x40c280
mov eax, 0xffffffff
jmp 0x40c2b2
xor ebx, ebx
jmp 0x40c2b2
mov ebx, esi
mov edi, dword [esp + 8]
mov esi, edi
sub esi, ebx
jle 0x40c240
and esi, 3
je 0x40c2ee
mov dword [esp + 0x14], ebx
mov edi, dword [esp]
lea ebp, [edi + ecx*4]
xor ebx, ebx
nop
nop
nop
mov word [ebp], dx
inc ebx
add ebp, 0xfffffffc
cmp esi, ebx
jne 0x40c2d0
mov esi, dword [esp + 8]
sub esi, ebx
sub ecx, ebx
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
jmp 0x40c2f4
mov esi, edi
mov dword [esp + 8], edi
mov edi, ebx
sub edi, dword [esp + 8]
cmp edi, 0xfffffffc
mov edi, dword [esp]
ja 0x40c240
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi + ecx*4], dx
mov word [edi + ecx*4 - 4], dx
mov word [edi + ecx*4 - 8], dx
mov word [edi + ecx*4 - 0xc], dx
add esi, 0xfffffffc
add ecx, 0xfffffffc
cmp esi, ebx
jg 0x40c310
jmp 0x40c240
test edi, edi
mov ebx, dword [esp + 0x15c8]
jle 0x40c472
lea edx, [edi - 1]
mov eax, edi
and eax, 3
xor ecx, ecx
cmp edx, 3
mov ebx, dword [esp]
jb 0x40c38a
mov edx, edi
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
movzx esi, word [ebx + ecx*4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + ecx*4 + 4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + ecx*4 + 8]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x2c]
add ecx, 4
cmp edx, ecx
jne 0x40c360
test eax, eax
je 0x40c3ad
mov edx, dword [esp]
lea ecx, [edx + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x2c]
inc edx
cmp eax, edx
jne 0x40c3a0
cmp edi, 2
mov ebx, dword [esp + 0x15c8]
jl 0x40c472
cmp ebx, 0x20
jge 0x40c42c
mov eax, dword [esp + ebx*4 + 0x2c]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x40c3ec
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
inc ecx
mov dword [esp + ebx*4 + 0x2c], eax
dec edx
jne 0x40c3e0
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x40c428
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x3c]
add ecx, 4
mov dword [esp + ebx*4 + 0x2c], eax
cmp ecx, 0x20
jne 0x40c400
test ebx, ebx
jle 0x40c462
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x28]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x40c440
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x40c6e6
jmp 0x40c472
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x40c6e6
shl ebp, 5
mov esi, dword [esp + 0xc]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.0040c8d0
add esp, 0xc
mov eax, dword [esp + 0x20]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.0040c8d0
add esp, 0xc
test ebx, ebx
mov esi, dword [esp]
jle 0x40c57f
add esi, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0xc]
mov dword [esp], esi
jmp 0x40c4dd
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
je 0x40c57f
mov ecx, dword [esp + eax*4 + 0x2c]
test ecx, ecx
jle 0x40c4d0
mov edx, ecx
and edx, 3
je 0x40c530
mov dword [esp + 0x10], edi
lea ebx, [esi + edi*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ebx]
mov byte [edi + ebp + 0x8f12], al
inc esi
add ebx, 0xfffffffc
cmp edx, esi
jne 0x40c500
mov edi, dword [esp + 0x10]
sub edi, esi
mov edx, ecx
sub edx, esi
mov ebx, dword [esp + 0x15c8]
mov esi, dword [esp]
cmp ecx, 4
jb 0x40c4d0
jmp 0x40c537
mov edx, ecx
cmp ecx, 4
jb 0x40c4d0
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esi + edi*4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + edi*4 - 4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + edi*4 - 8]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + edi*4 - 0xc]
add edi, 0xfffffffc
mov byte [ecx + ebp + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x40c540
jmp 0x40c4d0
mov ecx, dword [esp + 0x15c4]
mov dword [esp + 0x534], 0
cmp ebx, 2
jl 0x40c5ed
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x40c5a7
xor eax, eax
mov edx, 2
jmp 0x40c5d4
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x538], eax
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x53c], eax
add edx, 2
cmp ebx, edx
jne 0x40c5b0
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c4]
je 0x40c5ed
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0x530], eax
test ecx, ecx
jle 0x40c6db
xor eax, eax
mov edx, dword [esp + 0x1c]
lea esi, [edx + edx*8]
mov edi, esi
shl edi, 5
mov edx, dword [esp + 0xc]
add edi, edx
mov dword [esp], edi
shl esi, 6
add esi, edx
mov dword [esp + 0x14], esi
jmp 0x40c63c
mov ecx, dword [esp + 0x14]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c4]
inc eax
cmp eax, ecx
je 0x40c6db
mov edx, dword [esp]
movzx ebp, byte [eax + edx + 0x8f12]
test ebp, ebp
je 0x40c633
mov edx, dword [esp + ebp*4 + 0x530]
lea edi, [edx + 1]
mov dword [esp + ebp*4 + 0x530], edi
xor edi, edi
cmp ebp, 1
mov dword [esp + 8], ebp
je 0x40c6b1
and ebp, 0xfffffffe
xor edi, edi
nop
nop
nop
nop
lea ecx, [edi + edi]
mov esi, edx
not esi
or esi, 1
lea ebx, [edx + esi]
inc ebx
mov esi, ebx
not esi
and esi, ecx
xor ebx, ecx
lea edi, [ebx + edi*2]
sub edi, esi
mov ecx, edx
shr ecx, 1
lea esi, [edi + edi]
mov ebx, ecx
not ebx
or ebx, 1
add ecx, ebx
inc ecx
mov ebx, ecx
not ebx
and ebx, esi
xor ecx, esi
lea edi, [ecx + edi*2]
sub edi, ebx
shr edx, 2
add ebp, 0xfffffffe
jne 0x40c670
test byte [esp + 8], 1
je 0x40c620
lea ecx, [edi + edi]
mov esi, edx
not esi
or esi, 1
add edx, esi
inc edx
mov esi, edx
not esi
and esi, ecx
xor edx, ecx
lea edi, [edx + edi*2]
sub edi, esi
jmp 0x40c620
add esp, 0x15b0
pop esi
pop edi
pop ebx
pop ebp
ret
dec dword [esp + ebx*4 + 0x2c]
mov ecx, ebx
nop
nop
nop
nop
cmp ecx, 2
jl 0x40c708
mov esi, dword [esp + ecx*4 + 0x28]
dec ecx
test esi, esi
je 0x40c6f0
dec esi
mov dword [esp + ecx*4 + 0x2c], esi
add dword [esp + ecx*4 + 0x30], 2
dec eax
cmp eax, edx
jne 0x40c6e6
jmp 0x40c472