Function at 0x104137c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x138
mov esi, dword [ebp + 0x1c]
push esi
call fcn.00f3a2b4
add esp, 4
mov edi, eax
test eax, eax
jne 0x1041679
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x10413c1
push dword [ebp + 0x18]
mov edi, edx
call fcn.00dbb6e0
mov edx, edi
add esp, 4
mov edi, eax
test eax, eax
jne 0x1041679
mov eax, dword [ebp + 0x20]
mov edi, 0x20012
mov ebx, eax
and eax, 7
shr ebx, 3
cmp eax, 1
sbb ebx, 0xffffffff
mov eax, ebx
sub eax, edx
jb 0x1041679
mov dword [esp + 0x1c], eax
imul eax, esi, 0x64
mov ecx, dword [eax + 0x11e66dc]
mov dword [esp + 4], eax
lea eax, [edx + ecx + 2]
cmp ebx, eax
jb 0x1041679
mov dword [esp + 0x14], ecx
push ebx
call fcn.00dbf520
add esp, 4
mov dword [esp], eax
push ebx
call fcn.00dbf520
add esp, 4
mov edi, eax
push ebx
call fcn.00dbf520
add esp, 4
mov dword [esp + 8], eax
push ebx
call fcn.00dbf520
mov ecx, dword [esp + 4]
add esp, 4
test ecx, ecx
je 0x1041446
test edi, edi
je 0x1041446
cmp dword [esp + 8], 0
je 0x1041446
test eax, eax
jne 0x1041490
test ecx, ecx
je 0x1041457
push ecx
mov esi, eax
call fcn.00dbfc80
mov eax, esi
add esp, 4
mov esi, dword [esp + 8]
test edi, edi
je 0x104146c
push edi
mov edi, eax
call fcn.00dbfc80
mov eax, edi
add esp, 4
test esi, esi
je 0x104147d
push esi
mov esi, eax
call fcn.00dbfc80
mov eax, esi
add esp, 4
mov edi, 0xc
test eax, eax
je 0x1041679
push eax
jmp 0x1041671
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edi
test ecx, ecx
je 0x10414c2
imul eax, dword [ebp + 0x18], 0x2c
push dword [ebp + 0x14]
push ecx
push dword [esp + 0x10]
call dword [eax + 0x1185a3c]
add esp, 0xc
cmp eax, dword [ebp + 0x10]
mov edi, 0x20007
jne 0x104164a
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 8]
call dword [eax + 0x11e6728]
add esp, 4
mov edi, eax
test eax, eax
jne 0x104164a
mov eax, 8
push eax
mov edi, dword [esp + 4]
push edi
call fcn.00dcde50
add esp, 8
mov eax, 8
push eax
push edi
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x10]
call dword [eax + 0x11e672c]
add esp, 0xc
mov edi, eax
test eax, eax
jne 0x104164a
mov eax, dword [esp + 4]
lea ecx, [eax + 0x11e672c]
push dword [ebp + 0xc]
push dword [ebp + 8]
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x24], ecx
call dword [ecx]
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov edi, eax
test eax, eax
jne 0x104164a
push ecx
push dword [esp + 0xc]
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x24]
call dword [eax]
add esp, 0xc
mov edi, eax
test eax, eax
jne 0x104164a
push dword [esp + 0xc]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0xc]
call dword [eax + 0x11e6730]
add esp, 8
mov edi, eax
test eax, eax
jne 0x104164a
mov edi, dword [esp + 0x1c]
sub edi, dword [esp + 0x14]
lea eax, [edi - 2]
push eax
push 0
push dword [esp + 8]
call fcn.00dc0cf0
add esp, 0xc
mov eax, dword [esp]
mov byte [eax + edi - 2], 1
lea eax, [eax + edi - 1]
push dword [ebp + 0x10]
push dword [esp + 0xc]
push eax
call fcn.00dcc890
add esp, 0xc
mov eax, dword [esp + 0x14]
mov ecx, eax
not ecx
add ecx, ebx
mov dword [esp + 4], ecx
push ecx
push dword [esp + 0x14]
push eax
push dword [esp + 0x18]
push esi
call fcn.010161e8
add esp, 0x14
mov edi, eax
test eax, eax
jne 0x104164a
mov esi, dword [esp + 4]
mov edx, dword [esp]
mov edi, dword [esp + 0x10]
test esi, esi
je 0x10415f5
xor eax, eax
mov cl, byte [edi + eax]
xor byte [edx + eax], cl
inc eax
cmp eax, esi
jne 0x10415ea
mov ecx, dword [ebp + 0x28]
cmp dword [ecx], ebx
jae 0x1041608
mov eax, dword [ebp + 0x28]
mov edi, 0x20004
mov dword [eax], ebx
jmp 0x104164a
mov edi, dword [ebp + 0x24]
push esi
push dword [esp + 4]
push edi
call fcn.00dcc890
add esp, 0xc
add esi, edi
push dword [esp + 0x14]
push dword [esp + 0x10]
push esi
call fcn.00dcc890
add esp, 0xc
xor eax, eax
mov byte [edi + ebx - 1], 0xbc
inc eax
sub eax, dword [ebp + 0x20]
lea ecx, [eax + ebx*8]
mov eax, 0xff
shr eax, cl
mov ecx, dword [ebp + 0x28]
and byte [edi], al
xor edi, edi
mov dword [ecx], ebx
push dword [esp + 0xc]
call fcn.00dbfc80
add esp, 4
push dword [esp + 8]
call fcn.00dbfc80
add esp, 4
push dword [esp + 0x10]
call fcn.00dbfc80
add esp, 4
push dword [esp]
call fcn.00dbfc80
add esp, 4
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret