Function at 0x407a80
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.004084c0
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.004086e0
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x1c], ebx
je 0x407b3c
test esi, esi
mov ecx, esi
jle 0x40831e
xor eax, eax
cmp ecx, 1
je 0x407b08
mov ecx, dword [esp + 0x15c8]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x1c]
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 + 0x30]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x30]
add eax, 2
cmp ecx, eax
jne 0x407af0
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x40831e
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c8]
inc dword [esp + eax*4 + 0x30]
jmp 0x40831e
mov ecx, edi
lea ebp, [ebx + ebx*8]
mov eax, ebp
shl eax, 6
test esi, esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], eax
jle 0x407c39
cmp esi, 1
jne 0x407ea5
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x407b95
mov ecx, dword [esp + 0x28]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x407b95
mov word [esp + ebx*4 + 0x4b4], cx
mov word [esp + ebx*4 + 0x4b6], ax
inc ebx
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.004086e0
add esp, 0xc
test ebx, ebx
sete byte [esp + 0xb]
je 0x407c50
xor eax, eax
cmp ebx, 1
je 0x407c0f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0x4b4]
movzx esi, dl
inc dword [esp + esi*4 + 0x934]
shr edx, 8
inc dword [esp + edx*4 + 0xd34]
movzx edx, word [esp + eax*4 + 0x4b8]
movzx esi, dl
inc dword [esp + esi*4 + 0x934]
shr edx, 8
inc dword [esp + edx*4 + 0xd34]
add eax, 2
cmp ecx, eax
jne 0x407bd0
test bl, 1
je 0x407c30
movzx eax, word [esp + eax*4 + 0x4b4]
movzx ecx, al
inc dword [esp + ecx*4 + 0x934]
shr eax, 8
inc dword [esp + eax*4 + 0xd34]
mov eax, dword [esp + 0xd34]
jmp 0x407c59
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.004086e0
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0xb], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x2c], eax
lea eax, [ebx - 1]
mov dword [esp + 0x20], eax
mov edx, ebx
and edx, 0xfffffffe
lea eax, [esp + 0x4b4]
mov dword [esp], eax
lea eax, [esp + 0x1134]
xor ecx, ecx
lea edi, [esp + 0x934]
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], edx
jmp 0x407cd0
mov esi, dword [esp + 0x18]
inc esi
add ecx, 8
add edi, 0x400
mov eax, dword [esp + 4]
mov dword [esp + 0x18], esi
cmp esi, dword [esp + 0x2c]
je 0x407dd1
mov esi, dword [esp]
mov dword [esp], eax
mov eax, 3
xor edx, edx
nop
nop
nop
mov dword [esp + eax*4 + 0xa8], edx
add edx, dword [edi + eax*4 - 0xc]
mov dword [esp + eax*4 + 0xac], edx
add edx, dword [edi + eax*4 - 8]
mov dword [esp + eax*4 + 0xb0], edx
add edx, dword [edi + eax*4 - 4]
mov dword [esp + eax*4 + 0xb4], edx
add edx, dword [edi + eax*4]
add eax, 4
cmp eax, 0x103
jne 0x407ce0
mov dword [esp + 4], esi
cmp byte [esp + 0xb], 0
jne 0x407cb0
cmp dword [esp + 0x20], 0
je 0x407d8a
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + 4]
movzx edx, word [esi + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb4]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xb4], ebp
mov edx, dword [esi + eax*4]
mov ebp, dword [esp]
mov dword [ebp + ebx*4], edx
movzx edx, word [esi + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb4]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xb4], ebp
mov edx, dword [esi + eax*4 + 4]
mov esi, dword [esp]
mov dword [esi + ebx*4], edx
mov edx, dword [esp + 0x14]
add eax, 2
cmp edx, eax
jne 0x407d30
jmp 0x407d8c
xor eax, eax
mov ebx, dword [esp + 0xc]
test bl, 1
mov ebp, dword [esp + 0x10]
je 0x407cb0
mov esi, dword [esp + 4]
movzx edx, word [esi + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb4]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xb4], ebp
mov ebp, dword [esp + 0x10]
mov eax, dword [esi + eax*4]
mov edx, dword [esp]
mov dword [edx + ebx*4], eax
mov ebx, dword [esp + 0xc]
jmp 0x407cb0
test ebx, ebx
je 0x4081e8
cmp ebx, 1
jne 0x407deb
mov eax, dword [esp]
mov word [eax], 1
jmp 0x40809a
mov edi, dword [esp]
movzx eax, word [edi + 4]
add word [edi], ax
cmp ebx, 3
jl 0x407f05
mov eax, 2
mov ecx, 2
sub ecx, ebx
mov dword [esp + 4], ecx
xor edx, edx
mov esi, 1
jmp 0x407e46
movzx ebx, word [ecx + edx*4]
add word [ecx + esi*4], bx
mov word [ecx + edx*4], si
inc edx
mov ecx, dword [esp + 4]
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
mov ebx, dword [esp + 0xc]
mov edi, dword [esp]
je 0x407f14
cmp eax, ebx
jge 0x407e60
movzx ebx, word [edi + eax*4]
movzx ecx, word [edi + edx*4]
cmp cx, bx
jb 0x407e64
inc eax
mov word [edi + esi*4], bx
jmp 0x407e6d
movzx ecx, word [edi + edx*4]
mov word [edi + esi*4], cx
mov word [edi + edx*4], si
inc edx
mov ecx, edi
cmp eax, dword [esp + 0xc]
jge 0x407e20
cmp edx, esi
jge 0x407e90
movzx ebx, word [ecx + edx*4]
movzx edi, word [ecx + eax*4]
cmp bx, di
jb 0x407e24
jmp 0x407e94
movzx edi, word [ecx + eax*4]
mov ebx, eax
and ebx, 1
xor eax, 1
lea eax, [eax + ebx*2]
add word [ecx + esi*4], di
jmp 0x407e2d
mov ecx, esi
and ecx, 0xfffffffe
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x407ecb
add eax, 2
cmp ecx, eax
je 0x407b63
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x407ee6
mov word [esp + ebx*4 + 0x4b4], si
mov word [esp + ebx*4 + 0x4b6], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x407ec0
mov word [esp + ebx*4 + 0x4b4], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4b6], si
inc ebx
jmp 0x407ec0
lea esi, [ebx - 2]
mov word [edi + ebx*4 - 8], 0
jmp 0x407f91
mov word [edi + ebx*4 - 8], 0
lea edx, [ebx - 3]
lea ecx, [ebx + 2]
mov eax, edx
and ecx, 3
je 0x407f41
mov eax, edx
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 ecx
jne 0x407f30
lea esi, [ebx - 2]
cmp edx, 3
jb 0x407f91
inc eax
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 0x407f50
mov ecx, 1
xor edx, edx
mov eax, dword [esp + 0x20]
jmp 0x407fb4
mov esi, dword [esp + 0x14]
lea ecx, [ebx + ebx]
inc edx
test ebx, ebx
mov ebx, dword [esp + 0xc]
jle 0x408092
test esi, esi
js 0x408000
lea ebx, [esi + 1]
mov dword [esp + 4], ebx
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [edi + esi*4]
cmp edx, edi
jne 0x408010
inc ebx
dec esi
cmp dword [esp + 4], ebx
mov edi, dword [esp]
jne 0x407fd0
mov dword [esp + 0x14], 0xffffffff
mov ebx, dword [esp + 4]
jmp 0x408017
mov dword [esp + 0x14], esi
xor ebx, ebx
jmp 0x408017
mov dword [esp + 0x14], esi
mov edi, dword [esp]
mov esi, ecx
sub esi, ebx
jle 0x407fa0
mov dword [esp + 4], ebx
not ebx
add ebx, ecx
and esi, 3
je 0x408056
mov dword [esp + 0x18], ebx
lea ebx, [edi + eax*4]
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx], dx
inc edi
add ebx, 0xfffffffc
cmp esi, edi
jne 0x408040
sub eax, edi
sub ecx, edi
mov edi, dword [esp]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
cmp ebx, 3
mov ebx, dword [esp + 4]
jb 0x407fa4
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 ecx, 0xfffffffc
cmp ecx, ebx
jg 0x408070
jmp 0x407fa4
test ebx, ebx
jle 0x4081e8
mov eax, ebx
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x20], 3
mov edi, dword [esp]
jb 0x4080ea
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 + 0x30]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x30]
add ecx, 4
cmp edx, ecx
jne 0x4080c0
test eax, eax
je 0x40810d
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 + 0x30]
inc edx
cmp eax, edx
jne 0x408100
cmp ebx, 2
jl 0x4081e8
mov edx, dword [esp + 0x15cc]
cmp edx, 0x20
jge 0x408190
mov eax, dword [esp + edx*4 + 0x30]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x40814c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
inc ecx
mov dword [esp + esi*4 + 0x30], eax
dec edx
jne 0x408140
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x408188
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x3c]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x40]
add ecx, 4
mov dword [esp + edx*4 + 0x30], eax
cmp ecx, 0x20
jne 0x408160
test edx, edx
jle 0x40845e
mov esi, edx
not edx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + 4], eax
mov edi, dword [esp + esi*4 + 0x30]
mov ebx, esi
mov eax, dword [esp + 0x15cc]
xor ebx, eax
mov ecx, edx
and ecx, eax
mov eax, dword [esp + 4]
add ecx, ecx
sub ecx, ebx
shl edi, cl
add eax, edi
lea ecx, [esi - 1]
inc edx
cmp esi, 1
mov esi, ecx
ja 0x4081a0
mov edx, 1
mov ecx, dword [esp + 0x15cc]
shl edx, cl
cmp eax, edx
mov ebx, dword [esp + 0xc]
jne 0x408469
shl ebp, 5
mov edi, dword [esp + 0x24]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.004086e0
add esp, 0xc
mov eax, dword [esp + 0x28]
mov esi, edi
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.004086e0
add esp, 0xc
cmp dword [esp + 0x15cc], 0
jle 0x408315
add dword [esp], 0xfffffffe
mov eax, 1
mov dword [esp + 0x10], ebp
jmp 0x40826a
mov ebp, esi
mov esi, ebp
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15cc]
mov eax, ecx
mov ebp, dword [esp + 0x10]
je 0x408315
mov edi, dword [esp + eax*4 + 0x30]
test edi, edi
jle 0x408250
mov edx, edi
and edx, 3
je 0x4082c0
mov dword [esp + 4], edi
mov dword [esp + 0xc], ebx
mov ecx, dword [esp]
lea edi, [ecx + ebx*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
movzx ebx, word [edi]
mov ecx, ebp
mov ebp, dword [esp + 0x24]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
mov ebp, ecx
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x408290
mov edi, dword [esp + 4]
mov edx, edi
sub edx, esi
mov ebx, dword [esp + 0xc]
sub ebx, esi
mov esi, dword [esp + 0x24]
jmp 0x4082c2
mov edx, edi
cmp edi, 4
mov edi, dword [esp]
mov ebp, esi
jb 0x408252
dec edx
nop
nop
nop
movzx ecx, word [edi + ebx*4]
mov esi, dword [esp + 0x10]
add esi, ebp
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]
mov byte [ecx + esi + 0x8f12], al
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x4082d0
jmp 0x408252
mov ecx, dword [esp + 0x15c8]
mov edi, esi
mov dword [esp + 0x938], 0
mov eax, dword [esp + 0x15cc]
cmp eax, 2
jl 0x40838d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408346
xor eax, eax
mov edx, 2
jmp 0x408374
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x93c], eax
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
add edx, 2
cmp ebx, edx
jne 0x408350
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c8]
je 0x40838d
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x934], eax
test ecx, ecx
jle 0x408453
xor eax, eax
mov edx, dword [esp + 0x1c]
lea edx, [edx + edx*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 0x4083d8
mov ecx, dword [esp + 4]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c8]
inc eax
cmp eax, ecx
je 0x408453
mov edx, dword [esp]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x4083d3
mov edx, dword [esp + ebx*4 + 0x934]
lea edi, [edx + 1]
mov dword [esp + ebx*4 + 0x934], edi
xor edi, edi
cmp bl, 1
je 0x40843b
mov ebp, ebx
and ebp, 0xfffffffe
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, edx
not esi
or esi, 1
add esi, edx
mov ecx, edx
shr ecx, 1
shl edi, 2
add esi, esi
add esi, 2
or esi, edi
mov edi, ecx
not edi
or edi, 1
add edi, ecx
inc edi
or edi, esi
shr edx, 2
add ebp, 0xfffffffe
jne 0x408410
test bl, 1
je 0x4083c0
add edi, edi
mov ecx, edx
not ecx
or ecx, 1
add ecx, edx
inc ecx
or edi, ecx
jmp 0x4083c0
add esp, 0x15b4
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 + 0x15cc]
dec ecx
jmp 0x408489
dec eax
cmp eax, edx
je 0x4081e8
mov esi, dword [esp + 0x15cc]
dec dword [esp + esi*4 + 0x30]
mov esi, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
test esi, esi
jle 0x408480
mov edi, dword [esp + esi*4 + 0x30]
dec esi
test edi, edi
je 0x4084a0
dec edi
mov dword [esp + esi*4 + 0x34], edi
add dword [esp + esi*4 + 0x38], 2
jmp 0x408480