Function at 0x4101ac
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffba8
mov edi, edx
mov esi, eax
test edi, edi
je 0x41053c
mov eax, 0xdd2
call fcn.0041501c
push eax
call fcn.0042b1e0
pop ecx
xor edx, edx
or word [esi + 0x3208], 0x40
mov eax, dword [esi + 0x57d0]
push edx
add eax, 7
xor edx, edx
push eax
mov eax, esi
call fcn.0040bcc0
xor ecx, ecx
mov edx, 0x73
mov eax, esi
call fcn.0040ed2c
push 0
push 0
mov edx, 2
mov eax, esi
call fcn.0040bcc0
mov eax, esi
call fcn.0040bd3c
mov dword [esp], eax
mov dword [esp + 4], edx
mov edx, dword [esp]
mov dword [esp + 8], edx
mov edx, dword [esp + 4]
mov dword [esp + 0xc], edx
push dword [esp + 4]
push dword [esp + 4]
mov eax, edi
call fcn.00410548
mov dword [esp + 0x10], 0
lea ebx, [esi + 0x3e8c]
mov edi, eax
mov dword [esp + 0x14], 0
lea eax, [ebx + 0xc30]
mov edx, 0x14
call fcn.0040eb4c
mov word [ebx + 8], 0x8000
xor ecx, ecx
mov eax, esi
mov dword [ebx + 0x24], ecx
xor ecx, ecx
or word [esi + 0x3e94], 0x4000
push 0
push fcn.0043923c
push 0
xor edx, edx
call fcn.0040fe34
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.0040bcc0
xor ecx, ecx
xor ebx, ebx
mov edx, edi
mov dword [esp + 0x18], ecx
shl edx, 9
lea eax, [esp + 0x220]
call fcn.0040c06c
push dword [esp + 0x224]
push 0
push dword [esp + 0x228]
call fcn.00438f78
add esp, 0xc
mov dword [esp + 0x1c], 0xfffffff
jmp 0x4103fa
call fcn.004124b0
cmp dword [esp + 4], 0
jne 0x4102ed
cmp dword [esp], 0x200
jae 0x410321
jmp 0x4102ef
jge 0x410321
mov eax, dword [esp]
mov ebp, eax
mov eax, 0x200
sub eax, ebp
push eax
push 0
lea edx, [esp + 0x234]
add edx, ebp
push edx
call fcn.00438f78
add esp, 0xc
mov dword [esp], 0
mov dword [esp + 4], 0
jmp 0x410332
mov ebp, 0x200
sub dword [esp], 0x200
sbb dword [esp + 4], 0
lea edx, [esp + 0x22c]
mov ecx, ebp
mov eax, esi
call fcn.0040bb84
mov edx, dword [esp + 0x18]
shl edx, 9
add edx, dword [esp + 0x220]
xor eax, eax
mov cl, byte [esp + eax + 0x22c]
xor byte [edx + eax], cl
inc eax
cmp eax, 0x200
jl 0x410352
lea edx, [esp + 0x22c]
mov ecx, 0x200
or eax, 0xffffffff
call fcn.0041286c
mov byte [esp + ebx + 0x20], al
inc ebx
shr eax, 8
mov byte [esp + ebx + 0x20], al
inc ebx
cmp ebx, 0x200
jne 0x4103de
lea eax, [esp + 0x42c]
mov edx, esi
call fcn.0040b5d0
push 0
push 0
mov edx, 2
mov eax, esi
call fcn.0040bcc0
lea edx, [esp + 0x20]
mov ecx, ebx
mov eax, esi
call fcn.0040ba44
lea edx, [esp + 0x20]
mov ecx, ebx
mov eax, dword [esp + 0x1c]
call fcn.0041286c
mov dword [esp + 0x1c], eax
xor ebx, ebx
lea eax, [esp + 0x42c]
mov edx, 2
call fcn.0040b5ec
add dword [esp + 0x10], 1
adc dword [esp + 0x14], 0
inc dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
cmp ecx, edi
jb 0x4103fa
xor eax, eax
mov dword [esp + 0x18], eax
cmp dword [esp + 4], 0
jne 0x41040d
cmp dword [esp], 0
ja 0x4102d6
jmp 0x410413
jg 0x4102d6
push 0
push 0
mov edx, 2
mov eax, esi
call fcn.0040bcc0
lea edx, [esp + 0x20]
mov ecx, ebx
mov eax, esi
call fcn.0040ba44
lea edx, [esp + 0x20]
mov ecx, ebx
mov eax, dword [esp + 0x1c]
call fcn.0041286c
mov dword [esp + 0x1c], eax
mov ebx, edi
shl ebx, 9
mov ecx, ebx
mov edx, dword [esp + 0x220]
mov eax, esi
call fcn.0040ba44
mov ecx, ebx
mov edx, dword [esp + 0x220]
mov eax, dword [esp + 0x1c]
call fcn.0041286c
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
not eax
mov dword [esi + 0x3ea4], eax
mov eax, esi
push dword [esp + 0xc]
push dword [esp + 0xc]
xor edx, edx
call fcn.0040bcc0
lea eax, [esp + 0x438]
xor edx, edx
call fcn.0041cb3c
mov edx, 0x43923f
lea eax, [esp + 0x438]
mov ecx, 8
call fcn.0041cce0
lea eax, [esp + 0x438]
mov edx, edi
call fcn.0041cc68
push dword [esp + 0x14]
push dword [esp + 0x14]
lea eax, [esp + 0x440]
call fcn.0041ccb8
lea edx, [esi + 0x4abc]
lea eax, [esp + 0x438]
call fcn.0041cda8
push 0
push fcn.0043923c
push 0
push 0
push 2
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
call fcn.0043c054
mov ecx, eax
add ecx, ebx
xor edx, edx
mov eax, esi
call fcn.0040fe34
push 0
push 0
mov edx, 2
mov eax, esi
call fcn.0040bcc0
lea eax, [esp + 0x438]
mov edx, 2
call fcn.0041cb70
lea eax, [esp + 0x220]
mov edx, 2
call fcn.00409ffc
add esp, 0x458
pop ebp
pop edi
pop esi
pop ebx
ret