Function at 0x1003f020
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x8bb4
call fcn.102244a0
mov ecx, dword [0x107ab964]
push ebx
mov ebx, dword [esp + 0x8bbc]
push ebp
mov eax, dword [ecx]
push esi
push edi
push ebx
call dword [eax + 0x20]
mov ebp, eax
xor esi, esi
cmp ebp, esi
jle 0x1003f44d
mov ecx, dword [0x107ab964]
push 0xa
push 0x1000
push ebp
push ebx
push ecx
lea ecx, [esp + 0x48]
call fcn.100243a0
test eax, eax
je 0x1003f44d
mov eax, dword [0x107ab964]
lea edx, [esp + 0x34]
push 1
push edx
push ebp
push ebx
push eax
lea ecx, [esp + 0x10e8]
call fcn.10001ab0
test eax, eax
jne 0x1003f0a3
lea ecx, [esp + 0x34]
call fcn.10024430
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x8bb4
ret
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x74]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x74]
push ecx
lea ecx, [esp + 0x10d8]
call fcn.100021c0
test eax, eax
je 0x1003f438
lea ecx, [esp + 0x10d4]
call fcn.10004bd0
cmp eax, esi
mov dword [esp + 0x30], eax
jle 0x1003f438
cmp ebp, eax
jle 0x1003f438
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x4c]
lea edx, [esp + 0x4c]
rep stosd dword es:[edi], eax
push edx
push 5
lea ecx, [esp + 0x10dc]
call fcn.10003900
test eax, eax
je 0x1003f438
lea eax, [esp + 0x20]
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x20]
push ecx
lea eax, [esp + 0x30]
push edx
lea ecx, [esp + 0x30]
push eax
lea edx, [esp + 0x3c]
push ecx
lea eax, [esp + 0x10e8]
push edx
push eax
mov dword [esp + 0x44], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x34], esi
call fcn.100cfd90
add esp, 0x1c
lea ecx, [esp + 0x34]
mov esi, eax
call fcn.10024430
lea ecx, [esp + 0x10d4]
call fcn.10001b10
test esi, esi
je 0x1003f44d
mov edx, dword [esp + 0x28]
test edx, edx
jbe 0x1003f44d
mov ecx, dword [esp + 0xac]
cmp ecx, edx
jbe 0x1003f44d
mov eax, dword [esp + 0x1c]
test eax, eax
jbe 0x1003f44d
cmp ecx, eax
jbe 0x1003f44d
mov eax, dword [esp + 0x18]
test eax, eax
jbe 0x1003f44d
mov esi, dword [esp + 0x90]
add esi, ecx
cmp esi, eax
jbe 0x1003f44d
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x1003f44d
mov esi, eax
and esi, 3
sub eax, esi
add eax, edx
je 0x1003f44d
cmp ecx, eax
jbe 0x1003f44d
lea ecx, [esp + 0x10]
push 0
lea edx, [esp + 0xd8]
push ecx
push edx
push 0x1000
push 0x1000
push eax
mov eax, dword [0x107ab964]
push ebp
push ebx
push eax
call fcn.100253e0
add esp, 0x24
test eax, eax
je 0x1003f44d
cmp dword [esp + 0x10], 0x1000
jne 0x1003f44d
mov ecx, dword [esp + 0x24]
xor eax, eax
mov edx, dword [esp + eax + 0xd4]
add eax, 4
xor edx, ecx
cmp eax, 0xffc
mov dword [esp + eax + 0xd0], edx
jl 0x1003f22b
mov ecx, 0x1800
xor eax, eax
lea edi, [esp + 0x2bc4]
mov edx, 0x1000
rep stosd dword es:[edi], eax
push eax
lea ecx, [esp + 0x2bc8]
push 0x100
sub edx, esi
lea edi, [esp + esi + 0xdc]
push ecx
push edx
push edi
call fcn.10024c10
add esp, 0x14
cmp eax, 0x10
jle 0x1003f44d
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x28]
push edx
push ecx
push edi
lea edx, [esp + 0x2bdc]
push eax
push edx
push ebp
push ebx
call fcn.100e4bf0
add esp, 0x28
test eax, eax
je 0x1003f44d
mov eax, dword [esp + 0x14]
cmp eax, 0x100
jle 0x1003f44d
cmp eax, 0x200
jg 0x1003f44d
lea eax, [ebp - 0x1000]
test eax, eax
jle 0x1003f44d
lea ecx, [esp + 0x10]
push 1
lea edx, [esp + 0xd8]
push ecx
push edx
push 0x1000
push 0x1000
push eax
mov eax, dword [0x107ab964]
push ebp
push ebx
push eax
call fcn.100253e0
add esp, 0x24
test eax, eax
je 0x1003f44d
cmp dword [esp + 0x10], 0x1000
jne 0x1003f44d
mov eax, 0xfff
mov cl, byte [esp + eax + 0xd4]
test cl, cl
jne 0x1003f344
dec eax
cmp eax, 4
jge 0x1003f326
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x8bb4
ret
mov eax, dword [esp + eax + 0xd0]
test eax, eax
jbe 0x1003f44d
cmp dword [esp + 0x54], eax
jbe 0x1003f44d
mov ecx, dword [esp + 0x60]
lea esi, [ecx + eax]
test esi, esi
jle 0x1003f44d
cmp ecx, esi
ja 0x1003f44d
mov edx, dword [esp + 0x5c]
add edx, ecx
cmp edx, esi
jb 0x1003f44d
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push 1
lea ecx, [esp + 0xd8]
push eax
mov eax, dword [0x107ab964]
push ecx
push 0x1000
push edx
push esi
push ebp
push ebx
push eax
call fcn.100253e0
add esp, 0x24
test eax, eax
je 0x1003f44d
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jne 0x1003f44d
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [0x107ab964]
lea ecx, [esp + 0xd8]
push 0x1000
push ecx
push edx
push ebx
push eax
call fcn.10029d90
add esp, 0x18
test eax, eax
je 0x1003f44d
sub ebp, esi
mov eax, ebp
cmp eax, 0x85000
jle 0x1003f3fc
cmp eax, 0xa0000
jle 0x1003f416
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x60]
sub eax, esi
add eax, edx
cmp eax, 0x30000
jle 0x1003f44d
cmp eax, 0xa0000
jg 0x1003f44d
mov ecx, dword [0x107ab964]
push eax
push esi
push ebx
push ecx
call section..text
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8bb4
ret
lea ecx, [esp + 0x34]
call fcn.10024430
lea ecx, [esp + 0x10d4]
call fcn.10001b10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x8bb4
ret