Function at 0x4079d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.004083b0
mov edi, edx
mov dword [esp + 0x10], ecx
mov ebx, dword [esp + 0x15c8]
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.00408680
add esp, 0xc
cmp dword [esp + 0x15cc], 0
je 0x407a9a
test esi, esi
mov ecx, esi
jle 0x407f9a
xor eax, eax
cmp ecx, 1
je 0x407a68
mov ecx, dword [esp + 0x15c4]
and ecx, 0x7ffffffe
lea eax, [edi + edi*8]
shl eax, 5
mov edx, dword [esp + 0x10]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
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 0x407a50
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x407f9a
lea ecx, [edi + edi*8]
shl ecx, 5
add ecx, dword [esp + 0x10]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c4]
inc dword [esp + eax*4 + 0x2c]
jmp 0x407f9a
lea eax, [edi + edi*8]
mov dword [esp + 0x1c], eax
mov ecx, eax
shl ecx, 6
test esi, esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], ecx
jle 0x407bab
mov eax, dword [esp + 0x10]
add eax, ecx
add eax, 0x8192
xor ecx, ecx
xor edi, edi
jmp 0x407ae4
mov edx, ecx
and edx, 1
xor ecx, 1
lea ecx, [ecx + edx*2]
cmp ecx, dword [esp + 0x15c4]
jge 0x407b00
movzx edx, word [eax + ecx*2]
test dx, dx
je 0x407ad0
mov word [esp + edi*4 + 0xcb0], dx
mov word [esp + edi*4 + 0xcb2], cx
inc edi
jmp 0x407ad0
lea eax, [esp + 0x4b0]
push 0x800
push 0
push eax
call fcn.00408680
add esp, 0xc
test edi, edi
sete byte [esp + 3]
je 0x407bc2
mov ecx, edi
xor eax, eax
cmp edi, 1
je 0x407b7f
mov ecx, edi
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xcb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x4b0]
shr edx, 8
inc dword [esp + edx*4 + 0x8b0]
movzx edx, word [esp + eax*4 + 0xcb4]
movzx esi, dl
inc dword [esp + esi*4 + 0x4b0]
shr edx, 8
inc dword [esp + edx*4 + 0x8b0]
add eax, 2
cmp ecx, eax
jne 0x407b40
mov edx, edi
test dl, 1
je 0x407ba2
movzx eax, word [esp + eax*4 + 0xcb0]
movzx ecx, al
inc dword [esp + ecx*4 + 0x4b0]
shr eax, 8
inc dword [esp + eax*4 + 0x8b0]
mov eax, dword [esp + 0x8b0]
jmp 0x407bcb
lea eax, [esp + 0x4b0]
push 0x800
push 0
push eax
call fcn.00408680
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 + 0x24], ecx
mov dword [esp + 4], edx
mov ebx, edx
and ebx, 0xfffffffe
lea edx, [esp + 0xcb0]
lea eax, [esp + 0x1130]
xor ecx, ecx
lea esi, [esp + 0x4b4]
xor edi, edi
mov dword [esp + 0x28], ebx
jmp 0x407c1a
inc edi
add ecx, 8
add esi, 0x400
mov eax, ebp
cmp edi, dword [esp + 0x24]
mov edx, dword [esp + 8]
je 0x407d28
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xb0], eax
mov ebp, dword [esi + edx*4 - 4]
mov ebx, ebp
and ebx, eax
xor ebp, eax
lea eax, [ebx*2]
add eax, ebp
mov dword [esp + edx*4 + 0xb4], eax
mov ebx, dword [esi + edx*4]
mov ebp, ebx
and ebp, eax
xor ebx, eax
lea eax, [ebx + ebp*2]
add edx, 2
cmp edx, 0x100
jne 0x407c30
cmp byte [esp + 3], 0
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0xc]
jne 0x407c00
xor edx, edx
cmp dword [esp + 4], 1
mov edi, dword [esp + 8]
je 0x407cea
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xb0]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xb0], ebp
mov eax, dword [esp + 0xc]
mov eax, dword [eax + edx*4]
mov dword [edi + ebx*4], eax
mov eax, dword [esp + 0xc]
movzx eax, word [eax + edx*4 + 4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xb0]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xb0], ebp
mov ebp, dword [esp + 0xc]
mov eax, dword [ebp + edx*4 + 4]
mov dword [edi + ebx*4], eax
mov ebx, dword [esp + 0x28]
add edx, 2
cmp ebx, edx
jne 0x407c90
test byte [esp + 4], 1
mov edi, dword [esp + 0x14]
je 0x407c00
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xb0]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xb0], ebp
mov ebp, dword [esp + 0xc]
mov eax, dword [ebp + edx*4]
mov edx, dword [esp + 8]
mov dword [edx + ebx*4], eax
jmp 0x407c00
mov esi, dword [esp + 4]
push esi
push edx
call fcn.00408120
add esp, 8
test esi, esi
mov ebx, dword [esp + 0x15c8]
jle 0x407e72
mov edx, dword [esp + 4]
mov eax, edx
and eax, 3
xor ecx, ecx
cmp edx, 4
mov edi, dword [esp + 8]
jb 0x407d9a
mov edx, dword [esp + 4]
and edx, 0x7ffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x2c]
add ecx, 4
cmp edx, ecx
jne 0x407d70
test eax, eax
je 0x407dbd
mov edx, dword [esp + 8]
lea ecx, [edx + ecx*4]
xor edx, edx
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 0x407db0
cmp dword [esp + 4], 1
je 0x407e72
cmp ebx, 0x20
jge 0x407e2c
mov eax, dword [esp + ebx*4 + 0x2c]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x407dec
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
inc ecx
mov dword [esp + ebx*4 + 0x2c], eax
dec edx
jne 0x407de0
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x407e28
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 0x407e00
test ebx, ebx
jle 0x407e62
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 0x407e40
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x4080dd
jmp 0x407e72
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x4080dd
mov esi, dword [esp + 0x1c]
shl esi, 5
mov ebp, dword [esp + 0x10]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408680
add esp, 0xc
mov eax, dword [esp + 0x18]
add eax, ebp
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408680
add esp, 0xc
test ebx, ebx
jle 0x407f8f
add dword [esp + 8], 0xfffffffe
mov eax, 1
add esi, dword [esp + 0x10]
jmp 0x407ee5
mov ebp, dword [esp + 4]
mov dword [esp + 4], ebp
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
je 0x407f8f
mov ecx, dword [esp + eax*4 + 0x2c]
test ecx, ecx
jle 0x407ed0
mov edx, ecx
and edx, 3
je 0x407f40
mov edi, dword [esp + 4]
mov ebx, dword [esp + 8]
lea edi, [ebx + edi*4]
mov ebp, esi
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, word [edi]
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x407f10
sub dword [esp + 4], esi
mov edx, ecx
sub edx, esi
mov ebx, dword [esp + 0x15c8]
mov esi, ebp
jmp 0x407f42
mov edx, ecx
cmp ecx, 4
mov ebp, dword [esp + 4]
mov edi, dword [esp + 8]
jb 0x407ed4
dec edx
movzx ecx, word [edi + ebp*4]
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]
add ebp, 0xfffffffc
mov byte [ecx + esi + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x407f50
jmp 0x407ed4
mov ecx, dword [esp + 0x15c4]
mov edi, dword [esp + 0x20]
mov dword [esp + 0x4b4], 0
cmp ebx, 2
jl 0x40800d
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x407fbb
xor eax, eax
mov edx, 2
jmp 0x407ff4
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x4b8], eax
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x4bc], eax
add edx, 2
cmp ebx, edx
jne 0x407fd0
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c4]
je 0x40800d
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0x4b0], eax
test ecx, ecx
jle 0x4080d2
xor eax, eax
lea edi, [edi + edi*8]
mov edx, edi
shl edx, 5
mov esi, dword [esp + 0x10]
add edx, esi
shl edi, 6
add edi, esi
mov dword [esp + 0xc], edi
jmp 0x40804c
mov ecx, dword [esp + 0xc]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c4]
inc eax
cmp eax, ecx
je 0x4080d2
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x408043
mov ecx, dword [esp + ebx*4 + 0x4b0]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x4b0], edi
xor edi, edi
cmp bl, 4
jb 0x4080af
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 0x408080
and ebx, 3
je 0x408030
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 0x4080c0
jmp 0x408030
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
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x408108
mov esi, dword [esp + ecx*4 + 0x28]
dec ecx
test esi, esi
je 0x4080f0
dec esi
mov dword [esp + ecx*4 + 0x2c], esi
add dword [esp + ecx*4 + 0x30], 2
dec eax
cmp eax, edx
jne 0x4080dd
jmp 0x407e72