Function at 0x485560
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x78
mov eax, dword [esp + 0x80]
push ebx
push eax
mov dword [esp + 0x14], ecx
call fcn.004ea180
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x24], ebx
je 0x485b79
push ebp
push esi
push edi
push 0
push 0
lea ecx, [esp + 0x78]
call fcn.004863d0
mov edi, dword [0x81cfec]
xor eax, eax
test edi, edi
mov dword [esp + 0x70], 0x7d0a24
mov dword [esp + 0x84], 0xa
mov dword [esp + 0x80], eax
je 0x48563f
mov ebp, dword [esp + 0x8c]
mov esi, dword [edi + 4]
mov al, byte [esi + 0x7bd]
test al, al
je 0x485632
lea ecx, [esi + 0x76c]
call fcn.00408280
cmp eax, ebp
jne 0x485632
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x80]
cmp ecx, eax
jl 0x48561a
mov cl, byte [esp + 0x7d]
test cl, cl
jne 0x4855fb
test eax, eax
jne 0x485632
mov ecx, dword [esp + 0x84]
test ecx, ecx
jle 0x485632
mov edx, dword [esp + 0x70]
add eax, ecx
push 0
push eax
lea ecx, [esp + 0x78]
call dword [edx + 8]
test al, al
je 0x485632
mov ecx, dword [esp + 0x80]
mov eax, ecx
inc ecx
mov dword [esp + 0x80], ecx
mov ecx, dword [esp + 0x74]
mov dword [ecx + eax*4], esi
mov edi, dword [edi]
test edi, edi
jne 0x4855c4
mov eax, dword [esp + 0x80]
test eax, eax
jle 0x485658
mov edx, dword [esp + 0x74]
push 0x485b80
push 4
push eax
push edx
call fcn.0078ca0d
add esp, 0x10
mov ecx, ebx
call fcn.004f3a20
mov eax, dword [esp + 0x80]
xor ebp, ebp
test eax, eax
mov dword [esp + 0x24], ebp
jle 0x485b55
mov eax, dword [esp + 0x74]
push 0x81c7c4
push ebp
mov ecx, ebx
mov esi, dword [eax + ebp*4]
call fcn.004f3160
mov edi, eax
test edi, edi
mov dword [esp + 0x2c], edi
jl 0x485b41
mov ecx, dword [0x809d3c]
xor ebp, ebp
mov dword [esp + 0x14], ecx
push 1
push ebp
lea ecx, [esp + 0x1c]
call fcn.005dd7a0
mov edx, dword [esp + 0x14]
mov ax, word [0x83f43c]
mov word [edx], ax
mov ecx, dword [esi + 0x758]
push ecx
lea ecx, [esp + 0x18]
call fcn.00409430
mov edx, dword [esp + 0x14]
mov ecx, ebx
push edx
push 1
push edi
call fcn.004f3770
mov eax, dword [esi + 0x770]
mov dword [esp + 0x18], ebp
cmp eax, 0xffffffff
je 0x485709
mov ecx, dword [esi + 0x770]
lea eax, [esp + 0x18]
push eax
push ecx
call fcn.00407b70
mov eax, dword [esp + 0x20]
add esp, 8
cmp eax, ebp
je 0x485709
mov eax, dword [eax]
jmp 0x48570e
mov eax, dword [0x89fe34]
push eax
push ebp
push edi
mov ecx, ebx
call fcn.004f3860
mov eax, dword [esi + 4]
mov dword [esp + 0x18], ebp
cmp eax, 0xffffffff
je 0x48573e
lea edx, [esp + 0x18]
push edx
push eax
call fcn.00428f80
mov eax, dword [esp + 0x20]
add esp, 8
cmp eax, ebp
je 0x48573e
fld dword [eax]
jmp 0x485744
fld dword [0x89fe2c]
call fcn.0078c320
push eax
push 2
push edi
mov ecx, ebx
call fcn.004f3860
mov eax, dword [esi + 0x764]
mov dword [esp + 0x18], ebp
cmp eax, 0xffffffff
je 0x48577f
lea ecx, [esp + 0x18]
mov edx, eax
push ecx
push edx
call fcn.00407b70
mov eax, dword [esp + 0x20]
add esp, 8
cmp eax, ebp
je 0x48577f
mov eax, dword [eax]
jmp 0x485784
mov eax, dword [0x89fe34]
push eax
push 3
push edi
mov ecx, ebx
call fcn.004f3860
mov eax, dword [esp + 0x1c]
mov cl, byte [eax + 0x64c]
test cl, cl
je 0x4857d8
mov eax, dword [esi + 0x760]
mov dword [esp + 0x18], ebp
cmp eax, 0xffffffff
je 0x4857c8
lea ecx, [esp + 0x18]
mov edx, eax
push ecx
push edx
call fcn.00407b70
mov eax, dword [esp + 0x20]
add esp, 8
cmp eax, ebp
je 0x4857c8
mov eax, dword [eax]
jmp 0x4857cd
mov eax, dword [0x89fe34]
push eax
push 4
push edi
mov ecx, ebx
call fcn.004f3860
mov eax, dword [esi + 0x14]
cmp eax, ebp
je 0x4857e4
mov eax, dword [eax + 4]
jmp 0x4857e6
xor eax, eax
cmp dword [0x820d98], ebp
je 0x4858ea
mov ecx, dword [0x855e48]
cmp ecx, ebp
je 0x485801
mov ecx, dword [ecx + 4]
jmp 0x485803
xor ecx, ecx
cmp eax, ecx
jne 0x4858ea
push str.IF_LRGSTAR.TGA
push 1
push edi
mov ecx, ebx
call fcn.004f29d0
lea eax, [esp + 0x34]
mov ecx, ebx
push eax
push ebp
push edi
mov dword [esp + 0x40], 0x3f800000
mov dword [esp + 0x44], 0x3f800000
mov dword [esp + 0x48], 0x3f800000
call fcn.004f3940
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], 0x3f800000
push ecx
push 1
push edi
mov ecx, ebx
mov dword [esp + 0x50], 0x3f800000
mov dword [esp + 0x54], 0x3f800000
call fcn.004f3940
lea edx, [esp + 0x4c]
mov ecx, ebx
push edx
push 2
push edi
mov dword [esp + 0x58], 0x3f800000
mov dword [esp + 0x5c], 0x3f800000
mov dword [esp + 0x60], 0x3f800000
call fcn.004f3940
lea eax, [esp + 0x58]
mov ecx, ebx
push eax
push 3
push edi
mov dword [esp + 0x64], 0x3f800000
mov dword [esp + 0x68], 0x3f800000
mov dword [esp + 0x6c], 0x3f800000
call fcn.004f3940
mov ecx, dword [esp + 0x1c]
mov al, byte [ecx + 0x64c]
test al, al
je 0x4858ea
lea edx, [esp + 0x64]
mov ecx, ebx
push edx
push 4
push edi
mov dword [esp + 0x70], 0x3f800000
mov dword [esp + 0x74], 0x3f800000
mov dword [esp + 0x78], 0x3f800000
call fcn.004f3940
mov esi, dword [esi + 0x770]
cmp esi, 0xffffffff
je 0x485b24
push esi
call fcn.0045c0b0
add esp, 4
test eax, eax
je 0x485b24
xor esi, esi
add eax, 0x14
push esi
push 4
push eax
mov eax, dword [0x829488]
lea ecx, [eax*4 + 0x82948c]
push ecx
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea ebp, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [esp + 0x28], ebp
mov dword [0x829488], eax
jl 0x485949
mov dword [0x829488], esi
push esi
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 4
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb 0x485b1b
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], esi
sub edx, ecx
cmp edx, eax
jne 0x485991
call fcn.00406630
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x48599e
call fcn.00406630
mov ecx, 0x83f450
call fcn.004065e0
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x4859c8
mov edx, eax
or edx, ecx
je 0x4859c8
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe 0x485b1b
mov cl, byte [0x81c6fc]
test cl, cl
jne 0x485b1b
mov esi, dword [0x829478]
mov dword [0x829468], eax
mov eax, dword [0x8294e8]
mov byte [0x81c6fc], 1
test eax, eax
not esi
mov dword [esp + 0x20], 0
jle 0x485a7f
mov dword [esp + 0x18], 0x820e44
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
test eax, eax
je 0x485a55
mov ecx, dword [eax + 4]
test ecx, ecx
jle 0x485a55
mov edi, dword [eax]
mov ebp, dword [edi + 0xc]
sar ebp, 2
test edi, edi
je 0x485a55
xor ebx, ebx
test ecx, ecx
jle 0x485a55
mov ecx, edi
call fcn.00406620
xor esi, eax
lea eax, [edi + 0x14]
test ebp, ebp
jle 0x485a46
mov ecx, ebp
mov edx, dword [eax]
add eax, 4
xor esi, edx
dec ecx
jne 0x485a3c
mov ecx, dword [esp + 0x18]
mov edi, dword [edi + 4]
inc ebx
mov edx, dword [ecx]
cmp ebx, dword [edx + 4]
jl 0x485a2a
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov ecx, dword [0x8294e8]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], edx
jl 0x485a07
mov ebp, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x30]
cmp esi, dword [0x8294d8]
je 0x485a8c
call fcn.00406630
mov eax, dword [0x8294e8]
test eax, eax
je 0x485b14
xor esi, esi
mov ecx, 0x829464
mov dword [esp + 0x10], esi
call fcn.00406620
test eax, eax
je 0x485ad6
mov ecx, dword [0x829464]
lea eax, [esp + 0x10]
push eax
push ecx
call fcn.00407b70
add esp, 8
test al, al
je 0x485ad1
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x485ad1
cmp dword [eax], 0x29874362
je 0x485ad6
call fcn.00406630
mov ecx, 0x8294b0
mov dword [esp + 0x10], esi
call fcn.00406620
test eax, eax
je 0x485b14
mov eax, dword [0x8294b0]
lea edx, [esp + 0x10]
push edx
push eax
call fcn.00407b70
add esp, 8
test al, al
je 0x485b0f
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x485b0f
cmp dword [eax], 0xbad0bad
je 0x485b14
call fcn.00406630
mov byte [0x81c6fc], 0
test ebp, ebp
je 0x485b24
mov eax, dword [ebp]
jmp 0x485b29
mov eax, dword [0x89fe34]
push eax
push 0
push edi
mov ecx, ebx
call fcn.004f3990
lea ecx, [esp + 0x14]
call fcn.005dd990
mov ebp, dword [esp + 0x24]
mov eax, dword [esp + 0x80]
inc ebp
cmp ebp, eax
mov dword [esp + 0x24], ebp
jl 0x485674
mov eax, dword [esp + 0x74]
pop edi
pop esi
mov dword [esp + 0x68], 0x7d0a0c
test eax, eax
pop ebp
je 0x485b79
mov cl, byte [esp + 0x71]
test cl, cl
je 0x485b79
push eax
call fcn.00672c80
add esp, 4
pop ebx
add esp, 0x78
ret 8