Function at 0x1004cde0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x100c
call fcn.102244a0
mov eax, dword [esp + 0x1014]
push ebx
push ebp
push esi
mov dword [eax], 0
mov ecx, dword [0x107ab964]
mov eax, dword [esp + 0x101c]
push edi
mov edx, dword [ecx]
push 0
push 0x8002
push eax
call dword [edx + 4]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x1004d085
mov ecx, dword [0x107ab964]
push ebp
mov edx, dword [ecx]
call dword [edx + 0x20]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x18], ebx
jle 0x1004d079
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x1c]
push eax
rep stosd dword es:[edi], eax
mov eax, dword [0x107ab964]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x20]
push ecx
push edx
push 0x1000
push 0x1000
push 0x1000
push ebx
push ebp
push eax
call fcn.100253e0
add esp, 0x24
test eax, eax
je 0x1004d079
cmp dword [esp + 0x14], 0x1000
jne 0x1004d079
xor eax, eax
mov edi, 0x858d
mov esi, 0x3080
mov dl, 0x4a
mov ecx, 0xf975
cmp byte [esp + eax + 0x1c], 0xba
jne 0x1004cec3
cmp word [esp + eax + 0x21], di
jne 0x1004cec3
cmp word [esp + eax + 0x27], si
jne 0x1004cec3
cmp byte [esp + eax + 0x2a], 0x40
jne 0x1004cec3
cmp byte [esp + eax + 0x2b], dl
jne 0x1004cec3
cmp word [esp + eax + 0x2c], cx
je 0x1004cee4
inc eax
cmp eax, 0xfe0
jb 0x1004ce9a
mov ecx, dword [0x107ab964]
push ebp
mov edx, dword [ecx]
call dword [edx + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x100c
ret
mov cl, byte [esp + eax + 0x29]
mov esi, dword [esp + eax + 0x1d]
test cl, cl
mov byte [esp + 0x13], cl
je 0x1004d033
test esi, esi
je 0x1004d033
cmp esi, 0x1000
ja 0x1004d033
cmp ebx, esi
jl 0x1004d033
sub ebx, esi
cmp ebx, 0x1000
jge 0x1004cf5a
mov ecx, dword [0x107ab964]
push ebp
mov edx, dword [ecx]
call dword [edx + 0x18]
mov eax, dword [esp + 0x1024]
mov ecx, dword [esp + 0x1020]
mov edx, dword [0x107ab964]
push eax
push ecx
push edx
call fcn.1002bac0
add esp, 0xc
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0x100c
ret
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x1c]
mov edx, dword [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push 1
lea ecx, [esp + 0x20]
push eax
mov eax, dword [0x107ab964]
push ecx
push 0x1000
push 0x1000
push ebx
push edx
push ebp
push eax
call fcn.100253e0
add esp, 0x24
test eax, eax
je 0x1004d079
cmp dword [esp + 0x14], 0x1000
jne 0x1004d079
xor eax, eax
test esi, esi
jle 0x1004cfc1
mov cl, byte [esp + 0x13]
mov dl, byte [esp + eax + 0x1c]
xor dl, cl
mov byte [esp + eax + 0x1c], dl
inc eax
cmp eax, esi
jl 0x1004cfae
cmp word [esp + 0x1c], 0x5a4d
je 0x1004cfe3
mov ecx, dword [0x107ab964]
push ebp
mov edx, dword [ecx]
call dword [edx + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x100c
ret
mov ecx, dword [0x107ab964]
push esi
lea eax, [esp + 0x20]
push 0x1000
push eax
push ebx
push ebp
push ecx
call fcn.10029d90
add esp, 0x18
test eax, eax
jne 0x1004d01c
mov ecx, dword [0x107ab964]
push ebp
mov edx, dword [ecx]
call dword [edx + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x100c
ret
mov eax, dword [0x107ab964]
push 0
push esi
push ebx
push ebp
push eax
call fcn.1002b820
add esp, 0x14
test eax, eax
jne 0x1004d04c
mov ecx, dword [0x107ab964]
push ebp
mov edx, dword [ecx]
call dword [edx + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x100c
ret
mov eax, dword [0x107ab964]
push esi
push ebx
push ebp
push eax
call fcn.100014d0
mov ecx, dword [0x107ab964]
add esp, 0x10
mov edx, dword [ecx]
push ebp
call dword [edx + 0x18]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x100c
ret
mov ecx, dword [0x107ab964]
push ebp
mov eax, dword [ecx]
call dword [eax + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x100c
ret