Function at 0x407630
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15a8
call fcn.00408130
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15bc]
lea eax, [esp + 0x24]
push 0x84
push 0
push eax
call fcn.00408250
add esp, 0xc
cmp dword [esp + 0x15c4], 0
je 0x4076e8
test esi, esi
mov ecx, esi
jle 0x407f0e
xor eax, eax
cmp ecx, 1
je 0x4076b8
mov ecx, dword [esp + 0x15bc]
and ecx, 0x7ffffffe
lea eax, [ebx + ebx*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x24]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x24]
add eax, 2
cmp ecx, eax
jne 0x4076a0
mov ecx, dword [esp + 0x15bc]
test cl, 1
je 0x407f0e
lea ecx, [ebx + ebx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15bc]
inc dword [esp + eax*4 + 0x24]
jmp 0x407f0e
mov dword [esp + 0x18], ebx
lea eax, [ebx + ebx*8]
mov dword [esp + 0x14], eax
shl eax, 6
test esi, esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
jle 0x4077fd
add eax, edi
add eax, 0x8192
xor ecx, ecx
xor ebx, ebx
jmp 0x407734
mov edx, ecx
and edx, 1
xor ecx, 1
lea ecx, [ecx + edx*2]
cmp ecx, dword [esp + 0x15bc]
jge 0x407750
movzx edx, word [eax + ecx*2]
test dx, dx
je 0x407720
mov word [esp + ebx*4 + 0x4a8], dx
mov word [esp + ebx*4 + 0x4aa], cx
inc ebx
jmp 0x407720
lea eax, [esp + 0x928]
push 0x800
push 0
push eax
call fcn.00408250
add esp, 0xc
test ebx, ebx
sete byte [esp]
je 0x407814
xor eax, eax
cmp ebx, 1
je 0x4077cf
mov edx, ebx
and edx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4a8]
movzx esi, cl
inc dword [esp + esi*4 + 0x928]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd28]
movzx ecx, word [esp + eax*4 + 0x4ac]
movzx esi, cl
inc dword [esp + esi*4 + 0x928]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd28]
add eax, 2
cmp edx, eax
jne 0x407790
test bl, 1
je 0x4077f0
movzx eax, word [esp + eax*4 + 0x4a8]
movzx ecx, al
inc dword [esp + ecx*4 + 0x928]
shr eax, 8
inc dword [esp + eax*4 + 0xd28]
mov eax, dword [esp + 0xd28]
mov dword [esp + 4], eax
jmp 0x407822
lea eax, [esp + 0x928]
push 0x800
push 0
push eax
call fcn.00408250
add esp, 0xc
xor ebx, ebx
mov byte [esp], 1
mov dword [esp + 4], 0
lea eax, [ebx - 1]
mov dword [esp + 8], eax
xor ecx, ecx
mov edx, 1
mov dword [esp + edx*4 + 0xa4], ecx
mov esi, dword [esp + edx*4 + 0x924]
mov edi, dword [esp + edx*4 + 0x928]
mov ebp, esi
and ebp, ecx
xor esi, ecx
lea ecx, [esi + ebp*2]
mov dword [esp + edx*4 + 0xa8], ecx
mov esi, edi
and esi, ecx
xor edi, ecx
lea ecx, [edi + esi*2]
add edx, 2
cmp edx, 0x101
jne 0x407830
cmp byte [esp], 0
jne 0x407911
cmp dword [esp + 8], 0
je 0x407aee
mov ecx, ebx
and ecx, 0xfffffffe
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [esp + edx*4 + 0x4a8]
mov edi, dword [esp + esi*4 + 0xa8]
lea ebp, [edi + 1]
mov dword [esp + esi*4 + 0xa8], ebp
mov esi, dword [esp + edx*4 + 0x4a8]
mov ebp, dword [esp + edx*4 + 0x4ac]
mov dword [esp + edi*4 + 0x1128], esi
movzx esi, byte [esp + edx*4 + 0x4ac]
mov edi, dword [esp + esi*4 + 0xa8]
lea eax, [edi + 1]
mov dword [esp + esi*4 + 0xa8], eax
mov dword [esp + edi*4 + 0x1128], ebp
add edx, 2
cmp ecx, edx
jne 0x407890
test bl, 1
je 0x407911
movzx eax, byte [esp + edx*4 + 0x4a8]
mov ecx, dword [esp + eax*4 + 0xa8]
lea esi, [ecx + 1]
mov dword [esp + eax*4 + 0xa8], esi
mov eax, dword [esp + edx*4 + 0x4a8]
mov dword [esp + ecx*4 + 0x1128], eax
cmp dword [esp + 4], ebx
jne 0x40792b
lea edi, [esp + 0x1128]
test ebx, ebx
jne 0x407a29
jmp 0x407de7
xor ecx, ecx
xor eax, eax
nop
mov dword [esp + eax*4 + 0xa8], ecx
mov edx, dword [esp + eax*4 + 0xd28]
mov esi, dword [esp + eax*4 + 0xd2c]
mov edi, edx
and edi, ecx
xor edx, ecx
lea ecx, [edx + edi*2]
mov dword [esp + eax*4 + 0xac], ecx
mov edx, esi
and edx, ecx
xor esi, ecx
lea ecx, [esi + edx*2]
add eax, 2
cmp eax, 0x100
jne 0x407930
cmp byte [esp], 0
jne 0x407a1a
cmp dword [esp + 8], 0
je 0x407dc7
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0x1128]
movzx edx, dh
mov esi, dword [esp + edx*4 + 0xa8]
lea edi, [esi + 1]
mov dword [esp + edx*4 + 0xa8], edi
mov edx, dword [esp + eax*4 + 0x1128]
mov edi, dword [esp + eax*4 + 0x112c]
mov dword [esp + esi*4 + 0x4a8], edx
movzx edx, word [esp + eax*4 + 0x112c]
movzx edx, dh
mov esi, dword [esp + edx*4 + 0xa8]
lea ebp, [esi + 1]
mov dword [esp + edx*4 + 0xa8], ebp
mov dword [esp + esi*4 + 0x4a8], edi
add eax, 2
cmp ecx, eax
jne 0x407990
test bl, 1
je 0x407a1a
movzx ecx, word [esp + eax*4 + 0x1128]
movzx ecx, ch
mov edx, dword [esp + ecx*4 + 0xa8]
lea esi, [edx + 1]
mov dword [esp + ecx*4 + 0xa8], esi
mov eax, dword [esp + eax*4 + 0x1128]
mov dword [esp + edx*4 + 0x4a8], eax
lea edi, [esp + 0x4a8]
test ebx, ebx
je 0x407de7
cmp ebx, 1
jne 0x407a38
mov word [edi], 1
jmp 0x407caa
movzx eax, word [edi + 4]
add word [edi], ax
cmp ebx, 3
jl 0x407afe
mov eax, 2
mov ecx, 2
sub ecx, ebx
mov dword [esp + 4], ecx
xor edx, edx
mov esi, 1
jmp 0x407a9d
movzx ebp, word [edi + edx*4]
mov dword [esp], eax
movzx ecx, word [edi + esi*4]
mov eax, ecx
and eax, ebp
xor ecx, ebp
lea eax, [ecx + eax*2]
mov word [edi + esi*4], ax
mov word [edi + edx*4], si
inc edx
mov eax, dword [esp + 4]
add eax, esi
inc eax
inc esi
cmp eax, 1
mov eax, dword [esp]
je 0x407b17
movzx ecx, word [edi + edx*4]
cmp eax, ebx
jge 0x407aae
movzx ebp, word [edi + eax*4]
cmp cx, bp
jae 0x407ac0
mov word [edi + esi*4], cx
mov word [edi + edx*4], si
inc edx
cmp eax, ebx
jge 0x407a70
jmp 0x407ac9
inc eax
mov word [edi + esi*4], bp
cmp eax, ebx
jge 0x407a70
cmp edx, esi
jge 0x407ae0
movzx ebp, word [edi + edx*4]
movzx ecx, word [edi + eax*4]
cmp bp, cx
jb 0x407a74
jmp 0x407ae4
movzx ecx, word [edi + eax*4]
inc eax
mov dword [esp], eax
add word [edi + esi*4], cx
jmp 0x407a8d
xor edx, edx
test bl, 1
jne 0x4078ea
jmp 0x407911
mov eax, ebx
not eax
and eax, 2
mov ecx, ebx
and ecx, 0xfffffffd
sub ecx, eax
mov word [edi + ecx*4], 0
jmp 0x407ba1
mov eax, ebx
not eax
and eax, 2
mov ecx, ebx
and ecx, 0x7ffffffd
sub ecx, eax
mov word [edi + ecx*4], 0
lea edx, [ebx - 3]
mov esi, ebx
and esi, 3
xor esi, 2
mov eax, edx
je 0x407b51
mov eax, edx
nop
movzx ebp, word [edi + eax*4]
movzx ebp, word [edi + ebp*4]
inc ebp
mov word [edi + eax*4], bp
dec eax
dec esi
jne 0x407b40
cmp edx, 3
jb 0x407ba1
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [edi + eax*4 - 4]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + eax*4 - 4], dx
movzx edx, word [edi + eax*4 - 8]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + eax*4 - 8], dx
movzx edx, word [edi + eax*4 - 0xc]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + eax*4 - 0xc], dx
movzx edx, word [edi + eax*4 - 0x10]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + eax*4 - 0x10], dx
add eax, 0xfffffffc
jne 0x407b60
mov esi, 1
xor edx, edx
mov eax, dword [esp + 8]
mov dword [esp], edi
jmp 0x407bd0
lea esi, [ebp*2]
inc edx
test ebp, ebp
jle 0x407ca2
test ecx, ecx
mov dword [esp + 4], esi
js 0x407c00
lea ebp, [ecx + 1]
xor esi, esi
nop
nop
nop
mov edi, ebp
mov ebp, dword [esp]
movzx ebp, word [ebp + ecx*4]
cmp edx, ebp
jne 0x407c10
inc esi
dec ecx
mov ebp, edi
cmp edi, esi
jne 0x407be0
mov ecx, 0xffffffff
jmp 0x407c12
xor ebp, ebp
sub esi, ebp
jle 0x407bc0
jmp 0x407c1d
mov ebp, esi
mov edi, dword [esp]
mov esi, dword [esp + 4]
sub esi, ebp
jle 0x407bc0
and esi, 3
mov dword [esp + 0x20], esi
je 0x407c59
mov dword [esp + 0x1c], ebp
lea esi, [edi + eax*4]
xor ebp, ebp
mov edi, dword [esp + 0x20]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi], dx
inc ebp
add esi, 0xfffffffc
cmp edi, ebp
jne 0x407c40
mov esi, dword [esp + 4]
sub esi, ebp
sub eax, ebp
mov ebp, dword [esp + 0x1c]
jmp 0x407c5d
mov esi, dword [esp + 4]
mov edi, ebp
sub ebp, dword [esp + 4]
cmp ebp, 0xfffffffc
mov ebp, edi
mov edi, dword [esp]
ja 0x407bc0
nop
nop
nop
nop
nop
nop
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 0x407c80
jmp 0x407bc0
test ebx, ebx
jle 0x407de7
mov eax, ebx
and eax, 3
xor ecx, ecx
cmp dword [esp + 8], 3
jb 0x407cea
mov edx, ebx
and edx, 0xfffffffc
xor ecx, ecx
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x24]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x24]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x24]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x24]
add ecx, 4
cmp edx, ecx
jne 0x407cc0
test eax, eax
je 0x407d0d
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 + 0x24]
inc edx
cmp eax, edx
jne 0x407d00
cmp ebx, 2
jl 0x407de7
mov edx, dword [esp + 0x15c0]
lea eax, [edx + 1]
cmp eax, 0x21
jge 0x407d8c
mov ecx, dword [esp + edx*4 + 0x24]
neg edx
mov esi, dword [esp + 0x15c0]
and edx, 3
je 0x407d4c
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x24]
mov dword [esp + esi*4 + 0x24], ecx
inc eax
dec edx
jne 0x407d40
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x407d88
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x24]
mov dword [esp + edx*4 + 0x24], ecx
add ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + edx*4 + 0x24], ecx
add ecx, dword [esp + eax*4 + 0x2c]
mov dword [esp + edx*4 + 0x24], ecx
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + edx*4 + 0x24], ecx
add eax, 4
cmp eax, 0x21
jne 0x407d60
test edx, edx
jle 0x407dd7
inc edx
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x20]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x407da0
mov edx, 1
mov ecx, dword [esp + 0x15c0]
shl edx, cl
cmp eax, edx
jne 0x40806d
jmp 0x407de7
xor eax, eax
test bl, 1
jne 0x4079f0
jmp 0x407a1a
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x40806d
mov ebp, edi
mov edi, dword [esp + 0x14]
shl edi, 5
mov esi, dword [esp + 0xc]
lea eax, [esi + edi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408250
add esp, 0xc
mov eax, dword [esp + 0x10]
add eax, esi
add eax, 0x8852
mov esi, edi
mov edi, ebp
push 0x240
push 0
push eax
call fcn.00408250
add esp, 0xc
cmp dword [esp + 0x15c0], 0
jle 0x407eff
add edi, 0xfffffffe
mov eax, 1
add esi, dword [esp + 0xc]
mov dword [esp], edi
jmp 0x407e62
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15c0]
mov eax, ecx
je 0x407eff
mov ecx, dword [esp + eax*4 + 0x24]
test ecx, ecx
jle 0x407e50
mov edx, ecx
and edx, 3
je 0x407eb0
mov dword [esp + 4], ecx
lea ebp, [edi + ebx*4]
mov edi, esi
xor esi, esi
nop
nop
nop
nop
movzx ecx, word [ebp]
mov byte [ecx + edi + 0x8f12], al
inc esi
add ebp, 0xfffffffc
cmp edx, esi
jne 0x407e80
sub ebx, esi
mov ecx, dword [esp + 4]
mov edx, ecx
sub edx, esi
mov esi, edi
mov edi, dword [esp]
cmp ecx, 4
jb 0x407e50
jmp 0x407eb7
mov edx, ecx
cmp ecx, 4
jb 0x407e50
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + ebx*4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 0xc]
add ebx, 0xfffffffc
mov byte [ecx + esi + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x407ec0
jmp 0x407e50
mov ecx, dword [esp + 0x15bc]
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x92c], 0
mov eax, dword [esp + 0x15c0]
cmp eax, 2
jl 0x407f8f
lea ecx, [eax - 1]
cmp eax, 2
jne 0x407f36
xor eax, eax
mov edx, 2
jmp 0x407f76
mov esi, ebx
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0x930], eax
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x934], eax
add edx, 2
cmp ebx, edx
jne 0x407f50
add edx, 2
mov ebx, esi
test cl, 1
mov ecx, dword [esp + 0x15bc]
je 0x407f8f
add eax, dword [esp + edx*4 + 0x20]
add eax, eax
mov dword [esp + edx*4 + 0x928], eax
test ecx, ecx
jle 0x408062
xor eax, eax
lea edx, [ebx + ebx*8]
mov esi, edx
shl esi, 5
add esi, edi
mov dword [esp], esi
shl edx, 6
add edx, edi
mov dword [esp + 4], edx
jmp 0x407fdc
mov ecx, dword [esp + 4]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15bc]
inc eax
cmp eax, ecx
je 0x408062
mov edx, dword [esp]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x407fd3
mov edx, dword [esp + ebx*4 + 0x928]
lea ecx, [edx + 1]
mov dword [esp + ebx*4 + 0x928], ecx
xor edi, edi
cmp bl, 4
jb 0x40803f
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
nop
nop
nop
nop
nop
nop
mov ecx, edx
shr ecx, 2
mov esi, edx
and esi, 1
shl esi, 2
lea esi, [esi + edi*8]
mov edi, edx
and edi, 2
or edi, esi
mov esi, edx
shr esi, 3
and ecx, 1
or ecx, edi
shr edx, 4
and esi, 1
lea edi, [esi + ecx*2]
add ebp, 0xfffffffc
jne 0x408010
and ebx, 3
je 0x407fc0
mov ecx, edx
nop
nop
nop
nop
nop
nop
shr ecx, 1
and edx, 1
lea edi, [edx + edi*2]
mov edx, ecx
dec ebx
jne 0x408050
jmp 0x407fc0
add esp, 0x15a8
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 0x15c0]
dec dword [esp + ecx*4 + 0x24]
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x408098
mov esi, dword [esp + ecx*4 + 0x20]
dec ecx
test esi, esi
je 0x408080
dec esi
mov dword [esp + ecx*4 + 0x24], esi
add dword [esp + ecx*4 + 0x28], 2
dec eax
cmp eax, edx
jne 0x40806d
jmp 0x407de7