Function at 0x1003a190
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x498
mov ecx, dword [0x107ab964]
push ebx
mov ebx, dword [esp + 0x4a0]
push esi
mov eax, dword [ecx]
push edi
push ebx
call dword [eax + 0x20]
mov esi, eax
test esi, esi
mov dword [esp + 0x10], esi
jle 0x1003a2c7
mov edx, dword [0x107ab964]
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x44]
push ecx
push ebx
push edx
call fcn.1000fc50
add esp, 0xc
test eax, eax
je 0x1003a2c7
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov ecx, dword [0x107ab964]
lea eax, [esp + 0x1c]
push eax
push ebx
push ecx
call fcn.100111d0
add esp, 0xc
test eax, eax
je 0x1003a2c7
mov ecx, dword [esp + 0x54]
lea edx, [esp + 0xc]
push 0
lea eax, [esp + 0xa8]
push edx
mov edx, dword [0x107ab964]
push eax
push 0x400
push 0x400
push ecx
push esi
push ebx
push edx
call fcn.100253e0
add esp, 0x24
test eax, eax
je 0x1003a2c7
cmp dword [esp + 0xc], 0x300
jl 0x1003a2c7
xor edx, edx
or esi, 0xffffffff
mov eax, 0x2a
mov edi, 0xf68
mov ebx, 0x90909090
cmp edx, 2
jge 0x1003a2d3
mov ecx, edx
sub ecx, 0
je 0x1003a2a3
dec ecx
jne 0x1003a2bf
cmp byte [esp + eax + 0xa4], 0x81
jne 0x1003a2bf
cmp dword [esp + eax + 0xa6], edi
jne 0x1003a2bf
cmp dword [esp + eax + 0xaa], ebx
jne 0x1003a2bf
cmp word [esp + eax + 0xae], 0x9090
jne 0x1003a2bf
mov edx, 2
mov esi, edi
jmp 0x1003a2bf
mov cx, word [esp + eax + 0xa4]
cmp cx, 0x631
je 0x1003a2b9
cmp cx, 0x231
jne 0x1003a2bf
inc eax
mov edx, 1
inc eax
cmp eax, 0x100
jl 0x1003a263
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x498
ret
cmp eax, 0x100
jge 0x1003a2c7
cmp edx, 2
jne 0x1003a2c7
cmp esi, 0xffffffff
je 0x1003a2c7
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0xaf]
lea ebx, [ecx + eax]
mov edi, ebx
mov dword [esp + 0x18], ebx
sub edi, edx
add edi, 5
je 0x1003a2c7
mov edx, dword [esp + 0xcb]
lea eax, [edx + edi]
sub eax, ebx
js 0x1003a2c7
mov esi, dword [esp + 0xc]
lea edx, [esi - 4]
cmp edx, eax
mov dword [esp + 0x14], edx
jl 0x1003a2c7
mov edx, dword [esp + eax + 0xa4]
mov eax, dword [esp + 0xb9]
sub eax, ecx
je 0x1003a2c7
push ebp
mov ebp, dword [esp + 0x80]
cmp ebp, eax
pop ebp
jbe 0x1003a2c7
sub eax, ebx
add eax, edi
add eax, ecx
test eax, eax
jle 0x1003a2c7
lea ecx, [eax + 0x200]
cmp esi, ecx
jle 0x1003a2c7
cmp eax, 0x200
mov ecx, eax
jge 0x1003a37f
mov ebx, dword [esp + ecx + 0xa4]
add ecx, 4
xor ebx, edx
cmp ecx, 0x200
mov dword [esp + ecx + 0xa0], ebx
jl 0x1003a364
lea edx, [eax + 0x1b9]
cmp esi, edx
jle 0x1003a2c7
cmp eax, 0x1b9
jge 0x1003a2c7
mov dl, 0xe8
mov bl, 0x85
mov ecx, 0x8589
mov esi, 0x20068
cmp dword [esp + eax + 0xa4], 0x35ff64
jne 0x1003a47f
cmp dword [esp + eax + 0xa8], 0x64000000
jne 0x1003a47f
cmp dword [esp + eax + 0xac], 0x2589
jne 0x1003a47f
cmp word [esp + eax + 0xb0], 0
jne 0x1003a47f
cmp byte [esp + eax + 0xb2], dl
jne 0x1003a47f
cmp word [esp + eax + 0xb6], 0xe800
jne 0x1003a47f
cmp word [esp + eax + 0xbb], 0xff00
jne 0x1003a47f
cmp byte [esp + eax + 0xbd], 0x95
jne 0x1003a47f
cmp dword [esp + eax + 0xc2], 0x850fc00b
jne 0x1003a47f
cmp byte [esp + eax + 0xc6], 0x2a
jne 0x1003a47f
cmp byte [esp + eax + 0xca], dl
jne 0x1003a47f
cmp word [esp + eax + 0xce], 0x8b00
jne 0x1003a47f
cmp byte [esp + eax + 0xd0], bl
jne 0x1003a47f
cmp word [esp + eax + 0xd5], cx
jne 0x1003a47f
cmp word [esp + eax + 0xdb], 0x858b
jne 0x1003a47f
cmp word [esp + eax + 0xe1], cx
jne 0x1003a47f
cmp dword [esp + eax + 0xe7], esi
jne 0x1003a47f
cmp byte [esp + eax + 0xeb], 0
je 0x1003a497
inc eax
cmp eax, 0x1b9
jl 0x1003a3a6
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x498
ret
mov ecx, dword [esp + eax + 0xdd]
test ecx, ecx
je 0x1003a2c7
cmp eax, 0x1b9
jge 0x1003a2c7
sub ecx, dword [esp + 0x18]
lea eax, [ecx + edi]
mov ecx, dword [esp + 0x14]
cmp ecx, eax
jle 0x1003a2c7
mov eax, dword [esp + eax + 0xa4]
test eax, eax
jbe 0x1003a2c7
cmp eax, dword [esp + 0x7c]
jae 0x1003a2c7
mov esi, dword [esp + 0x4a8]
push eax
mov eax, dword [0x107ab964]
push esi
push eax
call fcn.10029b30
add esp, 0xc
test eax, eax
je 0x1003a2c7
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x30]
sub eax, ecx
cmp eax, 0x1000
ja 0x1003a535
cmp eax, 0x800
jb 0x1003a535
push eax
push ecx
mov ecx, dword [0x107ab964]
push esi
push ecx
call fcn.100014d0
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x498
ret
mov edx, dword [esp + 0x2c]
mov eax, dword [0x107ab964]
push edx
push ecx
push esi
push eax
call fcn.10001200
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x498
ret