Function at 0x4f2582
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4afc56
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1240
call fcn.00516a12
push ebx
push esi
mov ebx, ecx
push edi
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x40], ebx
call fcn.00515c44
lea eax, [ebp - 0xb4]
xor edi, edi
push eax
mov dword [ebp - 4], edi
call dword [fcn.004b808c]
xor ecx, ecx
push 0xa
mov dword [ebp - 0x90], ecx
mov byte [ebp - 4], 1
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0x94], edi
mov dword [ebp - 0x88], ecx
lea ecx, [ebp - 0xd8]
mov dword [ebp - 0x4c], edi
call fcn.005167b4
push 0x52e640
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00515dfa
push edi
mov byte [ebp - 4], 3
call dword [0x4b81b0]
push eax
push edi
call dword [fcn.004b80f0]
mov edx, dword [ebx + 0x3118]
push edx
call dword [0x4b71bc]
mov eax, dword [ebx + 0x3118]
push 0xbb8
push eax
call dword [fcn.004b72f4]
mov ecx, dword [ebx + 0x3118]
push ecx
call dword [fcn.004b72a8]
mov esi, dword [ebx + 0x322c]
cmp esi, edi
mov dword [ebp - 0x2c], esi
jne 0x4f26a6
mov esi, dword [ebx + 0x30b4]
cmp esi, edi
je 0x4f2695
mov eax, dword [ebx + 0x30b8]
mov edx, eax
dec eax
test edx, edx
je 0x4f2680
lea edi, [eax + 1]
push 0
mov ecx, esi
call fcn.004eb292
add esi, 4
dec edi
jne 0x4f266f
xor edi, edi
mov eax, dword [ebx + 0x30b4]
push eax
call fcn.00515c1a
add esp, 4
mov dword [ebx + 0x30b4], edi
mov dword [ebx + 0x30bc], edi
mov dword [ebx + 0x30b8], edi
jmp 0x4f27ff
mov ecx, dword [ebx + 0x30b4]
cmp ecx, edi
jne 0x4f2705
lea edi, [esi*4]
push edi
call fcn.00515c92
mov edx, eax
mov ecx, edi
mov dword [ebx + 0x30b4], edx
mov dword [ebp - 0x2c], edx
mov edi, edx
mov edx, ecx
xor eax, eax
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x2c]
lea ecx, [esi]
test eax, eax
je 0x4f26ee
mov dword [eax], 0
add eax, 4
dec ecx
jne 0x4f26e4
mov dword [ebx + 0x30bc], esi
mov dword [ebx + 0x30b8], esi
jmp 0x4f27ff
cmp esi, dword [ebx + 0x30bc]
jg 0x4f2749
mov eax, dword [ebx + 0x30b8]
cmp eax, esi
jge 0x4f2730
mov edx, esi
sub edx, eax
lea eax, [ecx + eax*4]
push edx
push eax
call fcn.004eb2f2
mov dword [ebx + 0x30b8], esi
jmp 0x4f27ff
jle 0x4f273e
sub eax, esi
lea ecx, [ecx + esi*4]
push eax
push ecx
call fcn.004f6072
mov dword [ebx + 0x30b8], esi
jmp 0x4f27ff
mov eax, dword [ebx + 0x30c0]
cmp eax, edi
jne 0x4f277a
mov eax, dword [ebx + 0x30b8]
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x4f276e
mov eax, 4
jmp 0x4f277a
cmp eax, 0x400
jle 0x4f277a
mov eax, 0x400
mov ecx, dword [ebx + 0x30bc]
add eax, ecx
cmp esi, eax
mov dword [ebp - 0x34], eax
jl 0x4f278c
mov dword [ebp - 0x34], esi
mov edx, dword [ebp - 0x34]
lea eax, [edx*4]
push eax
call fcn.00515c92
mov ecx, dword [ebx + 0x30b8]
mov esi, dword [ebx + 0x30b4]
shl ecx, 2
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [ebp - 0x50], eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebx + 0x30b8]
mov edx, esi
sub edx, ecx
lea eax, [eax + ecx*4]
push edx
push eax
call fcn.004eb2f2
mov eax, dword [ebx + 0x30b4]
push eax
call fcn.00515c1a
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x34]
add esp, 4
mov dword [ebx + 0x30b4], ecx
mov dword [ebx + 0x30b8], esi
mov dword [ebx + 0x30bc], edx
lea edi, [ebx + 0x32a0]
push edi
call dword [fcn.004b7240]
mov eax, dword [ebx + 0x310c]
push edi
mov esi, eax
shl esi, 0x1f
shl eax, 0x1b
sar esi, 0x1f
sar eax, 0x1f
mov dword [ebp - 0x130], esi
mov dword [ebp - 0x94], eax
call dword [fcn.004b7244]
test esi, esi
je 0x4f287f
mov ecx, ebx
call fcn.004f44c2
mov esi, dword [fcn.004b7240]
push edi
call esi
mov eax, dword [ebx + 4]
push edi
or al, 8
mov dword [ebx + 4], eax
call dword [fcn.004b7244]
mov eax, dword [ebx + 0x3100]
push 4
push 0
push 0x4c8
push eax
call dword [fcn.004b818c]
push edi
call esi
mov ecx, dword [ebx + 4]
push edi
and ecx, 0xfffffff7
mov dword [ebx + 4], ecx
call dword [fcn.004b7244]
jmp 0x4f2891
mov eax, dword [ebp - 0x94]
xor esi, esi
cmp eax, esi
jne 0x4f2a75
cmp dword [0x53de70], esi
jne 0x4f28ae
mov dword [ebp - 0x2c], esi
jmp 0x4f290e
push 0x53de78
call dword [fcn.004b7240]
push esi
call dword [fcn.004b7248]
mov eax, dword [eax]
mov ecx, dword [0x53de70]
add eax, 0x10
xor edx, edx
imul eax, dword [ecx]
mov edi, 0x76
div edi
lea eax, [ecx + 4]
mov edi, 0x7e
inc edx
add esi, esi
xor esi, dword [eax]
add eax, 4
dec edi
jne 0x4f28e0
mov edi, dword [ecx + edx*4]
mov eax, dword [ecx + 0x1fc]
sub edi, eax
push 0x53de78
add edi, esi
call dword [fcn.004b7244]
cmp edi, 0xffffffff
mov dword [ebp - 0x2c], edi
je 0x4f2a75
lea ecx, [ebp - 0x1c]
call fcn.00515c44
push 0x4f
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.005166fa
push 0x70
lea ecx, [ebp - 0x1c]
call fcn.0051607c
push 0x65
lea ecx, [ebp - 0x1c]
call fcn.0051607c
push 0x6e
lea ecx, [ebp - 0x1c]
call fcn.0051607c
push 0x54
lea ecx, [ebp - 0x1c]
call fcn.0051607c
push 0x68
lea ecx, [ebp - 0x1c]
call fcn.0051607c
push 0x72
lea ecx, [ebp - 0x1c]
call fcn.0051607c
push 0x65
lea ecx, [ebp - 0x1c]
call fcn.0051607c
push 0x61
lea ecx, [ebp - 0x1c]
call fcn.0051607c
push 0x64
lea ecx, [ebp - 0x1c]
call fcn.0051607c
push 0
call dword [fcn.004b7248]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [eax + 0x40]
add eax, 0x40
push ecx
push edx
call dword [0x4b7268]
mov esi, eax
mov eax, dword [ebp - 0x1c]
mov edi, dword [eax - 8]
dec edi
js 0x4f29b0
push 0x20
push edi
lea ecx, [ebp - 0x1c]
call fcn.005160a6
dec edi
jns 0x4f29a2
mov ecx, dword [ebp - 0x2c]
push ecx
push 0
push 0x100002
call esi
mov edi, eax
test edi, edi
jne 0x4f29d1
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.00515c26
jmp 0x4f2a3c
xor esi, esi
push esi
push edi
call dword [fcn.004b72f4]
cmp eax, 0x102
jne 0x4f2a25
push edi
call dword [fcn.004b71c0]
test eax, eax
jne 0x4f2a23
lea edx, [ebp - 0x2c]
push edx
call fcn.0053b5f2
mov eax, dword [eax]
push 0x52e640
push eax
call dword [fcn.004b8060]
add esp, 0xc
lea ecx, [ebp - 0x2c]
test eax, eax
setne byte [ebp - 0x15]
call fcn.00515c26
mov al, byte [ebp - 0x15]
test al, al
je 0x4f2a23
mov esi, 1
jmp 0x4f2a25
xor esi, esi
push edi
call dword [fcn.004b72a8]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.00515c26
test esi, esi
jne 0x4f2a75
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00515c26
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 1
call fcn.0051675a
lea eax, [ebp - 0xb4]
mov byte [ebp - 4], 0
push eax
call dword [fcn.004b8090]
test eax, eax
jge 0x4f43bf
jmp 0x4f43b9
push ebx
call fcn.004f46a2
jmp 0x4f2a8b
mov eax, dword [ebx + 0x30fc]
xor esi, esi
cmp eax, esi
jne 0x4f2a99
mov eax, ebx
mov ecx, dword [eax + 0x30e0]
mov eax, dword [ebx + 0x322c]
dec eax
mov dword [ebp - 0x2c], ecx
cmp eax, esi
mov dword [ebp - 0x34], esi
jle 0x4f2ad9
lea edi, [eax*4]
push edi
call fcn.00515c92
mov edx, eax
mov ecx, edi
mov dword [ebp - 0x34], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
call dword [fcn.004b82d4]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov dword [ebp - 0x78], edx
mov dword [ebx + 0x20], esi
mov ecx, dword [ebx + 0x3214]
lea eax, [ebx + 0x3214]
test ecx, ecx
mov dword [ebp - 0x74], eax
je 0x4f2e9f
mov ecx, dword [ebx + 0x3210]
lea eax, [ebx + 0x3210]
test ecx, ecx
mov dword [ebp - 0xfc], eax
je 0x4f2e9f
mov edx, dword [ebp - 0x74]
mov esi, dword [ebx + 0x20]
mov eax, dword [edx]
dec eax
cmp esi, eax
ja 0x4f2e9f
mov edx, dword [ebp - 0xfc]
lea ecx, [esi + esi*2]
mov edi, dword [edx]
lea esi, [esi + ecx*4]
mov ecx, dword [ebx + 0x20]
add esi, edi
mov dword [ebp - 0x30], esi
mov eax, dword [esi + 1]
push eax
push ecx
call fcn.005215d2
push 0x10
lea edx, [ebp - 0x94]
push 1
push edx
call dword [0x4b7f94]
add esp, 0x14
test eax, eax
jne 0x4f2c3e
mov eax, dword [ebp - 0x28]
push 0x52e640
push eax
call dword [fcn.004b8060]
add esp, 8
test eax, eax
jne 0x4f2bab
mov ecx, dword [ebx + 0x24]
mov edi, dword [esi + 1]
xor edx, edx
cmp ecx, edi
sete dl
mov ecx, ebx
call fcn.005127c2
test eax, eax
je 0x4f2bab
mov word [ebx + 0x30ec], 0xffff
jmp 0x4f2e9f
lea edi, [ebx + 0x32a0]
push edi
call dword [fcn.004b7240]
mov eax, dword [ebx + 4]
test al, 4
jne 0x4f2be0
shl eax, 0x1c
sar eax, 0x1f
push edi
mov dword [ebp - 0x20], eax
call dword [fcn.004b7244]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4f2be7
push 0x64
call dword [fcn.004b72ac]
jmp 0x4f2bb1
push edi
call dword [fcn.004b7244]
mov ecx, ebx
call fcn.00512902
mov eax, dword [ebp - 0x130]
test eax, eax
je 0x4f2c00
push esi
mov ecx, ebx
call fcn.005129c2
mov eax, dword [esi + 1]
test eax, 0xfffff
je 0x4f2c0d
mov dword [ebx + 0x24], eax
xor eax, eax
mov al, byte [esi]
add eax, 0xfffffffe
cmp eax, 0x26
ja 0x4f40a6
jmp dword [eax*4 + 0x43eb90]
mov eax, dword [ebp - 0x94]
test eax, eax
je 0x4f2be7
lea eax, [ebx + 0x32a0]
push eax
call dword [fcn.004b7240]
mov edi, dword [ebx + 4]
lea eax, [ebx + 0x32a0]
shl edi, 0x1d
push eax
sar edi, 0x1f
call dword [fcn.004b7244]
test edi, edi
je 0x4f2be7
mov word [ebx + 0x30ec], 0xffff
jmp 0x4f2e9f
mov edi, dword [0x4b7f94]
mov esi, 1
push 0x10
lea eax, [ebp - 0x94]
push esi
push eax
call edi
add esp, 0xc
test eax, eax
jne 0x4f40ae
mov eax, dword [ebx + 0x30e4]
test eax, eax
je 0x4f40bc
mov eax, dword [ebx + 0x3258]
test eax, eax
je 0x4f40ae
push esi
push 0
push 0
lea ecx, [ebp - 0x1c4]
push 0
push ecx
mov dword [ebp - 0x88], esi
mov dword [ebx + 0x20], eax
call dword [0x4b81c8]
test eax, eax
je 0x4f2af1
mov esi, dword [0x4b81c8]
push 1
push 0
push 0
lea edx, [ebp - 0x1c4]
push 0
push edx
call esi
test eax, eax
jne 0x4f2f08
jmp 0x4f2af1
inc dword [ebx + 0x20]
jmp 0x4f2b22
mov eax, dword [ebx + 0x30e4]
test eax, eax
jne 0x4f4175
push 0x10
lea eax, [ebp - 0x94]
push esi
push eax
call edi
add esp, 0xc
test eax, eax
jne 0x4f4175
mov ax, word [ebx + 0x30ec]
sub eax, 0
je 0x4f4115
dec eax
je 0x4f4106
dec eax
jne 0x4f4126
call dword [fcn.004b82d4]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov ecx, dword [ebp - 0x78]
mov eax, dword [ebx + 0x30f0]
shr edx, 6
sub edx, ecx
cmp edx, eax
jae 0x4f4126
mov ecx, ebx
call fcn.004f47e2
mov dword [ebx + 0x20], eax
jmp 0x4f2af1
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebx + 0x30f0]
inc eax
cmp eax, ecx
mov dword [ebp - 0x4c], eax
jb 0x4f4106
mov eax, dword [ebx + 0x3250]
test eax, eax
je 0x4f4175
push esi
push 0
push 0
lea edx, [ebp - 0x1e0]
push 0
push edx
mov dword [ebp - 0x90], esi
mov dword [ebx + 0x20], eax
call dword [0x4b81c8]
test eax, eax
je 0x4f2af1
mov esi, dword [0x4b81c8]
push 1
push 0
push 0
lea eax, [ebp - 0x1e0]
push 0
push eax
call esi
test eax, eax
jne 0x4f415b
jmp 0x4f2af1
mov eax, dword [ebx + 0x30fc]
test eax, eax
jne 0x4f4181
mov eax, ebx
lea ecx, [ebp - 0x60]
push ebx
push ecx
mov dword [ebp - 0x60], 0x4bbffc
mov dword [ebp - 0x5c], eax
call fcn.004f4bc2
add esp, 8
test eax, eax
jne 0x4f42cc
push 0x56f520
mov dword [ebp - 0x78], 0x56f520
call dword [fcn.004b7240]
inc dword [0x56f538]
mov edi, dword [0x56f4fc]
mov byte [ebp - 4], 0x46
test edi, edi
jne 0x4f42a7
push 0x3174
call fcn.00515c92
mov edi, eax
add esp, 4
mov dword [ebp - 0xbc], edi
test edi, edi
mov byte [ebp - 4], 0x47
je 0x4f4259
lea ecx, [edi + 4]
mov dword [edi], 0x4ba77c
call fcn.0051662e
lea esi, [edi + 0x70]
mov byte [ebp - 4], 0x48
mov ecx, esi
mov dword [ebp - 0xb8], esi
call fcn.0051663a
mov dword [esi], 0x4bb0b0
push 0
lea ecx, [esi + 0x60]
mov byte [ebp - 4], 0x49
call fcn.004d5e92
push 0xa
lea ecx, [esi + 0x30e8]
mov byte [ebp - 4], 0x4a
call fcn.004d61f2
mov dword [esi], 0x4bafd8
lea ecx, [edi + 4]
push 0
push 0
push 0
mov byte [ebp - 4], 0x4b
mov dword [edi], 0x4bafd0
mov dword [ecx], 0x4baf4c
call fcn.00516628
mov esi, 1
jmp 0x4f425b
xor edi, edi
test edi, edi
setne cl
mov byte [ebp - 0x60], cl
mov dword [ebp - 0x5c], edi
mov eax, dword [0x56f4fc]
mov byte [ebp - 4], 0x4c
cmp eax, edi
je 0x4f4296
mov dl, byte [0x56f4f8]
test dl, dl
je 0x4f428e
test eax, eax
je 0x4f428e
mov edx, dword [eax + 4]
lea ecx, [eax + 4]
push esi
call dword [edx + 4]
mov cl, byte [ebp - 0x60]
mov byte [0x56f4f8], cl
jmp 0x4f42a1
test cl, cl
je 0x4f42a1
mov byte [0x56f4f8], 1
mov dword [0x56f4fc], edi
mov eax, dword [0x56f538]
push 0x56f520
dec eax
mov byte [ebp - 4], 3
mov dword [0x56f538], eax
call dword [fcn.004b7244]
mov eax, dword [ebp - 0x2c]
mov ecx, edi
push eax
call fcn.004f6852
push 0x525368
lea ecx, [ebx + 0x28]
call fcn.004f85e2
mov ecx, dword [0x56f058]
mov ebx, dword [ebx + 0x3120]
xor edi, edi
cmp ecx, edi
jne 0x4f4321
push 0x43ec50
call fcn.005169d2
push 0x54
call fcn.00515c92
add esp, 8
mov dword [ebp - 0x78], eax
cmp eax, edi
mov byte [ebp - 4], 0x4d
je 0x4f4313
mov ecx, eax
call fcn.0051a992
jmp 0x4f4315
xor eax, eax
mov ecx, eax
mov byte [ebp - 4], 3
mov dword [0x56f058], ecx
push ebx
call fcn.0051b232
mov eax, dword [ebp - 0xcc]
neg eax
sbb eax, eax
cmp eax, edi
mov dword [ebp - 0x38], eax
je 0x4f437d
mov bl, 0x4e
lea ecx, [ebp - 0x2c]
call fcn.00515c44
lea ecx, [ebp - 0x4c]
lea edx, [ebp - 0x2c]
push ecx
lea eax, [ebp - 0x38]
push edx
push eax
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], bl
mov dword [ebp - 0x4c], edi
call fcn.00516784
mov ecx, dword [ebp - 0x4c]
cmp ecx, edi
je 0x4f436c
mov edx, dword [ecx]
push esi
call dword [edx + 4]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.00515c26
cmp dword [ebp - 0x38], edi
jne 0x4f433a
mov eax, dword [ebp - 0x34]
push eax
call fcn.00515c1a
add esp, 4
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00515c26
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 1
call fcn.0051675a
lea ecx, [ebp - 0xb4]
mov byte [ebp - 4], 0
push ecx
call dword [fcn.004b8090]
cmp eax, edi
jge 0x4f43bf
push eax
call fcn.00516de2
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.00515c26
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret