Function at 0x45ba80
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x5c4
push ebx
push ebp
mov ebp, dword [esp + 0x5d4]
push esi
mov esi, dword [esp + 0x5dc]
push edi
cmp esi, 0x100
jbe 0x45baac
mov eax, dword [ebp + 0x400]
mov dword [esp + 0x38], eax
jmp 0x45bab4
mov dword [esp + 0x38], 0x10
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x48]
mov edx, esi
rep stosd dword es:[edi], eax
mov ecx, ebp
mov eax, dword [ecx]
add ecx, 4
mov ebx, dword [esp + eax*4 + 0x48]
lea eax, [esp + eax*4 + 0x48]
inc ebx
dec edx
mov dword [eax], ebx
jne 0x45bac5
cmp dword [esp + 0x48], esi
jne 0x45bb05
mov ecx, dword [esp + 0x5f0]
mov edx, dword [esp + 0x5f4]
pop edi
pop esi
mov dword [ecx], 0
pop ebp
mov dword [edx], 0
xor eax, eax
pop ebx
add esp, 0x5c4
ret
mov ecx, 1
lea eax, [esp + 0x4c]
mov esi, dword [eax]
xor edx, edx
cmp esi, edx
jne 0x45bb1f
inc ecx
add eax, 4
cmp ecx, 0x10
jbe 0x45bb0e
mov edi, dword [esp + 0x5f4]
mov dword [esp + 0x10], ecx
cmp dword [edi], ecx
jae 0x45bb30
mov dword [edi], ecx
mov eax, 0x10
lea esi, [esp + 0x88]
cmp dword [esi], edx
jne 0x45bb48
dec eax
sub esi, 4
cmp eax, edx
jne 0x45bb3c
mov esi, dword [edi]
mov dword [esp + 0x2c], eax
cmp esi, eax
jbe 0x45bb54
mov dword [edi], eax
mov esi, 1
shl esi, cl
cmp ecx, eax
jae 0x45bb71
lea edi, [esp + ecx*4 + 0x48]
sub esi, dword [edi]
js 0x45bb84
inc ecx
add edi, 4
shl esi, 1
cmp ecx, eax
jb 0x45bb63
lea ebx, [eax*4]
mov ecx, dword [esp + ebx + 0x48]
sub esi, ecx
mov dword [esp + 0x44], esi
jns 0x45bb94
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x5c4
ret
add ecx, esi
mov dword [esp + 0xd4], edx
mov dword [esp + ebx + 0x48], ecx
xor ecx, ecx
dec eax
je 0x45bbbb
xor esi, esi
mov edi, dword [esp + esi + 0x4c]
add esi, 4
add ecx, edi
dec eax
mov dword [esp + esi + 0xd4], ecx
jne 0x45bba8
mov ecx, 0x120
xor eax, eax
lea edi, [esp + 0x154]
xor esi, esi
rep stosd dword es:[edi], eax
mov edi, ebp
mov eax, dword [edi]
add edi, 4
cmp eax, edx
je 0x45bbf0
mov ecx, dword [esp + eax*4 + 0xd0]
lea eax, [esp + eax*4 + 0xd0]
mov dword [esp + ecx*4 + 0x154], esi
inc ecx
mov dword [eax], ecx
mov eax, dword [esp + 0x5e0]
inc esi
cmp esi, eax
jb 0x45bbcf
mov eax, dword [esp + ebx + 0xd0]
mov dword [esp + 0xd0], edx
mov dword [esp + 0x5e0], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x8c], edx
mov dword [esp + 0x114], edx
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x2c]
xor edi, edi
lea ecx, [esp + 0x154]
or esi, 0xffffffff
xor ebx, ebx
xor ebp, ebp
cmp eax, edx
mov dword [esp + 0x30], edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ebx
jg 0x45bf0f
lea edx, [eax - 1]
lea eax, [esp + eax*4 + 0x48]
mov dword [esp + 0x34], edx
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x24]
mov eax, dword [edx]
mov edx, eax
dec eax
test edx, edx
mov dword [esp + 0x28], eax
je 0x45bee6
mov eax, dword [esp + esi*4 + 0x90]
mov edx, dword [esp + 0x10]
add eax, ebx
cmp edx, eax
jle 0x45bdce
lea ecx, [esp + 0x114]
sub ecx, 4
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x5f4]
mov edx, dword [esp + 0x2c]
mov ebp, eax
inc esi
mov eax, dword [ecx]
sub edx, ebp
cmp edx, eax
mov dword [esp + 0x14], ebp
jbe 0x45bcb2
mov edx, eax
mov ebx, dword [esp + 0x10]
mov eax, 1
sub ebx, ebp
mov ecx, ebx
shl eax, cl
mov ecx, dword [esp + 0x28]
inc ecx
cmp eax, ecx
jbe 0x45bcf5
mov edi, dword [esp + 0x28]
or ecx, 0xffffffff
sub ecx, edi
mov edi, dword [esp + 0x24]
add eax, ecx
inc ebx
cmp ebx, edx
jae 0x45bcf1
mov ecx, dword [edi + 4]
add edi, 4
shl eax, 1
cmp eax, ecx
jbe 0x45bcf1
sub eax, ecx
inc ebx
cmp ebx, edx
jb 0x45bcde
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
lea edx, [ebx + ebp]
cmp edx, eax
jbe 0x45bd08
cmp ebp, eax
jae 0x45bd08
mov ebx, eax
sub ebx, ebp
mov ebp, 1
mov ecx, ebx
shl ebp, cl
mov dword [esp + esi*4 + 0x90], ebx
lea eax, [ebp*8 + 8]
push eax
call fcn.00461d1b
add esp, 4
test eax, eax
je 0x45bf41
mov edx, dword [esp + 0x5f0]
lea ecx, [eax + 8]
add eax, 4
mov dword [esp + 0x3c], ecx
mov dword [edx], ecx
mov dword [esp + 0x5f0], eax
test esi, esi
mov dword [eax], 0
mov dword [esp + esi*4 + 0x114], ecx
je 0x45bdad
mov al, byte [esp + esi*4 + 0x8c]
add bl, 0x10
mov byte [esp + 0x1d], al
mov eax, dword [esp + 0x14]
mov byte [esp + 0x1c], bl
mov edx, ecx
mov ebx, 1
mov ecx, eax
shl ebx, cl
mov dword [esp + esi*4 + 0xd0], edi
mov dword [esp + 0x20], edx
dec ebx
and ebx, edi
mov edi, dword [esp + esi*4 + 0x8c]
sub ecx, edi
mov edi, dword [esp + 0x1c]
shr ebx, cl
mov ecx, dword [esp + 0x40]
mov ecx, dword [ecx + esi*4]
mov dword [ecx + ebx*8], edi
mov edi, dword [esp + 0x30]
mov dword [ecx + ebx*8 + 4], edx
jmp 0x45bdb1
mov eax, dword [esp + 0x14]
mov edx, dword [esp + esi*4 + 0x90]
mov ecx, dword [esp + 0x10]
add eax, edx
cmp ecx, eax
jg 0x45bc96
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov al, byte [esp + 0x10]
mov edx, dword [esp + 0x5e0]
sub al, bl
mov byte [esp + 0x1d], al
lea eax, [esp + edx*4 + 0x154]
cmp ecx, eax
jb 0x45bdf1
mov byte [esp + 0x1c], 0x63
jmp 0x45be38
mov eax, dword [ecx]
mov edx, dword [esp + 0x5e4]
cmp eax, edx
jae 0x45be0f
cmp eax, 0x100
setb dl
add edx, 0xf
mov byte [esp + 0x1c], dl
jmp 0x45be2c
sub eax, edx
mov edx, dword [esp + 0x5ec]
shl eax, 1
mov dl, byte [eax + edx]
mov byte [esp + 0x1c], dl
mov edx, dword [esp + 0x5e8]
mov ax, word [eax + edx]
add ecx, 4
mov word [esp + 0x20], ax
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x10]
mov edx, 1
sub ecx, ebx
mov eax, edi
shl edx, cl
mov ecx, ebx
shr eax, cl
cmp eax, ebp
jae 0x45be76
mov ecx, dword [esp + 0x3c]
lea ecx, [ecx + eax*8]
mov ebx, dword [esp + 0x1c]
add eax, edx
mov dword [ecx], ebx
mov ebx, dword [esp + 0x20]
mov dword [ecx + 4], ebx
lea ebx, [edx*8]
add ecx, ebx
cmp eax, ebp
jb 0x45be56
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x34]
mov eax, 1
shl eax, cl
test edi, eax
je 0x45be8d
xor edi, eax
shr eax, 1
test edi, eax
jne 0x45be85
mov edx, 1
mov ecx, ebx
shl edx, cl
xor edi, eax
mov eax, dword [esp + esi*4 + 0xd0]
mov dword [esp + 0x30], edi
dec edx
and edx, edi
cmp edx, eax
je 0x45becf
mov eax, dword [esp + esi*4 + 0x8c]
dec esi
sub ebx, eax
mov eax, 1
mov ecx, ebx
shl eax, cl
mov ecx, dword [esp + esi*4 + 0xd0]
dec eax
and eax, edi
cmp eax, ecx
jne 0x45beaa
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x28]
mov ecx, eax
dec eax
test ecx, ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x28], eax
jne 0x45bc73
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
add edx, 4
inc eax
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x34]
inc edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x2c]
cmp eax, edx
jle 0x45bc5e
mov ecx, dword [esp + 0x5f4]
mov eax, dword [esp + 0x90]
mov dword [ecx], eax
mov eax, dword [esp + 0x44]
test eax, eax
je 0x45bf34
mov ecx, dword [esp + 0x2c]
mov eax, 1
cmp ecx, eax
jne 0x45bf36
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c4
ret
test esi, esi
je 0x45bf55
mov edx, dword [esp + 0x114]
push edx
call fcn.0045bf70
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x5c4
ret