Function at 0x5d2dee
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x14], eax
add eax, 0x930c
cmp dword [eax], 0
jne 0x5d2e16
push edi
mov dword [eax], 1
call fcn.005d2bd2
mov eax, dword [edi + 0x30]
mov ecx, dword [ebp - 0x14]
mov esi, dword [edi + 0x20]
mov ebx, dword [edi + 0x2c]
mov dword [ebp - 4], eax
mov eax, dword [edi + 0x18]
add ecx, eax
movzx edx, byte [ecx]
movzx ecx, byte [ecx + 1]
shl edx, 4
xor edx, ecx
cmp eax, dword [edi + 0x1c]
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], edx
jge 0x5d3385
jmp 0x5d2e4a
mov edx, dword [ebp - 0x10]
cmp esi, dword [edi + 0x28]
jae 0x5d3385
mov ecx, dword [edi + 0x1c]
sub ecx, eax
cmp ecx, 3
jle 0x5d2edc
mov edi, dword [ebp - 0x14]
movzx ecx, byte [edi + eax + 2]
shl edx, 4
xor ecx, edx
mov dword [ebp - 0x10], ecx
and ecx, 0x7ff
lea ecx, reloc.MSVCRT.dll___dllonexit
movzx edx, word [ecx]
mov word [ecx], ax
mov ecx, eax
and ecx, 0x1fff
test edx, edx
mov dword [ebp - 0x18], ecx
lea ecx, reloc.MSVCRT.dll___dllonexit
mov edi, dword [ebp - 0x18]
mov word [ecx + edi*2], dx
je 0x5d2f23
push dword [ebp + 0x18]
lea edi, [ebp - 0x1c]
push dword [ebp + 0xc]
push edi
mov edi, dword [ebp - 0x14]
push ecx
mov ecx, eax
call fcn.005d2c7e
mov edx, dword [ebp - 8]
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
lea edi, [ecx + edx]
cmp edi, eax
mov dword [ebp - 0xc], ecx
jle 0x5d2ed1
sub eax, edx
mov dword [ebp - 0xc], eax
mov ecx, eax
mov eax, dword [ebp - 8]
cmp ecx, 3
jge 0x5d2f2c
mov edi, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
movzx ecx, byte [eax + ecx]
mov ecx, dword [ecx*4 + reloc.MSVCRT.dll___dllonexit]
mov edx, ecx
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 4]
shr edx, 5
shl edx, cl
mov ecx, dword [ebp - 0x18]
and ecx, 0x1f
add dword [ebp - 4], ecx
or ebx, edx
cmp dword [ebp - 4], 0x10
jl 0x5d2f1a
sub dword [ebp - 4], 0x10
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
inc eax
mov dword [ebp - 8], eax
jmp 0x5d337c
and dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0xc]
jmp 0x5d2ed4
inc eax
cmp ecx, dword [ebp + 0x10]
mov dword [ebp - 8], eax
jg 0x5d3219
mov edi, dword [ebp - 0x14]
movzx ecx, byte [edi + eax + 2]
mov edx, dword [ebp - 0x10]
shl edx, 4
xor ecx, edx
mov dword [ebp - 0x10], ecx
and ecx, 0x7ff
lea ecx, reloc.MSVCRT.dll___dllonexit
movzx edx, word [ecx]
mov word [ecx], ax
mov ecx, eax
and ecx, 0x1fff
add edi, 0x4106
test edx, edx
mov word [edi + ecx*2], dx
je 0x5d3021
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
jl 0x5d2f87
sar ecx, 2
push dword [ebp + 0x18]
push ecx
lea ecx, [ebp - 0x20]
push ecx
push edi
mov edi, dword [ebp - 0x14]
mov ecx, eax
call fcn.005d2c7e
mov ecx, dword [ebp - 8]
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x18], edx
add edx, ecx
cmp edx, eax
jle 0x5d2fb3
sub eax, ecx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 0x18], ecx
jle 0x5d3114
mov ecx, dword [ebp - 0x14]
movzx ecx, byte [eax + ecx - 1]
mov edx, dword [ecx*4 + reloc.MSVCRT.dll___dllonexit]
mov ecx, dword [ebp - 4]
mov edi, edx
shr edi, 5
shl edi, cl
and edx, 0x1f
add dword [ebp - 4], edx
push 0x10
pop edx
or ebx, edi
cmp dword [ebp - 4], edx
jl 0x5d2ffc
sub dword [ebp - 4], edx
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0x18]
mov edi, dword [ecx*4 + reloc.MSVCRT.dll___dllonexit]
mov ecx, edi
and ecx, 0x1f
mov dword [ebp - 0xc], ecx
cmp ecx, edx
mov ecx, dword [ebp - 4]
jg 0x5d3027
shr edi, 5
shl edi, cl
or ebx, edi
add ecx, dword [ebp - 0xc]
jmp 0x5d3066
and dword [ebp - 0x18], 0
jmp 0x5d2fb6
mov edx, edi
shr edx, 5
and edx, 0xffff
shl edx, cl
push 0x10
or ebx, edx
pop edx
add dword [ebp - 4], edx
cmp dword [ebp - 4], edx
jl 0x5d3052
sub dword [ebp - 4], edx
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 4]
shr edi, 0x15
shl edi, cl
mov ecx, dword [ebp - 0xc]
or ebx, edi
mov edi, dword [ebp - 4]
lea ecx, [edi + ecx - 0x10]
cmp ecx, edx
mov dword [ebp - 4], ecx
jl 0x5d307e
sub dword [ebp - 4], edx
mov ecx, ebx
mov byte [esi], bl
shr ecx, 8
inc esi
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0x20]
mov edi, 0x100
cmp ecx, edi
jb 0x5d308f
shr ecx, 7
add ecx, edi
movzx ecx, byte [ecx + 0x68cd8180]
mov ecx, dword [ecx*4 + reloc.MSVCRT.dll___dllonexit]
mov edi, ecx
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 4]
shr edi, 8
shl edi, cl
mov ecx, dword [ebp - 0xc]
and ecx, 0xf
add dword [ebp - 4], ecx
or ebx, edi
cmp dword [ebp - 4], edx
jl 0x5d30cb
sub dword [ebp - 4], edx
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0xc]
shr ecx, 4
and ecx, 0xf
mov dword [ebp - 0xc], ecx
je 0x5d3105
mov edi, dword [ecx*4 + reloc.MSVCRT.dll___dllonexit]
and edi, dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
shl edi, cl
add ecx, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
or ebx, edi
cmp ecx, edx
jl 0x5d3105
sub dword [ebp - 4], edx
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jmp 0x5d3312
mov edi, dword [ecx*4 + reloc.MSVCRT.dll___dllonexit]
mov ecx, dword [ebp - 4]
mov edx, edi
and edx, 0x1f
cmp edx, 0x10
mov dword [ebp - 0x18], edx
jg 0x5d313b
add dword [ebp - 4], edx
shr edi, 5
shl edi, cl
or ebx, edi
cmp dword [ebp - 4], 0x10
jmp 0x5d317a
mov edx, edi
shr edx, 5
and edx, 0xffff
shl edx, cl
mov ecx, dword [ebp - 4]
add ecx, 0x10
or ebx, edx
cmp ecx, 0x10
jl 0x5d3166
mov byte [esi], bl
mov edx, ebx
inc esi
shr edx, 8
mov byte [esi], dl
inc esi
sub ecx, 0x10
shr ebx, 0x10
mov edx, dword [ebp - 0x18]
shr edi, 0x15
shl edi, cl
lea ecx, [ecx + edx - 0x10]
mov dword [ebp - 4], ecx
or ebx, edi
cmp ecx, 0x10
jl 0x5d318e
sub dword [ebp - 4], 0x10
mov ecx, ebx
mov byte [esi], bl
shr ecx, 8
inc esi
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0x1c]
mov edx, 0x100
cmp ecx, edx
jb 0x5d319f
shr ecx, 7
add ecx, edx
movzx ecx, byte [ecx + 0x68cd8180]
mov edi, dword [ecx*4 + reloc.MSVCRT.dll___dllonexit]
mov ecx, dword [ebp - 4]
mov edx, edi
shr edx, 8
shl edx, cl
mov ecx, edi
and ecx, 0xf
add dword [ebp - 4], ecx
or ebx, edx
cmp dword [ebp - 4], 0x10
jl 0x5d31d9
sub dword [ebp - 4], 0x10
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
shr edi, 4
and edi, 0xf
je 0x5d320d
mov edx, dword [edi*4 + reloc.MSVCRT.dll___dllonexit]
and edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
add dword [ebp - 4], edi
shl edx, cl
or ebx, edx
cmp dword [ebp - 4], 0x10
jl 0x5d320d
sub dword [ebp - 4], 0x10
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
dec dword [ebp - 0xc]
inc eax
mov dword [ebp - 8], eax
jmp 0x5d3312
mov edi, dword [ecx*4 + reloc.MSVCRT.dll___dllonexit]
mov ecx, dword [ebp - 4]
mov edx, edi
and edx, 0x1f
cmp edx, 0x10
mov dword [ebp - 0x18], edx
jg 0x5d3240
add dword [ebp - 4], edx
shr edi, 5
shl edi, cl
or ebx, edi
cmp dword [ebp - 4], 0x10
jmp 0x5d327f
mov edx, edi
shr edx, 5
and edx, 0xffff
shl edx, cl
mov ecx, dword [ebp - 4]
add ecx, 0x10
or ebx, edx
cmp ecx, 0x10
jl 0x5d326b
mov byte [esi], bl
mov edx, ebx
inc esi
shr edx, 8
mov byte [esi], dl
inc esi
sub ecx, 0x10
shr ebx, 0x10
mov edx, dword [ebp - 0x18]
shr edi, 0x15
shl edi, cl
lea ecx, [ecx + edx - 0x10]
mov dword [ebp - 4], ecx
or ebx, edi
cmp ecx, 0x10
jl 0x5d3293
sub dword [ebp - 4], 0x10
mov ecx, ebx
mov byte [esi], bl
shr ecx, 8
inc esi
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0x1c]
mov edx, 0x100
cmp ecx, edx
jb 0x5d32a4
shr ecx, 7
add ecx, edx
movzx ecx, byte [ecx + 0x68cd8180]
mov edi, dword [ecx*4 + reloc.MSVCRT.dll___dllonexit]
mov ecx, dword [ebp - 4]
mov edx, edi
shr edx, 8
shl edx, cl
mov ecx, edi
and ecx, 0xf
add dword [ebp - 4], ecx
or ebx, edx
cmp dword [ebp - 4], 0x10
jl 0x5d32de
sub dword [ebp - 4], 0x10
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
shr edi, 4
and edi, 0xf
je 0x5d3312
mov edx, dword [edi*4 + reloc.MSVCRT.dll___dllonexit]
and edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
add dword [ebp - 4], edi
shl edx, cl
or ebx, edx
cmp dword [ebp - 4], 0x10
jl 0x5d3312
sub dword [ebp - 4], 0x10
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x1c]
mov ecx, dword [ebp - 0xc]
sub edx, eax
cmp edx, ecx
jg 0x5d332a
lea eax, [eax + ecx - 1]
mov dword [ebp - 8], eax
jmp 0x5d3379
dec ecx
test ecx, ecx
jle 0x5d3379
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x14]
movzx ecx, byte [edx + eax + 2]
mov edi, dword [ebp - 0x10]
shl edi, 4
xor ecx, edi
mov dword [ebp - 0x10], ecx
and ecx, 0x7ff
lea ecx, reloc.MSVCRT.dll___dllonexit
movzx edi, word [ecx]
mov word [ecx], ax
mov ecx, eax
and ecx, 0x1fff
mov dword [ebp - 0xc], ecx
lea ecx, reloc.MSVCRT.dll___dllonexit
mov edx, dword [ebp - 0xc]
inc eax
dec dword [ebp - 0x18]
mov word [ecx + edx*2], di
jne 0x5d3332
mov dword [ebp - 8], eax
mov edi, dword [ebp + 8]
cmp eax, dword [edi + 0x1c]
jl 0x5d2e47
mov ecx, dword [ebp - 4]
mov dword [edi + 0x30], ecx
mov ecx, eax
sub ecx, dword [edi + 0x1c]
mov dword [edi + 0x18], eax
neg ecx
sbb ecx, ecx
and ecx, 2
cmp eax, 0x4000
mov dword [edi + 0x2c], ebx
mov dword [edi + 0x20], esi
mov dword [edi], ecx
jne 0x5d33b0
mov ebx, edi
call fcn.005d2c14
pop edi
pop esi
pop ebx
leave
ret 0x14