Function at 0x1004ae10
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push edi
mov edi, dword [ebp + 8]
mov ebx, dword [edi]
movzx eax, byte [edi + 0x1ba]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x24], eax
test dword [ebx + 0xc], 0x4000000
je 0x1004b1fd
mov eax, dword [ebp + 0xc]
push esi
mov esi, 0xfff0bdc0
mov dword [ebp - 8], esi
mov ecx, dword [eax + 0x44]
test ecx, ecx
je 0x1004ae6f
mov edx, dword [ebx + 4]
xor esi, esi
mov dword [ebp - 8], esi
test edx, edx
jle 0x1004ae6f
mov eax, dword [ebx + 8]
add eax, 0xc
lea esp, [esp]
cmp dword [eax], ecx
je 0x1004ae6c
inc esi
add eax, 0x10
cmp esi, edx
jl 0x1004ae60
mov dword [ebp - 8], esi
mov eax, dword [ebx + 8]
mov ecx, esi
add ecx, ecx
mov edx, dword [eax + ecx*8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2c], edx
mov esi, dword [eax + 0x24]
test esi, esi
je 0x1004b00f
lea ebx, [ebx]
cmp byte [edi + 0x1ba], 0
push edx
push dword [esi + 8]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
je 0x1004aebd
push ebx
call fcn.1004a3c0
add esp, 0xc
jmp 0x1004aec8
push 0
push edi
call fcn.10050320
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
je 0x1004afea
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x14]
push ecx
push esi
push eax
push edi
call fcn.1002f050
add esp, 0x14
test eax, eax
jne 0x1004afea
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x1004aefc
mov edx, eax
mov dword [ebp - 0x10], eax
jmp 0x1004af08
mov eax, dword [esi + 0x24]
lea edx, [ebp - 0x28]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x10], edx
xor eax, eax
mov dword [ebp - 0x20], eax
cmp dword [esi + 0x14], eax
jle 0x1004af7d
mov ebx, dword [ebp + 0xc]
lea ecx, [eax*4]
mov eax, dword [ecx + edx]
cmp eax, dword [ebx + 4]
mov ebx, dword [ebp - 0xc]
jne 0x1004af2e
mov dword [ecx + edx], 0xffffffff
cmp dword [ebx + 0x10c], 0
je 0x1004af71
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
test eax, eax
je 0x1004af49
mov eax, dword [eax + 8]
mov eax, dword [ecx + eax]
jmp 0x1004af4c
mov eax, dword [edx + 4]
push dword [ebp - 8]
lea ecx, [eax + eax*2]
mov eax, dword [edx + 0xc]
push dword [eax + ecx*8]
push dword [edx]
push edi
call fcn.1003e7c0
mov edx, dword [ebp - 0x10]
xor ecx, ecx
add esp, 0x10
cmp eax, 2
sete cl
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp eax, dword [esi + 0x14]
jl 0x1004af12
mov eax, dword [ebp - 4]
push dword [eax]
push 0
push dword [eax + 0x14]
push dword [ebp - 8]
push edi
call fcn.1005b0f0
inc dword [edi + 0x44]
add esp, 0x14
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x1004afb9
push dword [ebp - 0x18]
push 0xffffffffffffffff
push eax
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x14]
push dword [ebp - 4]
push dword [ebp - 8]
push edi
call fcn.10029d70
add esp, 0x24
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x1004afdc
push dword [ebp - 0x18]
push 1
push eax
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x14]
push dword [ebp - 4]
push dword [ebp - 8]
push edi
call fcn.10029d70
add esp, 0x24
push dword [ebp - 0x1c]
push ebx
call fcn.10045340
add esp, 8
jmp 0x1004affe
cmp dword [ebp - 0x24], 0
je 0x1004b1fc
cmp byte [ebx + 0x1e], 0
jne 0x1004b1fc
mov esi, dword [esi + 4]
mov edx, dword [ebp - 0x2c]
test esi, esi
jne 0x1004ae90
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov esi, ecx
mov dword [ebp - 0x28], ecx
test ecx, ecx
je 0x1004b02e
cmp byte [ecx], 0
je 0x1004b026
nop
inc esi
cmp byte [esi], 0
jne 0x1004b020
sub esi, ecx
and esi, 0x3fffffff
mov eax, dword [eax + 0x44]
add eax, 0x38
mov dword [ebp - 0x1c], eax
cmp dword [eax + 0xc], 0
je 0x1004b08c
xor eax, eax
mov dword [ebp - 0x20], ecx
test esi, esi
jle 0x1004b07d
xor ebx, ebx
mov edi, esi
lea ebx, [ebx]
movzx eax, byte [ecx]
dec edi
lea ecx, [ebx*8]
movzx edx, byte [eax + 0x100949e0]
xor edx, ecx
mov ecx, dword [ebp - 0x20]
inc ecx
xor ebx, edx
mov dword [ebp - 0x20], ecx
test edi, edi
jg 0x1004b050
mov edi, dword [ebp + 8]
mov dword [ebp - 0x2c], ebx
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x1c]
xor edx, edx
div dword [ecx]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x1c]
jmp 0x1004b08e
xor edx, edx
push edx
push esi
push ecx
push eax
call fcn.10028f00
add esp, 0x10
test eax, eax
je 0x1004b1fc
mov esi, dword [eax + 8]
test esi, esi
je 0x1004b1fc
lea ecx, [ecx]
cmp byte [esi + 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp + 8], 0
jne 0x1004b0da
cmp dword [edi + 0x1a8], 0
jne 0x1004b0da
cmp byte [edi + 0x158], 0
je 0x1004b1f1
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x1c]
push eax
push esi
push dword [ebp + 0xc]
push edi
call fcn.1002f050
add esp, 0x14
test eax, eax
je 0x1004b10c
cmp dword [ebp - 0x24], 0
je 0x1004b1fc
cmp byte [ebx + 0x1e], 0
jne 0x1004b1fc
jmp 0x1004b1f1
push 0x40
push ebx
call fcn.100453d0
add esp, 8
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x1004b1e5
push 0x40
push 0
push eax
call sub.MSVCR120.dll_memset
mov ecx, dword [ebp - 0x2c]
mov eax, 1
mov word [ecx + 2], ax
movsx eax, word [ecx]
push eax
push 1
push ecx
push ebx
call fcn.1005a4e0
mov ebx, eax
add esp, 0x1c
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x1e], 0
je 0x1004b15b
push ebx
mov ebx, eax
jmp 0x1004b1dc
movsx ecx, word [ebx]
lea eax, [ecx*8]
sub eax, ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebx + eax*8 - 0x2c], 0
mov dword [ebx + eax*8 - 0x30], 0
mov eax, dword [esi]
mov dword [ebx + 0x14], eax
mov eax, dword [esi]
mov eax, dword [eax]
mov dword [ebx + 0xc], eax
mov eax, dword [ebx + 0x14]
inc word [eax + 0x20]
mov eax, dword [edi + 0x44]
mov dword [ebx + 0x20], eax
inc dword [edi + 0x44]
mov eax, dword [ebp - 0x1c]
test ecx, ecx
je 0x1004b1b5
push 0xffffffffffffffff
push ecx
push dword [ebp + 8]
push esi
push eax
push dword [ebp + 0xc]
push ebx
push edi
call fcn.1002a590
mov eax, dword [ebp - 0x1c]
add esp, 0x20
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x1004b1d1
push 1
push ecx
push dword [ebp + 8]
push esi
push eax
push dword [ebp + 0xc]
push ebx
push edi
call fcn.1002a590
add esp, 0x20
mov dword [ebx + 0xc], 0
push ebx
mov ebx, dword [ebp - 0xc]
push ebx
call fcn.1005a1f0
add esp, 8
push dword [ebp + 8]
push ebx
call fcn.10045340
add esp, 8
mov esi, dword [esi + 0xc]
test esi, esi
jne 0x1004b0b0
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret