Function at 0x491200
Capabilities:
Encode data using xor

Disassembly:
push ebp
lea ebp, [esp - 0x84c]
sub esp, 0x84c
push 0xffffffffffffffff
push 0x53c310
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x5755c4]
xor eax, ebp
mov dword [ebp + 0x848], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
push 0x67
call fcn.004193f0
mov ecx, dword [edi]
call fcn.00473af0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x74], edx
xor edx, edx
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x7c], eax
mov dword [0x5b7828], 0xffffffff
mov dword [ebp - 0x5c], edx
mov byte [ebp - 0x58], dl
mov dword [ebp - 4], edx
xor ebx, ebx
cmp dword [edi + 0x74], ebx
jbe 0x4912c1
mov ecx, dword [ebp - 0x10]
xor edi, edi
mov esi, dword [ecx + 0x70]
mov eax, dword [esi + edi]
cmp eax, dword [ecx + 0x98]
jne 0x4912b5
mov eax, dword [esi + edi + 4]
cmp eax, dword [ecx + 0x9c]
jne 0x4912b5
mov esi, dword [esi + edi + 8]
lea ecx, [ebp - 0x68]
push 1
call fcn.0041e780
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x10]
mov dword [eax + edx*4 - 4], esi
inc ebx
add edi, 0x10
cmp ebx, dword [ecx + 0x74]
jb 0x491280
mov edi, dword [ebp - 0x10]
xor ecx, ecx
mov eax, edx
mov edx, 0x818
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00507864
push 0x4929c0
push 0x20
push dword [edi + 0x4c]
mov ebx, eax
push dword [edi + 0x48]
mov dword [ebp - 0x24], ebx
call fcn.00528d90
mov eax, dword [edi + 0x60]
mov esi, 1
shl eax, 4
add esp, 0x14
shr eax, 3
mov dword [ebp - 0x50], esi
cmp eax, esi
jbe 0x491311
add esi, esi
mov dword [ebp - 0x50], esi
cmp esi, eax
jb 0x491308
lea eax, [esi - 1]
push esi
mov dword [ebp - 0x4c], eax
call fcn.00507864
push esi
push 0
push eax
mov dword [ebp - 0x54], eax
call fcn.00520500
add esp, 0x10
mov byte [ebp - 4], 1
xor ecx, ecx
mov dword [ebp - 0x38], ecx
cmp dword [edi + 0x60], ecx
jbe 0x4913bb
xor ebx, ebx
mov esi, dword [edi + 0x5c]
add esi, ebx
mov eax, dword [esi]
cmp eax, dword [edi + 0x98]
jne 0x4913ac
mov eax, dword [esi + 4]
cmp eax, dword [edi + 0x9c]
jne 0x4913ac
mov edi, dword [esi + 8]
mov edx, edi
mov esi, dword [esi + 0xc]
mov eax, esi
shrd edx, eax, 3
and edx, dword [ebp - 0x4c]
shr eax, 3
mov eax, dword [ebp - 0x54]
movzx ecx, byte [edx + eax]
mov eax, edi
and eax, 7
bts ecx, eax
mov eax, dword [ebp - 0x54]
shrd edi, esi, 0x1e
shr esi, 0x1e
mov byte [edx + eax], cl
mov ecx, edi
mov edx, dword [ebp - 0x54]
and edi, 7
shrd ecx, esi, 3
and ecx, dword [ebp - 0x4c]
shr esi, 3
movzx eax, byte [ecx + eax]
bts eax, edi
mov edi, dword [ebp - 0x10]
mov byte [ecx + edx], al
mov ecx, dword [ebp - 0x38]
inc ecx
add ebx, 0x28
mov dword [ebp - 0x38], ecx
cmp ecx, dword [edi + 0x60]
jb 0x491340
mov ebx, dword [ebp - 0x24]
lea eax, [ebp + 0x48]
push eax
call fcn.00469d00
xor eax, eax
xor edx, edx
mov esi, SysReAllocString
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x64], eax
jbe 0x491464
mov ecx, ebx
mov dword [ebp - 0x30], ecx
jmp 0x4913ec
mov edx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x68]
mov eax, dword [ebx + eax*4]
mov dword [ecx], eax
cmp eax, edx
jbe 0x4913fb
mov dword [ebp - 0x2c], eax
cmp eax, esi
jae 0x491402
mov dword [ebp - 0x38], eax
lea edi, [ecx + 8]
xor ebx, ebx
mov byte [edi + 0x808], 0
mov edi, edi
mov esi, dword [ecx]
movzx eax, bl
mov edx, dword [ebp + eax*8 + 0x48]
mov eax, dword [ebp + eax*8 + 0x4c]
test esi, esi
je 0x49143b
movzx ecx, dl
shrd edx, eax, 8
shr eax, 8
xor edx, dword [ebp + ecx*8 + 0x48]
xor eax, dword [ebp + ecx*8 + 0x4c]
sub esi, 1
jne 0x491421
mov ecx, dword [ebp - 0x30]
mov dword [edi], edx
inc ebx
mov dword [edi + 4], eax
add edi, 8
cmp ebx, 0x100
jb 0x491410
mov eax, dword [ebp - 0x34]
add ecx, 0x818
inc eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x34], eax
cmp eax, dword [ebp - 0x64]
jb 0x4913e6
mov edi, dword [ebp - 0x10]
push 0x400000
call fcn.00507864
mov edi, dword [edi]
add esp, 4
mov dword [ebp - 0x20], eax
mov edx, dword [edi]
push 0
push 0
push 0
mov esi, dword [edx + 0x10]
mov ecx, esi
call dword [0x540780]
mov ecx, edi
call esi
mov ebx, dword [ebp - 0x10]
push 0x400000
mov edi, dword [ebx]
mov ebx, dword [ebp - 0x20]
push ebx
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x540780]
mov ecx, edi
call esi
mov esi, eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x14], esi
test eax, eax
je 0x4914f5
mov esi, dword [ebp - 0x24]
mov edi, eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [esi]
cmp eax, ecx
jb 0x4914e7
push ecx
push ebx
push 0
push 0
call fcn.00469a60
mov dword [esi + 0x808], eax
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x80c], edx
mov byte [esi + 0x810], 1
add esi, 0x818
sub edi, 1
jne 0x4914c0
mov esi, dword [ebp - 0x14]
xor ecx, ecx
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x70], ecx
xor edx, edx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x18], edx
mov edi, dword [ebp - 0x10]
nop
lea eax, [edx + 0x40]
mov dword [ebp - 0x78], edx
cmp eax, esi
jae 0x491606
cmp byte [edx + ebx], 0x7b
jne 0x491606
cmp byte [edx + ebx + 1], 0x52
jne 0x491606
cmp byte [edx + ebx + 2], 0x42
jne 0x491606
cmp byte [edx + ebx + 3], 0x7d
jne 0x491606
cmp byte [edx + ebx + 0x14], 1
jne 0x491606
mov esi, dword [edx + ebx + 0xc]
mov eax, dword [ebp - 0x2c]
add esi, edx
add eax, esi
cmp eax, dword [ebp - 0x14]
jae 0x491603
mov eax, dword [edi + 0x98]
xor ecx, ecx
mov dword [ebp], eax
mov eax, dword [edi + 0x9c]
push 0x4929c0
mov dword [ebp + 4], eax
mov eax, edx
add eax, dword [ebp - 0x40]
push 0x20
push dword [edi + 0x4c]
adc ecx, dword [ebp - 0x3c]
push dword [edi + 0x48]
mov dword [ebp + 0x10], eax
lea eax, [ebp]
push eax
mov dword [ebp + 0x14], ecx
call fcn.005293b2
add esp, 0x14
test eax, eax
je 0x491600
mov ecx, dword [ebp - 0x64]
mov edx, esi
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
test ecx, ecx
je 0x491510
mov esi, dword [ebp - 0x24]
add ebx, edx
add esi, 0x810
mov edi, ecx
push dword [esi - 0x810]
push ebx
push 0
push 0
call fcn.00469a60
mov dword [esi - 8], eax
lea esi, [esi + 0x818]
mov dword [esi - 0x81c], edx
mov byte [esi - 0x818], 1
sub edi, 1
jne 0x4915c7
mov edx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x14]
jmp 0x49150c
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
xor eax, eax
mov dword [ebp - 0x44], eax
xor al, al
mov byte [ebp - 0x19], al
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x491859
mov ebx, dword [ebp - 0x24]
add ebx, 0x808
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x48], ebx
lea ebx, [ebx]
cmp byte [ebx + 8], 0
je 0x4917c7
mov esi, dword [ebx]
mov edx, 1
mov edi, dword [ebx + 4]
mov ecx, esi
and ecx, 7
mov dword [ebp + 0x28], esi
shl edx, cl
mov eax, edi
mov ecx, esi
mov dword [ebp + 0x2c], edi
shrd ecx, eax, 3
and ecx, dword [ebp - 0x4c]
shr eax, 3
mov eax, dword [ebp - 0x54]
test byte [ecx + eax], dl
je 0x4917c1
mov edx, dword [ebp - 0x54]
mov eax, 1
shrd esi, edi, 0x1e
shr edi, 0x1e
mov ecx, esi
shrd esi, edi, 3
and ecx, 7
and esi, dword [ebp - 0x4c]
shl eax, cl
shr edi, 3
mov edi, dword [ebp - 0x10]
test byte [esi + edx], al
je 0x4917c4
mov eax, dword [edi + 0x98]
push 0x4928e0
mov dword [ebp + 0x20], eax
mov eax, dword [edi + 0x9c]
push 0x28
push dword [edi + 0x60]
mov dword [ebp + 0x24], eax
mov eax, dword [ebx - 0x808]
push dword [edi + 0x5c]
mov dword [ebp + 0x40], eax
lea eax, [ebp + 0x20]
push eax
call fcn.005293b2
mov ecx, eax
add esp, 0x14
test ecx, ecx
je 0x4917c4
mov ebx, dword [ecx + 0x1c]
mov eax, dword [ecx + 0x14]
mov edi, dword [ecx + 0x18]
mov esi, dword [ecx + 0x10]
cmp ebx, eax
jb 0x4916f6
ja 0x4916eb
cmp edi, esi
jbe 0x4916f6
mov edx, edi
mov eax, ebx
sub edx, esi
sbb eax, dword [ecx + 0x14]
jmp 0x4916fc
mov edx, esi
sub edx, edi
sbb eax, ebx
mov ebx, dword [ebp - 0x18]
mov edi, 0
add ebx, dword [ebp - 0x40]
mov dword [ebp - 0x6c], ebx
adc edi, dword [ebp - 0x3c]
cmp edi, dword [ecx + 0x14]
mov dword [ebp - 0x30], edi
mov edi, dword [ecx + 0x18]
jb 0x491728
ja 0x49171e
cmp ebx, esi
jbe 0x491728
sub ebx, esi
mov esi, dword [ebp - 0x30]
sbb esi, dword [ecx + 0x14]
jmp 0x491733
mov ebx, esi
mov esi, dword [ecx + 0x14]
sub ebx, dword [ebp - 0x6c]
sbb esi, dword [ebp - 0x30]
cmp edi, 0x7fffffff
jne 0x491740
cmp dword [ecx + 0x1c], edi
je 0x49174a
cmp esi, eax
ja 0x4917be
jb 0x49174a
cmp ebx, edx
jae 0x4917be
mov eax, dword [ebp - 0x6c]
mov ebx, dword [ebp - 0x70]
mov dword [ecx + 0x18], eax
mov eax, dword [ebp - 0x30]
mov dword [ecx + 0x1c], eax
mov eax, dword [ebp + 0x40]
mov dword [ebp - 0x44], eax
test ebx, ebx
je 0x49179b
mov edx, dword [ebx + 0x20]
cmp edx, dword [ecx + 0x20]
jne 0x49179b
mov eax, dword [ebx + 0x18]
mov esi, dword [ebx + 0x1c]
add eax, edx
adc esi, 0
cmp eax, dword [ecx + 0x18]
jne 0x49179b
cmp esi, dword [ecx + 0x1c]
jne 0x49179b
mov eax, dword [ebx + 0x10]
add eax, edx
mov edx, dword [ebx + 0x14]
adc edx, 0
cmp eax, dword [ecx + 0x10]
jne 0x49179b
cmp edx, dword [ecx + 0x14]
jne 0x49179b
mov esi, dword [ebp - 0x34]
inc esi
jmp 0x49179d
xor esi, esi
mov eax, dword [ebp - 0x2c]
xor edx, edx
div dword [ecx + 0x20]
mov dword [ebp - 0x34], esi
inc eax
cmp eax, 5
jae 0x4917b3
mov eax, 5
cmp esi, eax
jbe 0x4917bb
mov byte [ebp - 0x19], 1
mov dword [ebp - 0x70], ecx
mov ebx, dword [ebp - 0x48]
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x28]
add ebx, 0x818
sub eax, 1
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x28], eax
jne 0x491630
mov al, byte [ebp - 0x19]
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
test al, al
je 0x491859
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x491859
lea ecx, [eax + edx]
mov eax, dword [ebp - 0x2c]
add eax, ecx
cmp eax, esi
jae 0x491859
mov ebx, dword [ebp - 0x20]
cmp byte [edx + ebx], 0
je 0x491859
mov esi, dword [ebp - 0x24]
mov eax, ecx
mov edi, dword [ebp - 0x64]
add ebx, eax
mov dword [ebp - 0x18], eax
add esi, 0x810
jmp 0x491820
push dword [esi - 0x810]
push ebx
push 0
push 0
call fcn.00469a60
mov dword [esi - 8], eax
lea esi, [esi + 0x818]
mov dword [esi - 0x81c], edx
mov byte [esi - 0x818], 1
sub edi, 1
jne 0x491820
mov edx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x14]
jmp 0x49150c
mov ecx, dword [ebp - 0x2c]
lea eax, [edx + ecx]
cmp eax, esi
jb 0x491941
mov ebx, esi
sub ebx, edx
cmp ebx, ecx
jne 0x491931
call fcn.0049e910
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
push ebx
add eax, ecx
push eax
push ecx
call fcn.0051ff80
mov eax, dword [ebp - 0x40]
add esp, 0xc
add eax, dword [ebp - 0x78]
mov edi, dword [edi]
adc dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], eax
mov eax, 0x400000
sub eax, ebx
mov dword [ebp - 0x18], 0
mov esi, dword [edi]
push eax
mov eax, dword [ebp - 0x20]
add eax, ebx
mov esi, dword [esi + 0xc]
mov ecx, esi
push eax
call dword [0x540780]
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x7c]
lea esi, [eax + ebx]
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x14], esi
mov edi, dword [ebx]
cmp ecx, 0x7fffffff
jne 0x4918ec
cmp eax, ecx
jne 0x4918ec
mov edx, dword [ebp - 0x18]
mov dword [0x5b7828], 0xffffffff
jmp 0x491934
push eax
push ecx
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
call fcn.0049d200
mov ecx, dword [edi + 0x2214]
mov esi, eax
cmp byte [ecx + 0x6148], 0
jne 0x491923
cmp esi, dword [0x5b7828]
je 0x491923
push 0
push 0x64
cdq
push edx
push eax
push 0x5508b4
call fcn.004a0b80
mov edx, dword [ebp - 0x18]
mov dword [0x5b7828], esi
mov esi, dword [ebp - 0x14]
jmp 0x491934
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x38]
add eax, edx
cmp eax, esi
jae 0x4919cb
mov ecx, dword [ebp - 0x64]
test ecx, ecx
je 0x4919c2
mov edi, dword [ebp - 0x24]
xor ebx, ebx
add edi, 0x808
mov dword [ebp - 0x44], ecx
mov eax, dword [edi - 0x808]
add eax, edx
cmp eax, esi
jae 0x4919aa
mov ecx, dword [ebp - 0x20]
movzx eax, byte [eax + ecx]
movzx ecx, byte [edx + ecx]
xor eax, dword [edi]
add ecx, ebx
mov edx, dword [ebp - 0x24]
movzx eax, al
mov esi, dword [ebp + eax*8 + 0x48]
xor esi, dword [edx + ecx*8 + 8]
mov edx, dword [ebp + eax*8 + 0x4c]
mov eax, dword [ebp - 0x24]
xor edx, dword [eax + ecx*8 + 0xc]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
shrd eax, ecx, 8
shr ecx, 8
xor esi, eax
xor edx, ecx
mov dword [edi], esi
mov ecx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x14]
mov dword [edi + 4], edx
mov edx, dword [ebp - 0x18]
jmp 0x4919ae
mov byte [edi + 8], 0
add ebx, 0x103
add edi, 0x818
sub ecx, 1
mov dword [ebp - 0x44], ecx
jne 0x491956
mov ebx, dword [ebp - 0x20]
inc edx
jmp 0x491509
push dword [ebp - 0x20]
call fcn.0050786d
push dword [ebp - 0x24]
call fcn.0050786d
mov esi, dword [ebx]
add esp, 8
push 0
push 0x64
push 0
push 0x64
call fcn.0049d200
mov ecx, dword [esi + 0x2214]
mov edi, eax
cmp byte [ecx + 0x6148], 0
jne 0x491a17
cmp edi, dword [0x5b7828]
je 0x491a17
push 0
push 0x64
cdq
push edx
push eax
push 0x5508b4
call fcn.004a0b80
mov dword [0x5b7828], edi
mov byte [ebp - 4], 0
push 1
push dword [ebp - 0x54]
call fcn.00507505
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov ebx, dword [ebp - 0x68]
test ebx, ebx
je 0x491a58
cmp byte [ebp - 0x58], 0
je 0x491a4f
mov eax, dword [ebp - 0x60]
shl eax, 2
push eax
push ebx
call fcn.0049b220
push ebx
call fcn.00524aa2
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x848]
xor ecx, ebp
call fcn.00507712
lea esp, [ebp + 0x84c]
pop ebp
ret