Function at 0x4074c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15a4
call fcn.00407ee0
mov ebx, dword [esp + 0x15c4]
mov esi, dword [esp + 0x15c0]
mov edi, dword [esp + 0x15bc]
lea eax, [esp + 0x20]
push 0x84
push 0
push eax
call fcn.00408080
add esp, 0xc
cmp dword [esp + 0x15c8], 0
je 0x4075a4
test esi, esi
mov ecx, esi
jle 0x407ac6
xor eax, eax
cmp ecx, 1
je 0x407568
mov ecx, dword [esp + 0x15c0]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x15bc]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0x15b8]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x20]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x20]
add eax, 2
cmp ecx, eax
jne 0x407550
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x407ac6
mov ecx, dword [esp + 0x15bc]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0x15b8]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c0]
inc dword [esp + eax*4 + 0x20]
jmp 0x407ac6
lea ebp, [edi + edi*8]
mov eax, ebp
shl eax, 6
mov dword [esp + 0xc], eax
test esi, esi
jle 0x40766b
cmp esi, 1
jne 0x407935
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x407602
mov ecx, dword [esp + 0x15b8]
mov edx, dword [esp + 0xc]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x407602
mov edx, edi
mov word [esp + edi*4 + 0x4a4], cx
mov word [esp + edi*4 + 0x4a6], ax
inc edx
mov edi, edx
lea eax, [esp + 0x924]
push 0x800
push 0
push eax
call fcn.00408080
add esp, 0xc
mov eax, edi
test edi, edi
sete byte [esp + 3]
je 0x407682
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4a4]
mov edx, ecx
xor edx, 0x3fffff00
mov esi, ecx
or esi, 0xff
and esi, edx
inc dword [esp + esi*4 + 0x924]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd24]
inc eax
cmp edi, eax
jne 0x407630
mov edx, edi
mov eax, dword [esp + 0xd24]
jmp 0x40768b
lea eax, [esp + 0x924]
push 0x800
push 0
push eax
call fcn.00408080
add esp, 0xc
xor edx, edx
mov byte [esp + 3], 1
xor eax, eax
xor ecx, ecx
cmp eax, edx
setne cl
inc ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 4], edx
and edx, 0xfffffffe
mov dword [esp + 0x1c], edx
lea eax, [esp + 0x4a4]
mov dword [esp + 8], eax
lea eax, [esp + 0x1124]
xor ecx, ecx
lea edi, [esp + 0x924]
xor edx, edx
mov dword [esp + 0x14], ebp
jmp 0x4076e8
inc eax
add ecx, 8
add edi, 0x400
mov edx, eax
mov eax, esi
cmp edx, dword [esp + 0x18]
je 0x4077fe
mov dword [esp + 0x10], edx
mov esi, dword [esp + 8]
mov dword [esp + 8], eax
mov edx, 3
xor eax, eax
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0x98], eax
add eax, dword [edi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0x9c], eax
add eax, dword [edi + edx*4 - 8]
mov dword [esp + edx*4 + 0xa0], eax
add eax, dword [edi + edx*4 - 4]
mov dword [esp + edx*4 + 0xa4], eax
add eax, dword [edi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x407700
cmp byte [esp + 3], 0
mov eax, dword [esp + 0x10]
jne 0x4076d0
xor edx, edx
cmp dword [esp + 4], 1
mov ebp, esi
je 0x4077aa
xor edx, edx
nop
nop
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov esi, ebp
mov ebp, dword [esp + eax*4 + 0xa4]
lea ebx, [ebp + 1]
mov dword [esp + eax*4 + 0xa4], ebx
mov eax, dword [esi + edx*4]
mov ebx, dword [esp + 8]
mov dword [ebx + ebp*4], eax
movzx eax, word [esi + edx*4 + 4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xa4]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xa4], ebp
mov ebp, esi
mov eax, dword [esi + edx*4 + 4]
mov esi, dword [esp + 8]
mov dword [esi + ebx*4], eax
mov esi, dword [esp + 0x1c]
add edx, 2
cmp esi, edx
jne 0x407750
test byte [esp + 4], 1
mov ebx, dword [esp + 0x15c4]
mov esi, ebp
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
je 0x4076d0
movzx eax, word [esi + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xa4]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xa4], ebp
mov ebp, dword [esp + 0x14]
mov eax, dword [esi + edx*4]
mov edx, dword [esp + 8]
mov dword [edx + ebx*4], eax
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x15c4]
jmp 0x4076d0
mov esi, dword [esp + 4]
push esi
mov edi, dword [esp + 0xc]
push edi
call fcn.00407c50
add esp, 8
test esi, esi
jle 0x4079b5
mov edx, dword [esp + 4]
mov eax, edx
and eax, 3
xor ecx, ecx
cmp edx, 4
jb 0x40786a
mov edx, dword [esp + 4]
and edx, 0x7ffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x20]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x20]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x20]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x20]
add ecx, 4
cmp edx, ecx
jne 0x407840
test eax, eax
je 0x40788d
lea ecx, [edi + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x20]
inc edx
cmp eax, edx
jne 0x407880
cmp dword [esp + 4], 1
je 0x4079b5
cmp ebx, 0x20
jge 0x407900
mov eax, dword [esp + ebx*4 + 0x20]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x4078bc
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x24]
inc ecx
mov dword [esp + ebx*4 + 0x20], eax
dec edx
jne 0x4078b0
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x4078f8
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x24]
mov dword [esp + ebx*4 + 0x20], eax
add eax, dword [esp + ecx*4 + 0x28]
mov dword [esp + ebx*4 + 0x20], eax
add eax, dword [esp + ecx*4 + 0x2c]
mov dword [esp + ebx*4 + 0x20], eax
add eax, dword [esp + ecx*4 + 0x30]
add ecx, 4
mov dword [esp + ebx*4 + 0x20], eax
cmp ecx, 0x20
jne 0x4078d0
test ebx, ebx
jle 0x4079a5
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x1c]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x407910
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x407c0d
jmp 0x4079b5
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x15b8]
mov edx, dword [esp + 0xc]
add edx, eax
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x40796b
add eax, 2
cmp ecx, eax
je 0x4075c5
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x407986
mov word [esp + edi*4 + 0x4a4], si
mov word [esp + edi*4 + 0x4a6], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x407960
mov word [esp + edi*4 + 0x4a4], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0x4a6], si
inc edi
jmp 0x407960
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x407c0d
shl ebp, 5
mov esi, dword [esp + 0x15b8]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408080
add esp, 0xc
mov eax, dword [esp + 0xc]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408080
add esp, 0xc
test ebx, ebx
jle 0x407abf
add edi, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0x15b8]
mov dword [esp + 8], edi
jmp 0x407a25
mov esi, dword [esp + 4]
mov dword [esp + 4], esi
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
je 0x407abf
mov ecx, dword [esp + eax*4 + 0x20]
test ecx, ecx
jle 0x407a10
mov edx, ecx
and edx, 3
je 0x407a70
mov esi, dword [esp + 4]
lea edi, [edi + esi*4]
xor esi, esi
nop
nop
nop
movzx ebx, word [edi]
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x407a40
sub dword [esp + 4], esi
mov edx, ecx
sub edx, esi
mov ebx, dword [esp + 0x15c4]
mov edi, dword [esp + 8]
jmp 0x407a72
mov edx, ecx
cmp ecx, 4
mov esi, dword [esp + 4]
jb 0x407a14
dec edx
nop
nop
nop
nop
movzx ecx, word [edi + esi*4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 8]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 0xc]
add esi, 0xfffffffc
mov byte [ecx + ebp + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x407a80
jmp 0x407a14
mov ecx, dword [esp + 0x15c0]
mov dword [esp + 0x928], 0
cmp ebx, 2
jl 0x407b2d
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x407ae7
xor eax, eax
mov edx, 2
jmp 0x407b14
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
add eax, dword [esp + edx*4 + 0x24]
add eax, eax
mov dword [esp + edx*4 + 0x92c], eax
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0x930], eax
add edx, 2
cmp ebx, edx
jne 0x407af0
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c0]
je 0x407b2d
add eax, dword [esp + edx*4 + 0x1c]
add eax, eax
mov dword [esp + edx*4 + 0x924], eax
test ecx, ecx
jle 0x407c02
xor eax, eax
mov edx, dword [esp + 0x15bc]
lea edi, [edx + edx*8]
mov edx, edi
shl edx, 5
mov esi, dword [esp + 0x15b8]
add edx, esi
shl edi, 6
add edi, esi
mov dword [esp + 8], edi
jmp 0x407b7c
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c0]
inc eax
cmp eax, ecx
je 0x407c02
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x407b73
mov ecx, dword [esp + ebx*4 + 0x924]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x924], edi
xor edi, edi
cmp bl, 4
jb 0x407bdf
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
shl esi, 2
lea esi, [esi + edi*8]
mov edi, ecx
and edi, 2
or edi, esi
mov esi, ecx
shr esi, 2
and esi, 1
or esi, edi
mov edi, ecx
shr edi, 3
and edi, 1
lea edi, [edi + esi*2]
shr ecx, 4
add ebp, 0xfffffffc
jne 0x407bb0
and ebx, 3
je 0x407b60
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
lea edi, [esi + edi*2]
shr ecx, 1
dec ebx
jne 0x407bf0
jmp 0x407b60
add esp, 0x15a4
pop esi
pop edi
pop ebx
pop ebp
ret
dec dword [esp + ebx*4 + 0x20]
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x407c38
mov esi, dword [esp + ecx*4 + 0x1c]
dec ecx
test esi, esi
je 0x407c20
dec esi
mov dword [esp + ecx*4 + 0x20], esi
add dword [esp + ecx*4 + 0x24], 2
dec eax
cmp eax, edx
jne 0x407c0d
jmp 0x4079b5