Function at 0x100d81f5
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
xor edi, edi
push edi
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
call fcn.100d7dcf
add esp, 0x28
test al, al
je 0x100d83b3
mov ecx, dword [ebp + 0x10]
test cl, 0x10
mov eax, dword [ebp - 8]
mov esi, eax
jne 0x100d824f
test ecx, 0x400000
je 0x100d8253
sar eax, 1
mov esi, eax
mov eax, ecx
and eax, 0x40
je 0x100d825c
sar esi, 1
test ecx, 0x40000
je 0x100d8271
cmp eax, edi
je 0x100d8271
and ecx, 0xffffefff
mov dword [ebp + 0x10], ecx
mov edx, ecx
and dl, 0x40
neg dl
mov eax, 0xff
push eax
mov ebx, 0xffffff7f
sbb edx, edx
and edx, ebx
add edx, 0x80
push edx
push eax
push dword [ebp - 0x14]
push ecx
push esi
push dword [ebp + 8]
call fcn.100c5f98
mov esi, eax
cmp esi, edi
je 0x100d83b3
mov eax, dword [esi + 0x10c]
dec eax
push eax
push edi
push esi
call fcn.100c6dfb
mov eax, dword [ebp - 0x18]
push edi
mov dword [esi + 0x164], eax
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
call fcn.100d3156
mov edi, dword [esi + 0x164]
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp + 8]
push eax
push dword [ebp - 8]
push 0
push esi
call fcn.100c6baa
test al, al
jne 0x100d82fd
push esi
call fcn.100c6028
jmp 0x100d83b3
xor eax, eax
cmp dword [edi + 4], eax
jne 0x100d8308
cmp dword [edi], eax
je 0x100d830e
test byte [ebp + 0x12], 0x40
je 0x100d8333
test byte [ebp + 0x10], 0x10
push dword [ebp + 0xc]
je 0x100d8321
mov eax, dword [ebp - 4]
shr eax, 1
push eax
push 2
jmp 0x100d8326
push dword [ebp - 4]
push 1
push dword [ebp + 8]
call fcn.100d2ed8
jmp 0x100d83ca
push 0x311
mov edi, str.F:dev_fmodsrc372win_src_format_wav.c
push edi
push dword [ebp - 4]
push eax
call fcn.100d25e1
add esp, 0x10
test eax, eax
mov dword [ebp - 0xc], eax
jne 0x100d8363
push esi
call fcn.100c6028
mov dword [0x101337d8], 0xc
jmp 0x100d83b3
push dword [ebp + 0xc]
push dword [ebp - 4]
push 1
push eax
call fcn.100d2ed8
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
push dword [ebp - 4]
push dword [ebp - 0xc]
push dword [esi + 0x164]
call fcn.100d80cd
add esp, 0x24
test al, al
jne 0x100d83ba
push esi
call fcn.100c6028
push 0x31e
push edi
push dword [ebp - 0xc]
push 0
call fcn.100d2588
add esp, 0x10
mov dword [0x101337d8], 0xb
xor eax, eax
jmp 0x100d8475
push 0x323
push edi
push dword [ebp - 0xc]
push 0
call fcn.100d2588
mov eax, dword [ebp + 0x10]
add esp, 0x10
test al, 8
je 0x100d8409
mov ecx, dword [ebp + 8]
xor edx, edx
cmp dword [ebp - 0x10], edx
jbe 0x100d83eb
xor byte [ecx], 0x80
inc ecx
inc edx
cmp edx, dword [ebp - 0x10]
jb 0x100d83de
mov eax, dword [ebp + 0x10]
and eax, ebx
mov ecx, 0x100
or eax, ecx
mov dword [ebp + 0x10], eax
mov edx, dword [esi + 0x124]
lea eax, [esi + 0x124]
and edx, ebx
or edx, ecx
mov dword [eax], edx
push dword [ebp - 0x20]
push dword [ebp - 0x10]
push dword [ebp - 0x24]
push dword [ebp + 8]
push esi
call fcn.100c6c47
test byte [ebp + 0x10], 0x10
mov eax, dword [ebp - 8]
je 0x100d8426
sar eax, 1
test byte [ebp + 0x10], 0x40
je 0x100d842e
sar eax, 1
xor ecx, ecx
cmp dword [ebp - 0x30], ecx
jne 0x100d8445
cmp dword [ebp - 0x2c], ecx
jne 0x100d8445
dec eax
push eax
push ecx
push esi
call fcn.100c6dfb
jmp 0x100d8468
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push esi
call fcn.100c6dfb
mov eax, dword [ebp + 0x10]
test al, 1
jne 0x100d8468
and eax, 0xfffffffa
or eax, 2
push eax
push esi
mov dword [ebp + 0x10], eax
call fcn.100c6c90
push dword [esi + 0x164]
call fcn.100d8080
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret