Function at 0x1004dc80
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5e0
push ebx
push esi
push edi
mov edi, edx
mov esi, ecx
cmp edi, 0x100
jbe 0x1004dca3
mov eax, dword [esi + 0x400]
mov dword [ebp - 0x34], eax
jmp 0x1004dcaa
mov dword [ebp - 0x34], 0x10
push 0x44
lea eax, [ebp - 0x8c]
push 0
push eax
call fcn.1007cff0
add esp, 0xc
mov ecx, esi
mov edx, edi
mov eax, dword [ecx]
lea ecx, [ecx + 4]
inc dword [ebp + eax*4 - 0x8c]
sub edx, 1
jne 0x1004dcc1
cmp dword [ebp - 0x8c], edi
jne 0x1004dcf3
mov eax, dword [ebp + 0x14]
mov dword [eax], edx
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
xor eax, eax
cmp edi, 1
setne al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, 1
jmp 0x1004dd00
cmp dword [ebp + ecx*4 - 0x8c], 0
jne 0x1004dd10
inc ecx
cmp ecx, 0x10
jbe 0x1004dd00
mov edx, dword [ebp + 0x18]
mov eax, ecx
mov dword [ebp - 0x10], eax
cmp dword [edx], ecx
jae 0x1004dd1e
mov dword [edx], ecx
mov eax, 0x10
cmp dword [ebp + eax*4 - 0x8c], 0
jne 0x1004dd32
sub eax, 1
jne 0x1004dd23
mov dword [ebp - 0x24], eax
cmp dword [edx], eax
jbe 0x1004dd3b
mov dword [edx], eax
mov edx, 1
shl edx, cl
cmp ecx, eax
jae 0x1004dd56
sub edx, dword [ebp + ecx*4 - 0x8c]
js 0x1004dd6b
inc ecx
add edx, edx
cmp ecx, eax
jb 0x1004dd46
lea ebx, [eax*4]
mov ecx, edx
sub edx, dword [ebp + ebx - 0x8c]
mov dword [ebp - 0x44], edx
jns 0x1004dd77
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edx, edx
mov dword [ebp + ebx - 0x8c], ecx
mov dword [ebp - 0xd0], edx
sub eax, 1
je 0x1004dda6
xor ecx, ecx
lea ecx, [ecx]
add edx, dword [ebp + ecx - 0x88]
lea ecx, [ecx + 4]
mov dword [ebp + ecx - 0xd0], edx
sub eax, 1
jne 0x1004dd90
push 0x480
lea eax, [ebp - 0x5dc]
push 0
push eax
call fcn.1007cff0
add esp, 0xc
xor ecx, ecx
mov edi, edi
mov edx, dword [esi]
lea esi, [esi + 4]
test edx, edx
je 0x1004dddf
mov eax, dword [ebp + edx*4 - 0xd4]
mov dword [ebp + eax*4 - 0x5dc], ecx
inc eax
mov dword [ebp + edx*4 - 0xd4], eax
inc ecx
cmp ecx, edi
jb 0x1004ddc0
mov eax, dword [ebp + ebx - 0xd4]
xor edx, edx
mov ecx, dword [ebp - 0x10]
or edi, 0xffffffff
mov dword [ebp - 0x40], eax
xor ebx, ebx
lea eax, [ebp - 0x5dc]
mov dword [ebp - 8], 0
xor esi, esi
mov dword [ebp - 0xd4], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x15c], edx
mov dword [ebp - 0x2c], ebx
cmp ecx, dword [ebp - 0x24]
jg 0x1004e0aa
lea eax, [ebp - 0x8c]
lea eax, [eax + ecx*4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x20]
jmp 0x1004de50
mov eax, dword [eax]
test eax, eax
je 0x1004e094
lea ebx, [ebx]
mov dword [ebp - 0x30], eax
dec eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + edi*4 - 0x118]
add eax, edx
cmp ecx, eax
jle 0x1004df8d
jmp 0x1004de80
add edx, dword [ebp + edi*4 - 0x118]
inc edi
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp - 0x24]
sub esi, edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x28], edi
mov eax, dword [eax]
cmp esi, eax
jbe 0x1004de9e
mov esi, eax
mov ebx, ecx
mov eax, 1
sub ebx, edx
mov ecx, ebx
shl eax, cl
cmp eax, dword [ebp - 0x30]
jbe 0x1004ded6
mov edx, dword [ebp - 0x20]
or ecx, 0xffffffff
sub ecx, dword [ebp - 0x3c]
inc ebx
add eax, ecx
cmp ebx, esi
jae 0x1004ded3
mov ecx, dword [edx + 4]
lea edx, [edx + 4]
add eax, eax
cmp eax, ecx
jbe 0x1004ded3
inc ebx
sub eax, ecx
cmp ebx, esi
jb 0x1004dec0
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x34]
lea eax, [edx + ebx]
cmp eax, ecx
jbe 0x1004dee8
cmp edx, ecx
jae 0x1004dee8
mov ebx, ecx
sub ebx, edx
mov ecx, ebx
mov dword [ebp + edi*4 - 0x118], ebx
mov eax, 1
shl eax, cl
mov dword [ebp - 0x2c], eax
lea eax, [eax*8 + 8]
push eax
call fcn.1008680d
add esp, 4
test eax, eax
je 0x1004e0cd
mov ecx, dword [ebp - 0x38]
lea esi, [eax + 8]
add eax, 4
mov dword [ebp + edi*4 - 0x15c], esi
mov dword [ebp - 0x38], eax
mov dword [ecx], esi
mov dword [eax], 0
test edi, edi
je 0x1004df79
mov eax, dword [ebp - 8]
mov edx, 1
mov ecx, dword [ebp - 0xc]
shl edx, cl
sub ecx, dword [ebp + edi*4 - 0x11c]
dec edx
and edx, dword [ebp - 8]
mov dword [ebp + edi*4 - 0xd4], eax
mov al, byte [ebp + edi*4 - 0x11c]
mov byte [ebp - 0x17], al
lea eax, [ebx + 0x12]
shr edx, cl
mov byte [ebp - 0x18], al
mov eax, dword [ebp + edi*4 - 0x160]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x14], esi
mov dword [eax + edx*8], ecx
mov ecx, esi
mov dword [eax + edx*8 + 4], ecx
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
lea eax, [edx + ebx]
cmp ecx, eax
jg 0x1004de80
mov ebx, dword [ebp - 0x2c]
mov al, cl
sub al, dl
mov byte [ebp - 0x17], al
mov eax, dword [ebp - 0x40]
lea eax, [ebp + eax*4 - 0x5dc]
cmp dword [ebp - 0x1c], eax
jb 0x1004dfa9
mov byte [ebp - 0x18], 0x63
jmp 0x1004dfee
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
add eax, 4
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
cmp ecx, eax
jae 0x1004dfcf
cmp ecx, 0x100
mov word [ebp - 0x14], cx
setb al
add al, 0x11
mov byte [ebp - 0x18], al
jmp 0x1004dfeb
sub ecx, eax
mov eax, dword [ebp + 0x10]
mov al, byte [eax + ecx*2]
mov byte [ebp - 0x18], al
mov eax, dword [ebp + 0xc]
mov ax, word [eax + ecx*2]
mov word [ebp - 0x14], ax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x10]
sub ecx, edx
mov eax, 1
shl eax, cl
mov ecx, edx
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 8]
shr eax, cl
cmp eax, ebx
jae 0x1004e023
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x14]
mov edi, edi
mov dword [esi + eax*8], edx
mov dword [esi + eax*8 + 4], edi
add eax, ecx
cmp eax, ebx
jb 0x1004e010
mov edx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x10]
mov eax, 1
lea ecx, [ecx - 1]
shl eax, cl
mov ecx, dword [ebp - 8]
test ecx, eax
je 0x1004e03f
xor ecx, eax
shr eax, 1
test ecx, eax
jne 0x1004e037
xor ecx, eax
mov eax, 1
mov dword [ebp - 8], ecx
mov ecx, edx
shl eax, cl
dec eax
and eax, dword [ebp - 8]
cmp eax, dword [ebp + edi*4 - 0xd4]
je 0x1004e086
mov ebx, dword [ebp - 8]
lea ecx, [ecx]
sub edx, dword [ebp + edi*4 - 0x11c]
dec edi
mov eax, 1
mov ecx, edx
shl eax, cl
dec eax
and eax, ebx
cmp eax, dword [ebp + edi*4 - 0xd4]
jne 0x1004e060
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x10]
test eax, eax
jne 0x1004de60
mov eax, dword [ebp - 0x20]
inc ecx
add eax, 4
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x20], eax
cmp ecx, dword [ebp - 0x24]
jle 0x1004de50
cmp dword [ebp - 0x44], 0
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x118]
mov dword [ecx], eax
je 0x1004e101
cmp dword [ebp - 0x24], 1
je 0x1004e101
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x1004e0f5
mov eax, dword [ebp - 0x15c]
test eax, eax
je 0x1004e0f5
jmp 0x1004e0e0
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x1004e0e0
mov eax, 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret