Function at 0x474a3a
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
mov edx, eax
mov dword [ebp - 4], edx
push esi
push edi
test ebx, ebx
je 0x474d83
mov edi, dword [ebx + 0x108]
test edi, edi
je 0x474d83
xor ebx, ebx
cmp dword [edi], ebx
jne 0x474a70
push 0xffffffffffffff9c
jmp 0x474d85
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jne 0x474a7e
xor eax, eax
jmp 0x474d86
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], ecx
cmp dword [edi + 0xd0], ebx
je 0x474ab2
mov esi, dword [edi + 8]
xor eax, eax
mov edx, esi
add edx, dword [edi + 0x78]
adc eax, dword [edi + 0x7c]
cmp ebx, eax
jb 0x474aae
ja 0x474aa6
cmp ecx, edx
jbe 0x474aae
mov ecx, dword [edi + 0x78]
add ecx, esi
mov dword [edi + 0x14], ecx
mov edx, ebx
jmp 0x474acd
cmp ebx, dword [edi + 0x84]
jb 0x474acd
ja 0x474ac4
cmp ecx, dword [edi + 0x80]
jbe 0x474acd
mov ecx, dword [edi + 0x80]
mov dword [edi + 0x14], ecx
test ecx, ecx
je 0x474d71
mov ecx, dword [edi + 8]
test ecx, ecx
jne 0x474c7b
mov eax, dword [edi + 4]
mov ecx, ebx
mov dword [ebp - 8], ebx
mov esi, ebx
mov dword [ebp + 0x10], ecx
test eax, eax
je 0x474afe
mov esi, dword [edi]
sub esi, eax
add esi, 0x10000
mov dword [ebp - 8], esi
mov ebx, 0x10000
sub ebx, esi
test esi, esi
je 0x474b18
push esi
push eax
push dword [edi]
call fcn.0047d8b0
mov ecx, dword [ebp + 0x10]
add esp, 0xc
cmp dword [edi + 0x7c], 0
ja 0x474b28
jb 0x474b25
cmp dword [edi + 0x78], ebx
jae 0x474b28
mov ebx, dword [edi + 0x78]
test ebx, ebx
je 0x474c06
mov eax, dword [edi + 0x44]
mov edx, dword [edi + 0x40]
mov dword [ebp + 0xc], eax
add edx, dword [edi + 0xc8]
mov eax, dword [edi + 0xcc]
adc eax, dword [ebp + 0xc]
push 0
push eax
push edx
push dword [edi + 0xbc]
lea eax, [edi + 0x88]
push eax
call fcn.00477b10
add esp, 0x14
test eax, eax
jne 0x474d75
mov eax, ebx
sub eax, dword [ebp + 0x10]
push eax
mov eax, dword [edi]
add eax, dword [ebp + 0x10]
add eax, esi
push eax
push dword [edi + 0xbc]
push dword [edi + 0xa8]
call dword [edi + 0x90]
mov ecx, dword [ebp + 0x10]
add esp, 0x10
add ecx, eax
add dword [edi + 0x40], eax
mov edx, dword [edi + 0x40]
adc dword [edi + 0x44], 0
mov esi, dword [edi + 0x44]
mov dword [ebp + 0xc], esi
mov esi, dword [ebp - 8]
mov dword [ebp + 0x10], ecx
test eax, eax
jne 0x474bfe
push dword [edi + 0xbc]
push dword [edi + 0xa8]
call dword [edi + 0xa4]
pop ecx
pop ecx
test eax, eax
jne 0x474d75
push dword [ebp + 8]
call fcn.00473ea6
pop ecx
test eax, eax
jne 0x474d86
and dword [edi + 0x40], eax
xorps xmm0, xmm0
and dword [edi + 0x44], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
movlpd qword [ebp - 0x10], xmm0
mov edx, dword [ebp - 0x10]
mov eax, dword [eax + 0x34]
mov dword [edi + 0xbc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp + 0xc], eax
cmp ecx, ebx
jne 0x474b39
mov ebx, dword [ebp + 8]
test byte [ebx + 0x98], 1
je 0x474c68
and dword [ebp + 0xc], 0
test ecx, ecx
je 0x474c68
mov esi, dword [ebp + 0xc]
mov edx, dword [ebx + 0x118]
mov ecx, dword [edi]
and edx, 0xfffd
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor byte [ecx + esi], al
movzx eax, byte [ecx + esi]
push eax
push dword [ebx + 0x11c]
lea eax, [ebx + 0x110]
push eax
call fcn.00474d8d
mov ecx, eax
add esp, 0xc
mov eax, dword [edi]
mov byte [esi + eax], cl
inc esi
mov ecx, dword [ebp + 0x10]
cmp esi, ecx
jb 0x474c1d
mov esi, dword [ebp - 8]
sub dword [edi + 0x78], ecx
mov eax, dword [edi]
push 0
pop ebx
sbb dword [edi + 0x7c], ebx
add ecx, esi
mov dword [edi + 4], eax
mov dword [edi + 8], ecx
mov eax, dword [edi + 0xc0]
test eax, eax
je 0x474d00
cmp dword [edi + 0xd0], ebx
jne 0x474d00
cmp eax, 0xc
je 0x474d65
mov eax, dword [edi + 0x18]
mov dword [ebp + 0x10], eax
mov eax, dword [edi + 0x10]
mov dword [ebp + 0xc], eax
lea eax, [edi + 4]
push 2
push eax
call fcn.0041249b
mov ebx, eax
test ebx, ebx
js 0x474cbd
cmp dword [edi + 0x1c], 0
push 0xfffffffffffffffd
pop eax
cmovne ebx, eax
mov esi, dword [edi + 0x18]
xor eax, eax
mov ecx, esi
sub ecx, dword [ebp + 0x10]
push ecx
push dword [ebp + 0xc]
sbb eax, eax
add dword [edi + 0x68], ecx
push dword [edi + 0x70]
adc dword [edi + 0x6c], eax
sub dword [edi + 0x80], ecx
sbb dword [edi + 0x84], eax
call fcn.00413a16
sub esi, dword [ebp + 0x10]
mov edx, dword [ebp - 4]
add edx, esi
mov dword [edi + 0x70], eax
mov dword [ebp - 4], edx
cmp ebx, 1
je 0x474d71
test ebx, ebx
jne 0x474d7a
jmp 0x474d68
test ecx, ecx
jne 0x474d0c
mov eax, dword [edi + 0x78]
or eax, dword [edi + 0x7c]
je 0x474d7e
mov esi, dword [edi + 0x14]
mov edx, ebx
cmp esi, ecx
cmovae esi, ecx
test esi, esi
je 0x474d2b
mov eax, dword [edi + 4]
mov ecx, dword [edi + 0x10]
mov al, byte [edx + eax]
mov byte [edx + ecx], al
inc edx
cmp edx, esi
jb 0x474d1a
add dword [edi + 0x68], esi
push esi
adc dword [edi + 0x6c], ebx
push dword [edi + 0x10]
sub dword [edi + 0x80], esi
push dword [edi + 0x70]
sbb dword [edi + 0x84], ebx
call fcn.00413a16
mov edx, dword [ebp - 4]
sub dword [edi + 8], esi
sub dword [edi + 0x14], esi
add dword [edi + 0x10], esi
add dword [edi + 4], esi
add dword [edi + 0x18], esi
add edx, esi
mov dword [edi + 0x70], eax
mov dword [ebp - 4], edx
jmp 0x474d68
mov edx, dword [ebp - 4]
cmp dword [edi + 0x14], ebx
ja 0x474ad5
mov eax, edx
jmp 0x474d86
or eax, 0xffffffff
jmp 0x474d86
mov eax, ebx
jmp 0x474d86
mov eax, dword [ebp - 4]
jmp 0x474d86
push 0xffffffffffffff9a
pop eax
pop edi
pop esi
pop ebx
leave
ret 0xc