Function at 0x103f4060
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x1072a790]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov eax, edx
push esi
push edi
mov dword [ebp - 0x1c], eax
mov esi, dword [ebx]
movzx ecx, byte [ebx + 0x1ca]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x10], esi
test dword [esi + 0x18], 0x40000
mov dword [ebp - 0x30], ecx
je 0x103f4559
mov ecx, dword [eax + 0x40]
mov edi, 0xfff0bdc0
mov dword [ebp - 0x20], edi
test ecx, ecx
je 0x103f40cf
mov edx, dword [esi + 0x14]
xor edi, edi
mov dword [ebp - 0x20], edi
test edx, edx
jle 0x103f40cf
mov eax, dword [esi + 0x10]
add eax, 0xc
lea ebx, [ebx]
cmp dword [eax], ecx
je 0x103f40cc
inc edi
add eax, 0x10
cmp edi, edx
jl 0x103f40c0
mov dword [ebp - 0x20], edi
mov eax, dword [esi + 0x10]
mov ecx, edi
mov edi, dword [ebp - 0x1c]
add ecx, ecx
mov edi, dword [edi + 0x10]
mov eax, dword [eax + ecx*8]
mov dword [ebp - 0x2c], eax
test edi, edi
je 0x103f436a
lea ebx, [ebx]
cmp byte [ebx + 0x1ca], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x18], 0
push eax
je 0x103f411e
mov edx, dword [edi + 8]
mov ecx, esi
call fcn.103e97d0
add esp, 4
jmp 0x103f412d
push dword [edi + 8]
xor edx, edx
mov ecx, ebx
call fcn.103e9910
add esp, 8
mov esi, eax
test esi, esi
je 0x103f4244
lea eax, [ebp - 0xc]
mov edx, esi
push eax
lea eax, [ebp - 0x14]
mov ecx, ebx
push eax
push edi
call fcn.103f2d40
add esp, 0xc
test eax, eax
jne 0x103f4244
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x103f4162
mov ecx, eax
mov dword [ebp - 0x24], eax
jmp 0x103f416e
mov eax, dword [edi + 0x24]
lea ecx, [ebp - 8]
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], ecx
xor ebx, ebx
cmp dword [edi + 0x14], ebx
jle 0x103f41d4
mov eax, dword [ebp - 0x1c]
movsx eax, word [eax + 0x24]
cmp dword [ecx + ebx*4], eax
jne 0x103f4188
mov dword [ecx + ebx*4], 0xffffffff
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x10c], 0
je 0x103f41ce
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x103f41a3
mov eax, dword [eax + 4]
mov eax, dword [eax + ebx*4]
jmp 0x103f41a7
movsx eax, word [esi + 0x24]
push dword [ebp - 0x20]
mov edx, dword [esi]
lea ecx, [eax + eax*2]
mov eax, dword [esi + 4]
push dword [eax + ecx*8]
mov ecx, dword [ebp - 0x28]
call fcn.103e9030
xor ecx, ecx
add esp, 8
cmp eax, 2
sete cl
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x24]
inc ebx
cmp ebx, dword [edi + 0x14]
jl 0x103f4175
push dword [esi]
mov ebx, dword [ebp - 0x28]
mov ecx, ebx
mov edx, dword [ebp - 0x20]
push 0
push dword [esi + 0x20]
call fcn.103e9280
inc dword [ebx + 0x48]
add esp, 0xc
mov eax, dword [ebp + 8]
test eax, eax
je 0x103f4210
push dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
mov ecx, ebx
push 0xffffffffffffffff
push eax
push dword [ebp - 0x24]
push edi
push dword [ebp - 0x14]
push esi
call fcn.103f2fb0
add esp, 0x1c
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x103f4232
push dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
mov ecx, ebx
push 1
push eax
push dword [ebp - 0x24]
push edi
push dword [ebp - 0x14]
push esi
call fcn.103f2fb0
add esp, 0x1c
mov esi, dword [ebp - 0x10]
mov ecx, esi
mov edx, dword [ebp - 0xc]
call fcn.103b5160
jmp 0x103f435c
cmp dword [ebp - 0x30], 0
je 0x103f4559
mov eax, dword [ebp - 0x10]
cmp byte [eax + 0x38], 0
jne 0x103f4559
test esi, esi
jne 0x103f435a
mov esi, dword [ebx + 8]
test esi, esi
jne 0x103f4286
mov ecx, dword [ebx]
call fcn.103d0770
mov esi, eax
mov dword [ebx + 8], esi
test esi, esi
je 0x103f4286
mov edx, 0x94
mov ecx, esi
call fcn.103d0950
mov eax, dword [esi + 0x1c]
xor ebx, ebx
mov ecx, dword [edi + 0x14]
inc eax
add eax, ecx
mov dword [ebp - 0x24], eax
test ecx, ecx
jle 0x103f4305
lea eax, [edi + 0x24]
mov dword [ebp - 0xc], eax
mov edi, edi
mov ecx, dword [ebp + 8]
mov eax, dword [eax]
inc ecx
add eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x18], eax
cmp dword [esi + 0x20], eax
jg 0x103f42c4
mov ecx, esi
call fcn.103d0870
test eax, eax
jne 0x103f42f6
mov eax, dword [ebp - 0x18]
inc dword [esi + 0x1c]
lea ecx, [eax + eax*4]
mov eax, dword [esi + 4]
mov edx, dword [ebp - 0x14]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [ebp - 0x24]
mov word [eax + ecx*4], 0x49
mov byte [eax + ecx*4 + 3], 0
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [ebp - 0xc]
inc ebx
add eax, 8
mov dword [ebp - 0xc], eax
cmp ebx, dword [edi + 0x14]
jl 0x103f42a0
movzx eax, byte [edi + 0x18]
mov ebx, dword [esi + 0x1c]
mov dword [ebp - 0xc], eax
cmp dword [esi + 0x20], ebx
jg 0x103f431f
mov ecx, esi
call fcn.103d0870
test eax, eax
jne 0x103f4352
mov eax, dword [esi + 4]
lea ecx, [ebx + ebx*4]
inc dword [esi + 0x1c]
mov edx, dword [ebp - 0xc]
mov word [eax + ecx*4], 0x75
mov byte [eax + ecx*4 + 3], 0
mov dword [eax + ecx*4 + 4], edx
mov dword [eax + ecx*4 + 8], 0xffffffff
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x10]
jmp 0x103f435c
mov esi, eax
mov edi, dword [edi + 4]
mov eax, dword [ebp - 0x2c]
test edi, edi
jne 0x103f40f0
mov edi, dword [ebp - 0x1c]
mov ecx, dword [edi]
mov esi, ecx
mov dword [ebp - 0x2c], ecx
test ecx, ecx
je 0x103f438e
cmp byte [ecx], 0
je 0x103f4386
lea ecx, [ecx]
inc esi
cmp byte [esi], 0
jne 0x103f4380
sub esi, ecx
and esi, 0x3fffffff
mov eax, dword [edi + 0x40]
add eax, 0x38
mov dword [ebp - 0x18], eax
cmp dword [eax + 0xc], 0
je 0x103f43e7
mov eax, ecx
xor edi, edi
mov dword [ebp - 0xc], eax
test esi, esi
jle 0x103f43d7
mov ebx, esi
lea ebx, [ebx]
movzx eax, byte [eax]
lea ecx, [edi*8]
dec ebx
movzx edx, byte [eax + 0x105eb560]
mov eax, dword [ebp - 0xc]
xor edx, ecx
inc eax
xor edi, edx
mov dword [ebp - 0xc], eax
test ebx, ebx
jg 0x103f43b0
mov ebx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov eax, edi
xor edx, edx
mov edi, dword [ebp - 0x18]
div dword [edi]
mov eax, edi
mov edi, dword [ebp - 0x1c]
jmp 0x103f43e9
xor edx, edx
push edx
mov edx, ecx
mov ecx, eax
push esi
call fcn.103b8720
add esp, 8
test eax, eax
je 0x103f4559
mov esi, dword [eax + 8]
test esi, esi
je 0x103f4559
lea ebx, [ebx]
cmp byte [esi + 0x18], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x14], 0
jne 0x103f4437
cmp dword [ebx + 0x1b0], 0
jne 0x103f4437
cmp byte [ebx + 0x17], 0
je 0x103f454b
lea eax, [ebp - 0x14]
mov edx, edi
push eax
lea eax, [ebp - 0xc]
mov ecx, ebx
push eax
push esi
call fcn.103f2d40
add esp, 0xc
test eax, eax
je 0x103f446c
cmp dword [ebp - 0x30], 0
je 0x103f4559
mov eax, dword [ebp - 0x10]
cmp byte [eax + 0x38], 0
jne 0x103f4559
jmp 0x103f454b
mov ecx, dword [ebp - 0x10]
mov edx, 0x50
call fcn.103b53b0
mov edi, eax
test edi, edi
je 0x103f4540
push 0x50
push 0
push edi
call fcn.1043c810
mov ecx, dword [ebp - 0x10]
add esp, 0xc
mov eax, 1
mov edx, edi
mov word [edi + 2], ax
movsx eax, word [edi]
push eax
push 1
call fcn.103ed6d0
mov edi, eax
add esp, 8
mov eax, dword [ebp - 0x10]
cmp byte [eax + 0x38], 0
je 0x103f44bb
mov ecx, eax
jmp 0x103f4539
movsx eax, word [edi]
mov ecx, dword [ebp + 0xc]
lea eax, [eax + eax*8]
mov dword [edi + eax*8 - 0x38], 0
mov dword [edi + eax*8 - 0x3c], 0
mov eax, dword [esi]
mov dword [edi + 0x18], eax
mov eax, dword [esi]
mov eax, dword [eax]
mov dword [edi + 0x10], eax
mov eax, dword [edi + 0x18]
inc word [eax + 0x28]
mov eax, dword [ebx + 0x48]
mov dword [edi + 0x34], eax
inc dword [ebx + 0x48]
mov eax, dword [ebp - 0xc]
test ecx, ecx
je 0x103f4511
push 0xffffffffffffffff
push ecx
push dword [ebp - 0x14]
mov edx, edi
mov ecx, ebx
push esi
push eax
push dword [ebp - 0x1c]
call fcn.103f3830
mov eax, dword [ebp - 0xc]
add esp, 0x18
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x103f452f
push 1
push ecx
push dword [ebp - 0x14]
mov edx, edi
mov ecx, ebx
push esi
push eax
push dword [ebp - 0x1c]
call fcn.103f3830
add esp, 0x18
mov ecx, dword [ebp - 0x10]
mov dword [edi + 0x10], 0
mov edx, edi
call fcn.103ed910
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
call fcn.103b5160
mov esi, dword [esi + 0xc]
mov edi, dword [ebp - 0x1c]
test esi, esi
jne 0x103f4410
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10436e26
mov esp, ebp
pop ebp
ret