Function at 0x41d940
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b8
call fcn.0041e300
mov edi, edx
mov ebx, ecx
mov esi, dword [esp + 0x15cc]
lea eax, [esp + 0x34]
push 0x84
push 0
push eax
call fcn.0041e520
add esp, 0xc
cmp dword [esp + 0x15d4], 0
mov dword [esp + 0x20], edi
je 0x41d9c0
test esi, esi
jle 0x41e0ca
xor eax, eax
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [eax + ecx + 0x8f12]
inc dword [esp + edx*4 + 0x34]
mov edx, eax
xor edx, 1
and eax, 1
lea eax, [edx + eax*2]
cmp eax, esi
jl 0x41d9a0
jmp 0x41e0ca
lea eax, [edi + edi*8]
mov dword [esp + 0x28], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], eax
jle 0x41dab9
cmp esi, 1
jne 0x41e22d
mov edi, ebx
xor ebx, ebx
xor eax, eax
mov ecx, dword [esp + 0x15cc]
test cl, 1
je 0x41da1b
mov ecx, dword [esp + 0x1c]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x41da1b
mov word [esp + ebx*4 + 0x4b8], cx
mov word [esp + ebx*4 + 0x4ba], ax
inc ebx
lea eax, [esp + 0x938]
push 0x800
push 0
push eax
call fcn.0041e520
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x41dad0
xor eax, eax
cmp ebx, 1
je 0x41da8f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
movzx edx, word [esp + eax*4 + 0x4b8]
movzx esi, dl
inc dword [esp + esi*4 + 0x938]
shr edx, 8
inc dword [esp + edx*4 + 0xd38]
movzx edx, word [esp + eax*4 + 0x4bc]
movzx esi, dl
inc dword [esp + esi*4 + 0x938]
shr edx, 8
inc dword [esp + edx*4 + 0xd38]
add eax, 2
cmp ecx, eax
jne 0x41da50
test bl, 1
je 0x41dab0
movzx eax, word [esp + eax*4 + 0x4b8]
movzx ecx, al
inc dword [esp + ecx*4 + 0x938]
shr eax, 8
inc dword [esp + eax*4 + 0xd38]
mov eax, dword [esp + 0xd38]
jmp 0x41dad9
lea eax, [esp + 0x938]
push 0x800
push 0
push eax
call fcn.0041e520
add esp, 0xc
xor ebx, ebx
mov byte [esp + 7], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x30], eax
lea eax, [ebx - 1]
mov dword [esp + 0x14], eax
mov eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0x18], eax
lea eax, [esp + 0x4b8]
mov dword [esp], eax
lea eax, [esp + 0x1138]
xor ecx, ecx
lea esi, [esp + 0x938]
xor edx, edx
mov dword [esp + 8], ebx
jmp 0x41db36
inc edx
add ecx, 8
add esi, 0x400
mov eax, edi
cmp edx, dword [esp + 0x30]
je 0x41dc53
mov edi, dword [esp]
mov dword [esp], eax
mov ebp, 3
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + ebp*4 + 0xac], eax
add eax, dword [esi + ebp*4 - 0xc]
mov dword [esp + ebp*4 + 0xb0], eax
add eax, dword [esi + ebp*4 - 8]
mov dword [esp + ebp*4 + 0xb4], eax
add eax, dword [esi + ebp*4 - 4]
mov dword [esp + ebp*4 + 0xb8], eax
add eax, dword [esi + ebp*4]
add ebp, 4
cmp ebp, 0x103
jne 0x41db50
cmp byte [esp + 7], 0
jne 0x41db20
mov dword [esp + 0x2c], esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x24], edx
cmp dword [esp + 0x14], 0
je 0x41dc04
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + 0xc]
movzx eax, word [esi + ebp*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xb8]
lea edx, [ebx + 1]
mov dword [esp + eax*4 + 0xb8], edx
mov eax, dword [esi + ebp*4]
mov edi, dword [esp]
mov dword [edi + ebx*4], eax
movzx eax, word [esi + ebp*4 + 4]
shr eax, cl
movzx eax, al
mov edx, dword [esp + eax*4 + 0xb8]
lea ebx, [edx + 1]
mov dword [esp + eax*4 + 0xb8], ebx
mov eax, dword [esi + ebp*4 + 4]
mov dword [edi + edx*4], eax
add ebp, 2
cmp dword [esp + 0x18], ebp
jne 0x41dbb0
jmp 0x41dc06
xor ebp, ebp
mov ebx, dword [esp + 8]
test bl, 1
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x2c]
je 0x41db20
movzx eax, word [edi + ebp*4]
shr eax, cl
movzx eax, al
mov edx, dword [esp + eax*4 + 0xb8]
lea ebx, [edx + 1]
mov dword [esp + eax*4 + 0xb8], ebx
mov ebx, dword [esp + 8]
mov eax, dword [edi + ebp*4]
mov edi, dword [esp]
mov dword [edi + edx*4], eax
mov edi, dword [esp + 0xc]
mov edx, dword [esp + 0x24]
jmp 0x41db20
test ebx, ebx
je 0x41dfa5
mov ebx, dword [esp + 8]
cmp ebx, 1
jne 0x41dc71
mov eax, dword [esp]
mov word [eax], 1
jmp 0x41deba
mov edi, dword [esp]
movzx eax, word [edi + 4]
add word [edi], ax
cmp dword [esp + 0x14], 2
jl 0x41dd30
mov eax, 2
mov ecx, 2
sub ecx, ebx
xor edx, edx
mov esi, 1
jmp 0x41dcb7
inc eax
add word [ebp + esi*4], di
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
mov ebx, dword [esp + 8]
mov edi, dword [esp]
je 0x41dd30
cmp eax, ebx
jge 0x41dd00
movzx ebx, word [edi + edx*4]
mov ebp, edi
movzx edi, word [edi + eax*4]
cmp bx, di
jb 0x41dd06
mov ebx, eax
and ebx, 1
xor eax, 1
lea eax, [eax + ebx*2]
mov word [ebp + esi*4], di
cmp eax, dword [esp + 8]
jl 0x41dd17
movzx ebx, word [ebp + edx*4]
add word [ebp + esi*4], bx
mov word [ebp + edx*4], si
inc edx
jmp 0x41dca6
movzx ebx, word [edi + edx*4]
mov ebp, edi
mov word [ebp + esi*4], bx
mov word [ebp + edx*4], si
inc edx
cmp eax, dword [esp + 8]
jge 0x41dce0
movzx edi, word [ebp + eax*4]
cmp edx, esi
jge 0x41dca0
movzx ebx, word [ebp + edx*4]
cmp bx, di
jae 0x41dca0
jmp 0x41dce5
mov word [edi + ebx*4 - 8], 0
mov ecx, ebx
add ecx, 0xfffffffd
js 0x41ddb1
lea edx, [ebx + 2]
mov eax, ecx
and edx, 3
je 0x41dd61
mov eax, ecx
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + eax*4]
movzx esi, word [edi + esi*4]
inc esi
mov word [edi + eax*4], si
dec eax
dec edx
jne 0x41dd50
cmp ecx, 3
jb 0x41ddb1
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + eax*4 - 4]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 4], cx
movzx ecx, word [edi + eax*4 - 8]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 8], cx
movzx ecx, word [edi + eax*4 - 0xc]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 0xc], cx
movzx ecx, word [edi + eax*4 - 0x10]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x41dd70
lea ecx, [ebx - 2]
mov esi, 1
xor edx, edx
mov eax, dword [esp + 0x14]
jmp 0x41ddf3
mov esi, ebp
and esi, 2
mov edi, ebp
or ebp, 2
imul ebp, esi
xor esi, 2
and edi, 0xfffffffd
imul edi, esi
add ebp, edi
inc edx
mov esi, ebp
test ebp, ebp
jle 0x41deb2
test ecx, ecx
js 0x41de20
lea ebp, [ecx + 1]
xor edi, edi
nop
nop
nop
nop
mov ebx, dword [esp]
movzx ebx, word [ebx + ecx*4]
cmp edx, ebx
jne 0x41de30
inc edi
dec ecx
cmp ebp, edi
jne 0x41de00
mov ecx, 0xffffffff
jmp 0x41de32
xor ebp, ebp
jmp 0x41de36
mov ebp, edi
mov ebx, dword [esp + 8]
mov edi, esi
sub edi, ebp
jle 0x41ddd0
mov ebx, ebp
not ebp
add ebp, esi
mov dword [esp + 0xc], ebp
and edi, 3
je 0x41de79
mov dword [esp + 0x18], ebx
mov ebx, dword [esp]
lea ebx, [ebx + eax*4]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx], dx
inc ebp
add ebx, 0xfffffffc
cmp edi, ebp
jne 0x41de60
sub esi, ebp
sub eax, ebp
mov ebx, dword [esp + 8]
mov ebp, dword [esp + 0x18]
jmp 0x41de7f
mov ebp, ebx
mov ebx, dword [esp + 8]
cmp dword [esp + 0xc], 3
mov edi, dword [esp]
jb 0x41ddd0
nop
nop
nop
mov word [edi + eax*4], dx
mov word [edi + eax*4 - 4], dx
mov word [edi + eax*4 - 8], dx
mov word [edi + eax*4 - 0xc], dx
add eax, 0xfffffffc
add esi, 0xfffffffc
cmp esi, ebp
jg 0x41de90
jmp 0x41ddd0
test ebx, ebx
jle 0x41dfa5
mov edi, dword [esp + 8]
mov eax, edi
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x14], 3
mov ebx, dword [esp]
jb 0x41df0a
mov edx, edi
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ebx + ecx*4]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [ebx + ecx*4 + 4]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [ebx + ecx*4 + 8]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [ebx + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x34]
add ecx, 4
cmp edx, ecx
jne 0x41dee0
test eax, eax
je 0x41df2d
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 + 0x34]
inc edx
cmp eax, edx
jne 0x41df20
cmp edi, 2
jl 0x41dfa5
mov edx, dword [esp + 0x15d0]
cmp edx, 0x20
jge 0x41df77
lea eax, [edx + 1]
mov ecx, dword [esp + edx*4 + 0x34]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x34]
mov dword [esp + edx*4 + 0x34], ecx
mov edx, eax
and edx, 1
xor eax, 1
lea eax, [eax + edx*2]
mov edx, dword [esp + 0x15d0]
cmp eax, 0x21
jl 0x41df50
test edx, edx
jle 0x41e295
inc edx
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x30]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x41df80
mov edx, 1
mov ecx, dword [esp + 0x15d0]
shl edx, cl
cmp eax, edx
jne 0x41e2a0
mov edi, dword [esp + 0x28]
shl edi, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + edi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.0041e520
add esp, 0xc
mov eax, dword [esp + 0x1c]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.0041e520
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov ebx, dword [esp + 8]
jle 0x41e0c6
add dword [esp], 0xfffffffe
mov eax, 1
jmp 0x41e012
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15d0]
mov eax, ecx
je 0x41e0c6
mov ebp, dword [esp + eax*4 + 0x34]
test ebp, ebp
jle 0x41e000
mov edx, ebp
and edx, 3
je 0x41e070
mov dword [esp + 0xc], ebp
mov ecx, edi
mov dword [esp + 8], ebx
mov esi, dword [esp]
lea edi, [esi + ebx*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, word [edi]
mov ebp, dword [esp + 0x10]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x41e040
mov ebx, dword [esp + 8]
sub ebx, esi
mov ebp, dword [esp + 0xc]
mov edx, ebp
sub edx, esi
mov edi, ecx
jmp 0x41e072
mov edx, ebp
cmp ebp, 4
mov ebp, dword [esp]
jb 0x41e000
dec edx
nop
nop
nop
nop
nop
movzx ecx, word [ebp + ebx*4]
mov esi, dword [esp + 0x10]
add esi, edi
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x41e080
jmp 0x41e000
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x93c], 0
mov ecx, dword [esp + 0x15d0]
cmp ecx, 2
jl 0x41e147
lea eax, [ecx - 1]
cmp ecx, 2
jne 0x41e0f6
mov edx, 2
xor ecx, ecx
test al, 1
jne 0x41e13a
jmp 0x41e147
mov esi, ebx
mov ebx, eax
and ebx, 0xfffffffe
xor ecx, ecx
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + edx*4 + 0x38]
add ecx, ecx
mov dword [esp + edx*4 + 0x940], ecx
add ecx, dword [esp + edx*4 + 0x3c]
add ecx, ecx
mov dword [esp + edx*4 + 0x944], ecx
add edx, 2
cmp ebx, edx
jne 0x41e110
add edx, 2
mov ebx, esi
test al, 1
je 0x41e147
add ecx, dword [esp + edx*4 + 0x30]
add ecx, ecx
mov dword [esp + edx*4 + 0x938], ecx
mov ecx, dword [esp + 0x15cc]
test ecx, ecx
jle 0x41e222
xor eax, eax
mov edx, dword [esp + 0x20]
lea edx, [edx + edx*8]
mov esi, edx
shl esi, 5
add esi, ebx
mov dword [esp], esi
shl edx, 6
add edx, ebx
mov dword [esp + 0x10], edx
jmp 0x41e19c
mov ecx, dword [esp + 0x10]
mov word [ecx + eax*2 + 0x8852], bx
mov ecx, dword [esp + 0x15cc]
inc eax
cmp eax, ecx
je 0x41e222
mov edx, dword [esp]
movzx edx, byte [eax + edx + 0x8f12]
test edx, edx
je 0x41e193
mov ecx, dword [esp + edx*4 + 0x938]
lea esi, [ecx + 1]
mov dword [esp + edx*4 + 0x938], esi
mov esi, edx
and esi, 3
xor ebx, ebx
cmp dl, 4
jb 0x41e1ff
and edx, 0xfffffffc
xor ebx, ebx
nop
nop
nop
mov ebp, ecx
shr ebp, 2
mov edi, ecx
and edi, 1
shl edi, 2
lea edi, [edi + ebx*8]
mov ebx, ecx
and ebx, 2
or ebx, edi
mov edi, ecx
shr edi, 3
and ebp, 1
or ebp, ebx
shr ecx, 4
and edi, 1
lea ebx, [edi + ebp*2]
add edx, 0xfffffffc
jne 0x41e1d0
test esi, esi
je 0x41e180
mov edx, ecx
nop
nop
nop
nop
nop
nop
nop
shr edx, 1
and ecx, 1
lea ebx, [ecx + ebx*2]
mov ecx, edx
dec esi
jne 0x41e210
jmp 0x41e180
add esp, 0x15b8
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esi
and ecx, 0xfffffffe
mov edi, ebx
lea edx, [eax + ebx]
add edx, 0x8194
xor ebx, ebx
xor eax, eax
jmp 0x41e25b
add eax, 2
cmp ecx, eax
je 0x41d9e9
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x41e276
mov word [esp + ebx*4 + 0x4b8], si
mov word [esp + ebx*4 + 0x4ba], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x41e250
mov word [esp + ebx*4 + 0x4b8], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4ba], si
inc ebx
jmp 0x41e250
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
mov edi, dword [esp + 0x15d0]
mov esi, edi
or esi, 0xfffffffe
and edi, 0xfffffffe
lea ecx, [esi + edi]
inc ecx
add esi, edi
add esi, 2
jmp 0x41e2d3
dec ebx
mov dword [esp + edi*4 + 0x30], ebx
add dword [esp + edi*4 + 0x34], 2
dec eax
cmp eax, edx
je 0x41dfa5
mov edi, dword [esp + 0x15d0]
dec dword [esp + edi*4 + 0x34]
test ecx, ecx
jle 0x41e2ca
mov edi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, dword [esp + edi*4 + 0x30]
test ebx, ebx
jne 0x41e2c0
dec edi
cmp edi, 1
jg 0x41e2f0
jmp 0x41e2ca