Function at 0x46f490
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5441fe
mov eax, dword fs:[0]
push eax
sub esp, 0x108
mov eax, dword [0x58bea8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [str.DAME_SAVE_IMAGE]
mov ebx, dword [ebp + 8]
mov edx, dword [0x54a43c]
xor edi, edi
mov esi, ecx
mov ecx, dword [0x54a438]
mov dword [ebp - 0x20], eax
mov eax, dword [0x54a440]
mov dword [ebp - 0xc0], esi
mov dword [ebp - 0xe4], ebx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc4], edi
mov dword [ebp - 0xd0], edi
mov dword [ebp - 0xc8], edi
cmp dword [esi + 0x25bc], edi
jne 0x46f514
xor eax, eax
jmp 0x46fa72
cmp dword [ebp + 0xc], edi
je 0x46f64e
cmp dword [esi + ebx*4 + 0x28d0], edi
je 0x46f64e
cmp dword [esi + 0x5a4], edi
je 0x46f64e
mov ecx, dword [esi + 0xcdc]
call fcn.0047d270
push 0x30
lea ecx, [ebp - 0x114]
push 0
push ecx
mov edi, eax
call fcn.0052b220
add esp, 0xc
lea eax, [ebp - 0x114]
push eax
push 0
lea ecx, [ebx + 0x7fea]
push ecx
lea edx, [ebp - 0xa0]
push edi
mov dword [ebp - 0x114], 0x30
mov dword [ebp - 0x110], 0x11
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0xf0], edx
mov dword [ebp - 0xec], 0x100
call dword [0x547308]
push 1
mov ecx, esi
call fcn.004153a0
push 0x834
call fcn.0052b63f
add esp, 4
mov dword [ebp - 0xd8], eax
xor edi, edi
mov dword [ebp - 4], edi
cmp eax, edi
je 0x46f5d0
push edi
mov ecx, eax
call fcn.0047b740
mov edi, eax
push 0x54a424
lea edx, [edi + 0x5a4]
push edx
mov dword [ebp - 4], 0xffffffff
call dword [0x547218]
lea eax, [ebp - 0xa0]
push eax
lea ecx, [edi + 0x634]
push ecx
call dword [0x547218]
push 0x54a404
lea edx, [edi + 0x734]
push edx
call dword [0x547218]
mov ecx, dword [esi + 4]
mov eax, dword [edi]
mov edx, dword [esi + 8]
mov eax, dword [eax + 0xc]
push ecx
push edx
mov ecx, edi
call eax
mov ecx, edi
mov dword [ebp - 0xb4], eax
call fcn.0047b770
push edi
call fcn.0052b2fa
add esp, 4
push 0
mov ecx, esi
call fcn.004153a0
cmp dword [ebp - 0xb4], 0
je 0x46f50d
xor edi, edi
push ebx
mov ecx, esi
call fcn.0045b900
mov ecx, esi
call fcn.00414f50
push 0x1000
push edi
mov edi, dword [0x547224]
call edi
push ebx
lea ecx, [esi + 0x1510]
push ecx
push str._ssave_z3.dat
push eax
mov dword [ebp - 0xd8], eax
call fcn.00405e10
mov eax, dword [esi + 0x25c0]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, 0xcccccccd
mul ecx
add esp, 0x10
shr edx, 3
push edx
push 0
call edi
mov edx, dword [esi + 0x25c0]
mov ecx, dword [esi + 0x25bc]
push edx
push ecx
push eax
mov dword [ebp - 0xdc], eax
call fcn.0045b100
add esp, 0xc
cmp dword [esi + 0x2828], 0
mov ebx, eax
mov dword [ebp - 0xcc], ebx
je 0x46f71b
cmp dword [esi + 0x25c4], 0
je 0x46f71b
mov eax, dword [esi + 0x25c8]
mov edx, eax
shl edx, 4
sub edx, eax
mov eax, 0xcccccccd
mul edx
shr edx, 3
push edx
push 0
call edi
mov ecx, dword [esi + 0x25c8]
mov edx, dword [esi + 0x25c4]
push ecx
push edx
push eax
mov dword [ebp - 0xc4], eax
call fcn.0045b100
add esp, 0xc
mov dword [ebp - 0xbc], eax
jmp 0x46f725
mov dword [ebp - 0xbc], 0
mov eax, dword [esi + 0x3380]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, 0xcccccccd
mul ecx
shr edx, 3
push edx
push 0
call edi
mov edx, dword [esi + 0x3380]
mov ecx, dword [esi + 0x3acc]
push edx
push ecx
push eax
mov dword [ebp - 0xb4], eax
call fcn.0045b100
mov dword [ebp - 0xb8], eax
add eax, dword [ebp - 0xbc]
add esp, 0xc
lea eax, [eax + ebx + 0x258]
mov dword [ebp - 0xd4], eax
add eax, 2
push eax
push 0
mov dword [ebp - 0xe0], eax
call edi
mov ebx, eax
mov eax, dword [ebp - 0xdc]
add esi, 0x25cc
mov ecx, 0x96
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0xcc]
push edi
push eax
lea ecx, [ebx + 0x258]
push ecx
call fcn.0052c3c0
mov esi, dword [ebp - 0xbc]
add esp, 0xc
test esi, esi
je 0x46f7d5
mov edx, dword [ebp - 0xc4]
push esi
push edx
lea eax, [edi + ebx + 0x258]
push eax
call fcn.0052c3c0
add esp, 0xc
mov ecx, dword [ebp - 0xb8]
mov edx, dword [ebp - 0xb4]
push ecx
lea eax, [esi + edi]
push edx
lea ecx, [eax + ebx + 0x258]
push ecx
call fcn.0052c3c0
add esp, 0xc
lea edx, [ebp - 0xb0]
push edx
call dword [0x547110]
movzx eax, word [ebp - 0xa4]
movzx ecx, word [ebp - 0xa6]
movzx edx, word [ebp - 0xa8]
push eax
movzx eax, word [ebp - 0xaa]
push ecx
movzx ecx, word [ebp - 0xae]
push edx
movzx edx, word [ebp - 0xb0]
push eax
push ecx
push edx
lea eax, [ebp - 0xa0]
push str._z4__z2__z2__z2:_z2:_z2
push eax
call fcn.00405e10
movzx ecx, byte [ebp - 0xa0]
mov byte [ebx + 0x10], cl
movzx edx, byte [ebp - 0x9f]
mov byte [ebx + 0x11], dl
movzx eax, byte [ebp - 0x9e]
mov byte [ebx + 0x12], al
movzx ecx, byte [ebp - 0x9d]
mov byte [ebx + 0x13], cl
movzx edx, byte [ebp - 0x9b]
mov byte [ebx + 0x15], dl
movzx eax, byte [ebp - 0x9a]
mov byte [ebx + 0x16], al
movzx ecx, byte [ebp - 0x98]
mov byte [ebx + 0x18], cl
movzx edx, byte [ebp - 0x97]
mov byte [ebx + 0x19], dl
movzx eax, byte [ebp - 0x95]
mov edi, dword [ebp - 0xc0]
mov byte [ebx + 0x1b], al
movzx ecx, byte [ebp - 0x94]
mov byte [ebx + 0x1c], cl
movzx edx, byte [ebp - 0x92]
mov byte [ebx + 0x1e], dl
movzx eax, byte [ebp - 0x91]
mov byte [ebx + 0x1f], al
movzx ecx, byte [ebp - 0x8f]
mov eax, dword [ebp - 0xd4]
mov byte [ebx + 0x21], cl
movzx edx, byte [ebp - 0x8e]
mov byte [ebx + 0x22], dl
mov dword [ebx + 0x21c], eax
mov cx, word [edi + 0x2828]
mov word [ebx + 0x224], cx
mov ecx, dword [ebp - 0xcc]
mov edx, 1
mov word [ebx + 0x222], dx
mov eax, dword [edi + 0x25c0]
mov dword [ebx + 0x230], ecx
mov ecx, dword [ebp - 0xb8]
mov dword [ebx + 0x244], eax
mov edx, dword [edi + 0x25c8]
mov dword [ebx + 0x248], edx
add esp, 0x20
mov dword [ebx + 0x234], esi
mov eax, dword [edi + 0x3380]
lea edx, [ebp - 0x20]
push edx
mov dword [ebx + 0x24c], eax
mov dword [ebx + 0x238], ecx
call dword [0x54721c]
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0xcc]
mov esi, 0x258
add eax, esi
mov dword [ebp - 0xb8], eax
cmp eax, esi
jbe 0x46f9a5
jmp 0x46f970
mov cl, byte [esi + ebx]
mov eax, dword [ebp - 0xd0]
sub cl, 0x80
xor cl, byte [ebp + eax - 0x20]
inc eax
xor edx, edx
div dword [ebp - 0xc0]
movzx eax, cl
add word [ebp - 0xc8], ax
mov byte [esi + ebx], cl
inc esi
mov dword [ebp - 0xd0], edx
cmp esi, dword [ebp - 0xb8]
jb 0x46f970
mov eax, dword [ebp - 0xe0]
mov cx, word [ebp - 0xc8]
mov edx, dword [ebp - 0xd4]
mov esi, dword [ebp - 0xd8]
push 1
push eax
push 0
push 0
push ebx
push esi
mov word [edx + ebx], cx
call fcn.004071d0
test esi, esi
je 0x46f9df
push esi
mov esi, dword [0x547228]
call esi
jmp 0x46f9e5
mov esi, dword [0x547228]
mov eax, dword [ebp - 0xdc]
test eax, eax
je 0x46f9f2
push eax
call esi
mov eax, dword [ebp - 0xc4]
test eax, eax
je 0x46f9ff
push eax
call esi
push ebx
call esi
mov eax, dword [ebp - 0xb4]
test eax, eax
je 0x46fa0f
push eax
call esi
cmp dword [ebp - 0xe4], 0xa
ja 0x46fa69
mov ecx, dword [edi + 0x28c8]
lea esi, [edi + 0x28cc]
push esi
lea ebx, [edi + 0x28d0]
push ebx
push ecx
mov ecx, dword [edi + 0xcdc]
lea eax, [edi + 0x1510]
push eax
push 0x7fea
push 0x7fe0
call fcn.0047f660
mov edx, dword [esi]
mov eax, dword [edi + 0x28c8]
mov ecx, dword [edi + 0xcdc]
push edx
push eax
push ebx
push 0x7fea
push 0x7fe0
call fcn.0047f4a0
push 0x1e
mov ecx, edi
call fcn.0045b5c0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052b2eb
mov esp, ebp
pop ebp
ret 8