Function at 0x41cd30
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.0041d670
mov edi, edx
mov dword [esp + 0xc], ecx
mov esi, dword [esp + 0x15c0]
lea eax, [esp + 0x28]
push 0x84
push 0
push eax
call fcn.0041d7b0
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0x18], edi
je 0x41cde7
test esi, esi
jle 0x41d485
xor eax, eax
cmp esi, 1
je 0x41cdb8
mov ecx, dword [esp + 0x15c0]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
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 + 0x28]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x28]
add eax, 2
cmp ecx, eax
jne 0x41cda0
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x41d485
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0xc]
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x28]
jmp 0x41d485
lea eax, [edi + edi*8]
mov dword [esp + 0x14], eax
mov ebp, eax
shl ebp, 6
test esi, esi
mov dword [esp + 0x20], ebp
jle 0x41ce93
cmp esi, 1
jne 0x41d59e
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x41ce3e
mov ecx, dword [esp + 0xc]
add ecx, ebp
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x41ce3e
mov word [esp + edi*4 + 0xac], cx
mov word [esp + edi*4 + 0xae], ax
inc edi
lea eax, [esp + 0x92c]
push 0x800
push 0
push eax
call fcn.0041d7b0
add esp, 0xc
test edi, edi
sete byte [esp + 0xb]
je 0x41ceaa
xor eax, eax
movzx ecx, word [esp + eax*4 + 0xac]
mov edx, ecx
not edx
or edx, 0xff
add edx, ecx
inc dword [esp + edx*4 + 0x930]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd2c]
inc eax
cmp edi, eax
jne 0x41ce60
mov eax, dword [esp + 0xd2c]
jmp 0x41ceb3
lea eax, [esp + 0x92c]
push 0x800
push 0
push eax
call fcn.0041d7b0
add esp, 0xc
xor edi, edi
mov byte [esp + 0xb], 1
xor eax, eax
xor ecx, ecx
mov dword [esp + 4], edi
cmp eax, edi
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x24], eax
lea eax, [esp + 0xac]
mov dword [esp], eax
lea eax, [esp + 0x112c]
xor ecx, ecx
lea esi, [esp + 0x92c]
xor edx, edx
jmp 0x41cf0e
mov edx, dword [esp + 0x10]
inc edx
add ecx, 8
mov esi, dword [esp + 0x1c]
add esi, 0x400
mov eax, edi
cmp edx, dword [esp + 0x24]
je 0x41cfb9
mov dword [esp + 0x10], edx
mov edi, dword [esp]
mov dword [esp], eax
mov edx, 3
xor eax, eax
nop
mov dword [esp + edx*4 + 0x520], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0x524], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0x528], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0x52c], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x41cf20
mov dword [esp + 0x1c], esi
cmp byte [esp + 0xb], 0
mov ebp, dword [esp]
jne 0x41cef0
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [edi + edx*4]
shr eax, cl
mov ebx, eax
xor ebx, 0x3fffff00
or eax, 0xff
and eax, ebx
mov ebx, dword [esp + eax*4 + 0x52c]
mov esi, edi
lea edi, [ebx + 1]
mov dword [esp + eax*4 + 0x52c], edi
mov edi, esi
mov eax, dword [esi + edx*4]
mov dword [ebp + ebx*4], eax
mov eax, edx
xor eax, 1
and edx, 1
lea edx, [eax + edx*2]
mov eax, dword [esp + 4]
cmp edx, eax
jb 0x41cf70
jmp 0x41cef0
cmp dword [esp + 4], 0
je 0x41d355
cmp dword [esp + 4], 1
jne 0x41cfd8
mov eax, dword [esp]
mov word [eax], 1
jmp 0x41d22d
mov ecx, dword [esp]
movzx eax, word [ecx + 4]
add word [ecx], ax
mov eax, dword [esp + 4]
mov ecx, eax
or ecx, 0xfffffffe
and eax, 0xfffffffe
mov edx, ecx
add ecx, eax
inc ecx
cmp ecx, 2
jl 0x41d0ae
add edx, eax
neg edx
mov dword [esp + 0x10], edx
xor ecx, ecx
mov edx, 2
mov esi, 1
jmp 0x41d03d
mov edi, dword [esp]
movzx eax, word [edi + ecx*4]
add word [edi + esi*4], ax
mov word [edi + ecx*4], si
inc ecx
mov eax, dword [esp + 0x10]
add eax, esi
inc eax
inc esi
cmp eax, 1
je 0x41d0ae
mov edi, dword [esp]
movzx eax, word [edi + ecx*4]
cmp edx, dword [esp + 4]
jge 0x41d053
movzx ebp, word [edi + edx*4]
cmp ax, bp
jae 0x41d070
mov word [edi + esi*4], ax
mov word [edi + ecx*4], si
inc ecx
cmp edx, dword [esp + 4]
jge 0x41d020
jmp 0x41d07b
inc edx
mov word [edi + esi*4], bp
cmp edx, dword [esp + 4]
jge 0x41d020
cmp ecx, esi
jge 0x41d0a0
mov edi, dword [esp]
movzx eax, word [edi + ecx*4]
movzx ebp, word [edi + edx*4]
cmp ax, bp
jb 0x41d027
jmp 0x41d0a7
mov edi, dword [esp]
movzx ebp, word [edi + edx*4]
inc edx
add word [edi + esi*4], bp
jmp 0x41d030
mov edx, dword [esp]
mov ecx, dword [esp + 4]
mov word [edx + ecx*4 - 8], 0
mov eax, ecx
xor eax, 0xfffffffc
and ecx, 0xfffffffc
lea edi, [eax + ecx*2]
inc edi
js 0x41d141
mov ecx, edx
mov eax, dword [esp + 4]
lea edx, [eax + 2]
mov eax, edi
and edx, 3
je 0x41d0f1
mov eax, edi
nop
nop
nop
nop
movzx esi, word [ecx + eax*4]
movzx esi, word [ecx + esi*4]
inc esi
mov word [ecx + eax*4], si
dec eax
dec edx
jne 0x41d0e0
cmp edi, 3
mov edx, ecx
jb 0x41d141
inc eax
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edx + eax*4 - 4]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 4], cx
movzx ecx, word [edx + eax*4 - 8]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 8], cx
movzx ecx, word [edx + eax*4 - 0xc]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0xc], cx
movzx ecx, word [edx + eax*4 - 0x10]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x41d100
mov eax, dword [esp + 4]
lea ecx, [eax - 2]
dec eax
mov esi, 1
xor edi, edi
jmp 0x41d16d
mov esi, ebp
add esi, ebp
inc edi
test ebp, ebp
jle 0x41d222
test ecx, ecx
js 0x41d1a0
lea ebx, [ecx + 1]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [edx + ecx*4]
cmp edi, edx
jne 0x41d1b0
inc ebp
dec ecx
cmp ebx, ebp
mov edx, dword [esp]
jne 0x41d180
mov ecx, 0xffffffff
mov ebp, ebx
jmp 0x41d1b3
xor ebp, ebp
jmp 0x41d1b3
mov edx, dword [esp]
mov ebx, esi
sub ebx, ebp
jle 0x41d160
mov dword [esp + 0x10], ebp
not ebp
add ebp, esi
and ebx, 3
je 0x41d1e6
mov dword [esp + 0x1c], ebp
lea edx, [edx + eax*4]
xor ebp, ebp
nop
mov word [edx], di
inc ebp
add edx, 0xfffffffc
cmp ebx, ebp
jne 0x41d1d0
sub esi, ebp
sub eax, ebp
mov edx, dword [esp]
mov ebp, dword [esp + 0x1c]
cmp ebp, 3
mov ebp, dword [esp + 0x10]
jb 0x41d160
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edx + eax*4], di
mov word [edx + eax*4 - 4], di
mov word [edx + eax*4 - 8], di
mov word [edx + eax*4 - 0xc], di
add eax, 0xfffffffc
add esi, 0xfffffffc
cmp esi, ebp
jg 0x41d200
jmp 0x41d160
cmp dword [esp + 4], 0
jle 0x41d355
mov ebp, dword [esp + 4]
lea edx, [ebp - 1]
mov eax, ebp
and eax, 3
xor ecx, ecx
cmp edx, 3
mov edi, dword [esp]
jb 0x41d27a
mov edx, ebp
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x28]
add ecx, 4
cmp edx, ecx
jne 0x41d250
test eax, eax
je 0x41d29d
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 + 0x28]
inc edx
cmp eax, edx
jne 0x41d290
cmp ebp, 2
jl 0x41d355
mov esi, dword [esp + 0x15c4]
lea eax, [esi + 1]
cmp eax, 0x21
jge 0x41d320
mov edx, esi
mov ecx, dword [esp + esi*4 + 0x28]
neg edx
and edx, 3
je 0x41d2dc
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + esi*4 + 0x28], ecx
inc eax
dec edx
jne 0x41d2d0
lea edx, [esi - 0x1d]
cmp edx, 3
jb 0x41d318
add eax, 3
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x1c]
mov dword [esp + esi*4 + 0x28], ecx
add ecx, dword [esp + eax*4 + 0x20]
mov dword [esp + esi*4 + 0x28], ecx
add ecx, dword [esp + eax*4 + 0x24]
mov dword [esp + esi*4 + 0x28], ecx
add ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + esi*4 + 0x28], ecx
add eax, 4
cmp eax, 0x24
jne 0x41d2f0
test esi, esi
jle 0x41d605
lea edx, [esi + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x24]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x41d330
mov edi, 1
mov ecx, dword [esp + 0x15c4]
shl edi, cl
cmp eax, edi
jne 0x41d610
mov ebx, dword [esp + 0x14]
shl ebx, 5
mov edi, dword [esp + 0xc]
lea eax, [edi + ebx]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.0041d7b0
add esp, 0xc
mov eax, dword [esp + 0x20]
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.0041d7b0
add esp, 0xc
cmp dword [esp + 0x15c4], 0
mov ebp, dword [esp + 4]
jle 0x41d485
add dword [esp], 0xfffffffe
mov eax, 1
mov dword [esp + 0x14], ebx
jmp 0x41d3ce
inc eax
cmp eax, dword [esp + 0x15c4]
jg 0x41d485
mov ecx, dword [esp + eax*4 + 0x28]
test ecx, ecx
jle 0x41d3c0
mov edx, ecx
and edx, 3
je 0x41d430
mov dword [esp + 0x10], ecx
mov dword [esp + 4], ebp
mov ecx, dword [esp]
lea ebp, [ecx + ebp*4]
xor esi, esi
mov ecx, dword [esp + 0xc]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ebp]
mov ebx, dword [esp + 0x14]
add ebx, ecx
mov byte [edi + ebx + 0x8f12], al
inc esi
add ebp, 0xfffffffc
cmp edx, esi
jne 0x41d400
mov ecx, dword [esp + 0x10]
mov edx, ecx
sub edx, esi
mov ebp, dword [esp + 4]
sub ebp, esi
mov ebx, dword [esp + 0x14]
jmp 0x41d432
mov edx, ecx
cmp ecx, 4
mov edi, dword [esp]
jb 0x41d3c0
dec edx
nop
nop
nop
nop
nop
movzx ecx, word [edi + ebp*4]
mov esi, dword [esp + 0xc]
add esi, ebx
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebp*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebp*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebp*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebp, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x41d440
jmp 0x41d3c0
mov dword [esp + 0x930], 0
mov esi, dword [esp + 0x15c4]
cmp esi, 2
jl 0x41d4cc
xor eax, eax
mov ecx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x24]
add eax, eax
mov dword [esp + ecx*4 + 0x92c], eax
mov edx, ecx
and edx, 1
xor ecx, 1
lea ecx, [ecx + edx*2]
cmp ecx, esi
jle 0x41d4b0
mov ecx, dword [esp + 0x15c0]
test ecx, ecx
jle 0x41d593
xor eax, eax
mov edx, dword [esp + 0x18]
lea edx, [edx + edx*8]
mov esi, edx
shl esi, 5
mov ebx, dword [esp + 0xc]
add esi, ebx
mov dword [esp + 4], esi
shl edx, 6
add edx, ebx
mov dword [esp + 0x14], edx
jmp 0x41d518
mov ecx, dword [esp + 0x14]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c0]
inc eax
cmp eax, ecx
je 0x41d593
mov edx, dword [esp + 4]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x41d513
mov edx, dword [esp + ebx*4 + 0x92c]
lea edi, [edx + 1]
mov dword [esp + ebx*4 + 0x92c], edi
xor edi, edi
cmp bl, 1
je 0x41d57b
mov ebp, ebx
and ebp, 0xfffffffe
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, edx
not esi
or esi, 1
add esi, edx
mov ecx, edx
shr ecx, 1
shl edi, 2
add esi, esi
add esi, 2
or esi, edi
mov edi, ecx
not edi
or edi, 1
add edi, ecx
inc edi
or edi, esi
shr edx, 2
add ebp, 0xfffffffe
jne 0x41d550
test bl, 1
je 0x41d500
add edi, edi
mov ecx, edx
not ecx
or ecx, 1
add ecx, edx
inc ecx
or edi, ecx
jmp 0x41d500
add esp, 0x15ac
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esi
and ecx, 0xfffffffe
mov eax, dword [esp + 0xc]
lea edx, [eax + ebp]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x41d5cb
add eax, 2
cmp ecx, eax
je 0x41ce0c
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x41d5e6
mov word [esp + edi*4 + 0xac], si
mov word [esp + edi*4 + 0xae], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x41d5c0
mov word [esp + edi*4 + 0xac], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0xae], si
inc edi
jmp 0x41d5c0
mov edi, 1
mov ecx, esi
shl edi, cl
xor eax, eax
mov ecx, dword [esp + 0x15c4]
add ecx, ecx
jmp 0x41d629
dec eax
cmp eax, edi
je 0x41d355
mov ebp, dword [esp + 0x15c4]
dec dword [esp + ebp*4 + 0x28]
mov esi, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ebp, 2
jl 0x41d620
dec ebp
mov edx, dword [esp + esi*2 + 0x24]
add esi, 0xfffffffe
test edx, edx
je 0x41d640
dec edx
mov dword [esp + esi*2 + 0x28], edx
and esi, 2
xor ebp, 1
add ebp, esi
add dword [esp + ebp*4 + 0x28], 2
jmp 0x41d620