Function at 0x1003f7a0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x874
mov ecx, 0x18
xor eax, eax
push ebx
mov ebx, dword [esp + 0x87c]
push ebp
push esi
push edi
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov ecx, dword [0x107ab964]
lea eax, [esp + 0x24]
push eax
push ebx
push ecx
call fcn.1000fc50
add esp, 0xc
test eax, eax
je 0x1003f94c
mov ecx, dword [0x107ab964]
push ebx
mov edx, dword [ecx]
call dword [edx + 0x20]
mov esi, eax
test esi, esi
mov dword [esp + 0x20], esi
jl 0x1003f94c
mov edx, dword [esp + 0x34]
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x84]
rep stosd dword es:[edi], eax
push eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x88]
push eax
mov eax, dword [0x107ab964]
push ecx
push 0x800
push 0x100
push edx
push esi
push ebx
push eax
call fcn.100253e0
add esp, 0x24
test eax, eax
je 0x1003f94c
cmp dword [esp + 0x14], 0x100
jne 0x1003f94c
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x13]
push ecx
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x2c]
push eax
push ecx
lea edx, [esp + 0x94]
push 0x100
push edx
mov byte [esp + 0x2b], 0
mov dword [esp + 0x30], 0
call fcn.100daf70
mov edx, dword [esp + 0x30]
add esp, 0x18
test edx, edx
jbe 0x1003f94c
cmp edx, dword [esp + 0x5c]
ja 0x1003f94c
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x84]
push eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x88]
push eax
push ecx
push 0x800
push 0x800
push edx
mov edx, dword [0x107ab964]
push esi
push ebx
push edx
call fcn.100253e0
add esp, 0x24
test eax, eax
je 0x1003f94c
mov ecx, dword [esp + 0x14]
cmp ecx, 0x800
ja 0x1003f94c
xor eax, eax
test ecx, ecx
jle 0x1003f8fd
mov dl, byte [esp + 0x13]
mov bl, byte [esp + eax + 0x84]
xor bl, dl
mov byte [esp + eax + 0x84], bl
inc eax
cmp eax, ecx
jl 0x1003f8e8
cmp eax, ecx
jne 0x1003f94c
push 0x18000
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x1003f94c
xor eax, eax
mov ecx, 0x6000
mov edi, ebp
push eax
rep stosd dword es:[edi], eax
push 0x400
push ebp
lea eax, [esp + 0x90]
push 0x800
push eax
call fcn.10024c10
mov edi, eax
add esp, 0x14
test edi, edi
jg 0x1003f959
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x874
ret
xor ebx, ebx
xor esi, esi
test edi, edi
jle 0x1003f9b2
lea eax, [ebp + 0x2e]
mov edx, 0x2a
mov ecx, 0x8d
cmp dword [eax - 0x1e], 0x118
jne 0x1003f986
cmp dword [eax], 0x25
jne 0x1003f986
cmp dword [eax + 0x15], edx
jne 0x1003f986
cmp dword [eax + 8], ecx
je 0x1003f990
inc esi
add eax, 0x60
cmp esi, edi
jl 0x1003f96e
jmp 0x1003f9b2
mov eax, dword [esp + 0x1c]
lea ecx, [esi + esi*2]
mov edx, dword [esp + 0x40]
shl ecx, 5
mov ebx, dword [ecx + ebp + 0x3b]
mov ecx, dword [esp + 0x18]
add eax, ebx
mov dword [esp + 0x1c], eax
sub eax, edx
sub eax, ecx
mov ebx, eax
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
test ebx, ebx
jle 0x1003f94c
mov eax, dword [esp + 0x14]
lea edx, [ebx + 4]
cmp eax, edx
jl 0x1003f94c
cmp esi, edi
jge 0x1003f94c
mov eax, dword [esp + ebx + 0x84]
mov ecx, dword [esp + 0x40]
sub eax, ecx
je 0x1003f94c
cmp eax, dword [esp + 0x5c]
jae 0x1003f94c
mov ebx, dword [esp + 0x888]
push eax
mov eax, dword [0x107ab964]
push ebx
push eax
call fcn.10029b30
add esp, 0xc
test eax, eax
je 0x1003f94c
mov ecx, dword [esp + 0x34]
mov edx, dword [0x107ab964]
push ecx
push ebx
push edx
call fcn.1000fe50
mov edi, dword [esp + 0x2c]
mov esi, eax
mov eax, edi
add esp, 0xc
sub eax, esi
cmp eax, 0x500
jle 0x1003f94c
cmp eax, 0x2000
jg 0x1003f94c
push eax
mov eax, dword [0x107ab964]
push esi
push ebx
push eax
call fcn.10001200
mov ecx, dword [esp + 0x58]
mov eax, esi
xor edx, edx
add esp, 0x10
div ecx
sub ecx, edx
add esi, ecx
test esi, esi
jle 0x1003f94c
cmp edi, esi
jl 0x1003f94c
sub edi, esi
mov eax, edi
cmp eax, 0x500
jle 0x1003f94c
cmp eax, 0x2000
jg 0x1003f94c
mov ecx, dword [0x107ab964]
push eax
push esi
push ebx
push ecx
call fcn.100014d0
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x874
ret