Function at 0x407b30
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b8
call fcn.00408510
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15cc]
lea eax, [esp + 0x34]
push 0x84
push 0
push eax
call fcn.00408720
add esp, 0xc
cmp dword [esp + 0x15d4], 0
mov dword [esp + 0x18], ebx
je 0x407bec
test esi, esi
mov ecx, esi
jle 0x40835e
xor eax, eax
cmp ecx, 1
je 0x407bb8
mov ecx, dword [esp + 0x15cc]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x34]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x34]
add eax, 2
cmp ecx, eax
jne 0x407ba0
mov ecx, dword [esp + 0x15cc]
test cl, 1
je 0x40835e
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15cc]
inc dword [esp + eax*4 + 0x34]
jmp 0x40835e
lea ebp, [ebx + ebx*8]
mov eax, ebp
shl eax, 6
test esi, esi
mov dword [esp + 0x24], eax
jle 0x407cb3
cmp esi, 1
jne 0x407f0b
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15cc]
test cl, 1
je 0x407c3f
mov ecx, dword [esp + 0x24]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x407c3f
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.00408720
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x407cca
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4b8]
mov edx, ecx
xor edx, 0x3fffff00
mov esi, ecx
or esi, 0xff
and esi, edx
inc dword [esp + esi*4 + 0x938]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd38]
mov ecx, eax
xor ecx, 1
and eax, 1
lea eax, [ecx + eax*2]
cmp eax, ebx
jb 0x407c70
mov eax, dword [esp + 0xd38]
jmp 0x407cd3
lea eax, [esp + 0x938]
push 0x800
push 0
push eax
call fcn.00408720
add esp, 0xc
xor ebx, ebx
mov byte [esp + 7], 1
xor eax, eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x28], edi
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 + 0x1c], eax
mov eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0x20], eax
lea esi, [esp + 0x1138]
lea edx, [esp + 0x4b8]
xor ecx, ecx
lea eax, [esp + 0x938]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
jmp 0x407d4e
mov edi, dword [esp + 0x10]
inc edi
add ecx, 8
add eax, 0x400
mov edx, dword [esp]
mov dword [esp + 0x10], edi
cmp edi, dword [esp + 0x30]
je 0x407e4b
mov dword [esp], esi
mov esi, edx
mov ebp, 3
xor edx, edx
nop
nop
nop
nop
nop
nop
mov dword [esp + ebp*4 + 0xac], edx
add edx, dword [eax + ebp*4 - 0xc]
mov dword [esp + ebp*4 + 0xb0], edx
add edx, dword [eax + ebp*4 - 8]
mov dword [esp + ebp*4 + 0xb4], edx
add edx, dword [eax + ebp*4 - 4]
mov dword [esp + ebp*4 + 0xb8], edx
add edx, dword [eax + ebp*4]
add ebp, 4
cmp ebp, 0x103
jne 0x407d60
cmp byte [esp + 7], 0
jne 0x407d30
mov dword [esp + 0x2c], eax
mov dword [esp + 8], esi
cmp dword [esp + 0x1c], 0
je 0x407e04
xor ebp, ebp
nop
nop
mov eax, dword [esp + 8]
movzx edx, word [eax + ebp*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb8]
lea edi, [ebx + 1]
mov dword [esp + edx*4 + 0xb8], edi
mov edx, dword [eax + ebp*4]
mov esi, dword [esp]
mov dword [esi + ebx*4], edx
movzx edx, word [eax + ebp*4 + 4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb8]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb8], ebx
mov edx, dword [eax + ebp*4 + 4]
mov dword [esi + edi*4], edx
add ebp, 2
cmp dword [esp + 0x20], ebp
jne 0x407db0
jmp 0x407e06
xor ebp, ebp
mov ebx, dword [esp + 0xc]
test bl, 1
mov esi, dword [esp + 8]
mov eax, dword [esp + 0x2c]
je 0x407d30
movzx edx, word [esi + ebp*4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb8]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb8], ebx
mov ebx, dword [esp + 0xc]
mov edx, dword [esi + ebp*4]
mov esi, dword [esp]
mov dword [esi + edi*4], edx
mov esi, dword [esp + 8]
jmp 0x407d30
test ebx, ebx
je 0x408215
cmp ebx, 1
jne 0x407e65
mov eax, dword [esp]
mov word [eax], 1
jmp 0x4080ea
mov edi, dword [esp]
movzx eax, word [edi + 4]
add word [edi], ax
cmp ebx, 3
jl 0x407f65
mov eax, 2
mov ecx, 2
sub ecx, ebx
mov dword [esp + 8], ecx
xor edx, edx
mov esi, 1
jmp 0x407ebe
movzx ecx, word [edi + edx*4]
add word [edi + esi*4], cx
mov word [edi + edx*4], si
inc edx
mov ecx, dword [esp + 8]
add ecx, esi
inc ecx
inc esi
cmp ecx, 1
je 0x407f78
movzx ecx, word [edi + edx*4]
cmp eax, ebx
jge 0x407ecf
movzx ebp, word [edi + eax*4]
cmp cx, bp
jae 0x407ee0
mov word [edi + esi*4], cx
mov word [edi + edx*4], si
inc edx
cmp eax, ebx
jge 0x407ea0
jmp 0x407ee9
inc eax
mov word [edi + esi*4], bp
cmp eax, ebx
jge 0x407ea0
cmp edx, esi
jge 0x407f00
movzx ecx, word [edi + edx*4]
movzx ebp, word [edi + eax*4]
cmp cx, bp
jb 0x407ea4
jmp 0x407f04
movzx ebp, word [edi + eax*4]
inc eax
add word [edi + esi*4], bp
jmp 0x407ead
mov ecx, esi
and ecx, 0xfffffffe
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x407f2b
add eax, 2
cmp ecx, eax
je 0x407c0d
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x407f46
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 0x407f20
mov word [esp + ebx*4 + 0x4b8], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4ba], si
inc ebx
jmp 0x407f20
lea eax, [ebx - 2]
mov dword [esp + 8], eax
mov word [edi + ebx*4 - 8], 0
jmp 0x408001
lea esi, [ebx - 2]
mov word [edi + ebx*4 - 8], 0
lea edx, [ebx - 3]
mov dword [esp + 8], esi
mov eax, edx
and esi, 3
je 0x407fb1
mov eax, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + eax*4]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4], cx
dec eax
dec esi
jne 0x407fa0
cmp edx, 3
jb 0x408001
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 0x407fc0
mov esi, 1
xor edx, edx
mov eax, dword [esp + 0x1c]
jmp 0x408021
mov ebx, dword [esp + 0xc]
mov esi, ebp
add esi, ebp
inc edx
test ebp, ebp
jle 0x4080e2
mov ecx, dword [esp + 8]
test ecx, ecx
js 0x408050
lea ebx, [ecx + 1]
xor ebp, ebp
mov edi, ecx
mov ecx, dword [esp]
movzx ecx, word [ecx + edi*4]
cmp edx, ecx
jne 0x408060
inc ebp
dec edi
cmp ebx, ebp
jne 0x408030
mov dword [esp + 8], 0xffffffff
mov edi, dword [esp]
mov ebp, ebx
jmp 0x408067
xor ebp, ebp
jmp 0x408067
mov dword [esp + 8], edi
mov edi, dword [esp]
mov ebx, esi
sub ebx, ebp
jle 0x408010
mov ecx, ebp
not ecx
add ecx, esi
and ebx, 3
je 0x4080aa
mov dword [esp + 0x10], ecx
mov dword [esp + 0x20], ebp
lea ecx, [edi + eax*4]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ecx], dx
inc ebp
add ecx, 0xfffffffc
cmp ebx, ebp
jne 0x408090
sub esi, ebp
sub eax, ebp
mov edi, dword [esp]
mov ebp, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0xc]
cmp ecx, 3
jb 0x408014
nop
nop
nop
nop
nop
nop
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 0x4080c0
jmp 0x408014
test ebx, ebx
jle 0x408215
mov eax, ebx
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x1c], 3
mov edi, dword [esp]
jb 0x40813a
mov edx, ebx
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x34]
add ecx, 4
cmp edx, ecx
jne 0x408110
test eax, eax
je 0x40815d
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 + 0x34]
inc edx
cmp eax, edx
jne 0x408150
cmp ebx, 2
jl 0x408215
mov edx, dword [esp + 0x15d0]
lea eax, [edx + 1]
cmp eax, 0x21
jge 0x4081e0
mov ecx, dword [esp + edx*4 + 0x34]
neg edx
mov esi, dword [esp + 0x15d0]
and edx, 3
je 0x40819c
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x34]
mov dword [esp + esi*4 + 0x34], ecx
inc eax
dec edx
jne 0x408190
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x4081d8
add eax, 3
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + edx*4 + 0x34], ecx
add ecx, dword [esp + eax*4 + 0x2c]
mov dword [esp + edx*4 + 0x34], ecx
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + edx*4 + 0x34], ecx
add ecx, dword [esp + eax*4 + 0x34]
mov dword [esp + edx*4 + 0x34], ecx
add eax, 4
cmp eax, 0x24
jne 0x4081b0
test edx, edx
jle 0x40849d
inc edx
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
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 0x4081f0
mov edx, 1
mov ecx, dword [esp + 0x15d0]
shl edx, cl
cmp eax, edx
jne 0x4084a8
mov ebx, dword [esp + 0x14]
shl ebx, 5
mov edi, dword [esp + 0x28]
lea eax, [edi + ebx]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408720
add esp, 0xc
mov eax, dword [esp + 0x24]
mov esi, edi
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408720
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov edi, dword [esp]
jle 0x408355
add edi, 0xfffffffe
mov eax, 1
mov dword [esp], edi
mov dword [esp + 0x14], ebx
jmp 0x40829e
mov ebp, dword [esp + 0xc]
mov ebx, esi
mov esi, ebx
mov dword [esp + 0xc], ebp
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15d0]
mov eax, ecx
je 0x408355
mov ebp, dword [esp + eax*4 + 0x34]
test ebp, ebp
jle 0x408280
mov edx, ebp
and edx, 3
je 0x4082f0
mov dword [esp + 8], ebp
mov ecx, esi
mov esi, dword [esp + 0xc]
lea ebp, [edi + esi*4]
xor esi, esi
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 0x4082c0
sub dword [esp + 0xc], esi
mov ebp, dword [esp + 8]
mov edx, ebp
sub edx, esi
mov esi, ecx
jmp 0x4082f2
mov edx, ebp
cmp ebp, 4
mov ebp, dword [esp + 0xc]
mov edi, dword [esp]
mov ebx, esi
jb 0x408286
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + ebp*4]
mov esi, dword [esp + 0x14]
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 0x408310
jmp 0x408286
mov ecx, dword [esp + 0x15cc]
mov edi, esi
mov dword [esp + 0x93c], 0
mov eax, dword [esp + 0x15d0]
cmp eax, 2
jl 0x4083cd
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408386
xor eax, eax
mov edx, 2
jmp 0x4083b4
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
add eax, dword [esp + edx*4 + 0x3c]
add eax, eax
mov dword [esp + edx*4 + 0x944], eax
add edx, 2
cmp ebx, edx
jne 0x408390
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15cc]
je 0x4083cd
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x938], eax
test ecx, ecx
jle 0x408492
xor eax, eax
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, edi
shl ecx, 6
add ecx, edi
mov dword [esp], ecx
jmp 0x408409
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], bx
inc eax
cmp eax, dword [esp + 0x15cc]
je 0x408492
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x4083fb
mov ebp, dword [esp + ecx*4 + 0x938]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x938], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x40846f
and ecx, 0xfffffffc
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ebp
and esi, 1
shl esi, 2
lea esi, [esi + ebx*8]
mov ebx, ebp
and ebx, 2
or ebx, esi
mov esi, ebp
shr esi, 2
and esi, 1
or esi, ebx
mov ebx, ebp
shr ebx, 3
and ebx, 1
lea ebx, [ebx + esi*2]
shr ebp, 4
add ecx, 0xfffffffc
jne 0x408440
test edi, edi
je 0x4083f0
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, ebp
and ecx, 1
lea ebx, [ecx + ebx*2]
shr ebp, 1
dec edi
jne 0x408480
jmp 0x4083f0
add esp, 0x15b8
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
mov ecx, dword [esp + 0x15d0]
dec ecx
jmp 0x4084d3
dec ebp
mov dword [esp + esi*4 + 0x34], ebp
add dword [esp + esi*4 + 0x38], 2
dec eax
cmp eax, edx
je 0x408215
mov esi, dword [esp + 0x15d0]
dec dword [esp + esi*4 + 0x34]
test ecx, ecx
jle 0x4084ca
mov esi, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebp, dword [esp + esi*4 + 0x34]
test ebp, ebp
jne 0x4084c0
mov edi, esi
not edi
lea esi, [edi + esi*2]
test esi, esi
jg 0x4084f0
jmp 0x4084ca