Function at 0x10057ef0
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
mov esi, ecx
mov ebx, edx
mov ecx, dword [ebp + 8]
xor eax, eax
add ecx, dword [ebp + 0xc]
cmp dword [ebp + 0xc], 0x40
push edi
mov dword [ebp - 0x40], ebx
lea edi, [ebx - 5]
mov dword [ebp - 8], esi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x30], ecx
jb 0x10058448
cmp ebx, 8
jb 0x10058448
cmp esi, 0x2001
ja 0x10057f3f
pop edi
pop esi
mov eax, 0xc00000bb
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
push 0x20000
push 0
push dword [ebp + 0x14]
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0x4c], ebx
add edi, esi
lea ebx, [eax + 4]
mov dword [ebp - 0x18], eax
mov al, byte [esi]
add esp, 0xc
mov byte [ebx], al
mov edx, 2
mov eax, esi
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x54], ecx
inc ebx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x24], ecx
mov ecx, eax
lea esi, [eax + 1]
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x14], edx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x2c], ecx
lea ecx, [ecx]
add ecx, 0x2000
mov dword [ebp - 0x34], ecx
cmp ecx, edi
jbe 0x10057fa2
mov ecx, edi
mov dword [ebp - 0x34], edi
mov edi, dword [ebp - 0x40]
add edi, esi
mov dword [ebp - 0x38], edi
cmp ecx, edi
jae 0x10057fb1
mov dword [ebp - 0x38], ecx
and dword [ebp - 0x24], 0x3fff
cmp dword [ebp - 0x2c], ecx
jae 0x10058030
mov edx, dword [ebp - 0x24]
mov eax, ecx
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp - 0x2c]
add edi, 0x20000
mov ebx, dword [ebp - 0x34]
sub eax, esi
lea edi, [edi + edx*4]
add edx, eax
mov dword [ebp - 0x24], edx
jmp 0x10057fe0
movzx eax, byte [esi + 2]
lea edi, [edi + 4]
movzx ecx, word [eax*2 + 0x1000b578]
movzx eax, byte [esi]
movzx eax, word [eax*2 + 0x1000b178]
xor ecx, eax
movzx eax, byte [esi + 1]
movzx eax, word [eax*2 + 0x1000b378]
xor ecx, eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + ecx*4]
mov dword [edi - 4], eax
mov eax, dword [ebp + 0x14]
mov dword [eax + ecx*4], esi
inc esi
cmp esi, ebx
jb 0x10057fe0
mov ebx, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x2c], esi
mov esi, dword [ebp - 0x3c]
lea ecx, [ecx]
lea ecx, [esi - 0x2000]
mov edi, 0x2000
mov dword [ebp - 0xc], ecx
sub edi, eax
cmp esi, dword [ebp - 0x38]
jb 0x10058064
mov ecx, dword [ebp - 0x34]
cmp esi, ecx
jae 0x100583c6
mov edx, ecx
lea ecx, [ebp - 0x54]
push esi
call fcn.10057900
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 0x14]
add ecx, edi
and ecx, 0x3fff
mov ecx, dword [edx + ecx*4 + 0x20000]
mov edx, dword [esi]
mov dword [ebp - 0x3c], edx
cmp ecx, dword [ebp - 0xc]
jb 0x100580f4
mov eax, dword [ecx]
xor eax, edx
je 0x10058169
test eax, 0xffffff
je 0x10058148
mov eax, dword [ebp - 8]
sub ecx, eax
mov edx, dword [ebp + 0x14]
and ecx, 0x3fff
mov ecx, dword [edx + ecx*4 + 0x20000]
mov edx, dword [ebp - 0x3c]
cmp ecx, dword [ebp - 0xc]
jb 0x100580f4
mov eax, dword [ecx]
xor eax, edx
je 0x10058169
test eax, 0xffffff
je 0x10058148
mov eax, dword [ebp - 8]
sub ecx, eax
mov edx, dword [ebp + 0x14]
and ecx, 0x3fff
mov ecx, dword [edx + ecx*4 + 0x20000]
mov edx, dword [ebp - 0x3c]
cmp ecx, dword [ebp - 0xc]
jb 0x100580f4
mov eax, dword [ecx]
xor eax, edx
je 0x10058169
test eax, 0xffffff
je 0x10058148
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
inc esi
mov byte [ebx], dl
inc ecx
mov edx, dword [ebp - 0x14]
inc ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0xc], ecx
test edx, edx
jle 0x10058116
add edx, edx
mov dword [ebp - 0x14], edx
jmp 0x10058040
mov ecx, dword [ebp - 0xc]
lea eax, [edx + edx]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x18], ebx
add ebx, 4
mov dword [ebp - 4], ebx
mov dword [edx], eax
mov edx, 1
mov eax, dword [ebp - 0x30]
add eax, 0xffffffd7
mov dword [ebp - 0x14], edx
cmp ebx, eax
mov eax, dword [ebp - 8]
jae 0x100583d4
jmp 0x10058040
mov eax, esi
mov dword [ebp - 0x10], 3
sub eax, ecx
xor ebx, ebx
mov dword [ebp - 0x20], eax
lea eax, [esi - 0x2000]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x1c], ebx
jmp 0x100582e7
xor ebx, ebx
mov dword [ebp - 0x10], 3
mov dword [ebp - 0x1c], ebx
mov edi, dword [ebp - 8]
add ecx, 4
add edi, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x44], esi
add esi, 4
lea edx, [esi + 0x20]
cmp edx, edi
jae 0x100581f6
mov edi, edi
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x10058294
mov eax, dword [esi + 4]
cmp eax, dword [ecx + 4]
jne 0x1005828e
mov eax, dword [esi + 8]
cmp eax, dword [ecx + 8]
jne 0x10058286
mov eax, dword [esi + 0xc]
cmp eax, dword [ecx + 0xc]
jne 0x1005827e
mov eax, dword [esi + 0x10]
cmp eax, dword [ecx + 0x10]
jne 0x10058276
mov eax, dword [esi + 0x14]
cmp eax, dword [ecx + 0x14]
jne 0x1005826e
mov eax, dword [esi + 0x18]
cmp eax, dword [ecx + 0x18]
jne 0x10058266
mov eax, dword [esi + 0x1c]
cmp eax, dword [ecx + 0x1c]
jne 0x1005825e
mov esi, edx
add ecx, 0x20
lea edx, [esi + 0x20]
cmp edx, edi
jb 0x10058190
cmp esi, edi
jae 0x1005820c
lea ebx, [ebx]
mov al, byte [esi]
cmp al, byte [ecx]
jne 0x1005820c
inc esi
inc ecx
cmp esi, edi
jb 0x10058200
mov edx, dword [ebp - 0x44]
mov eax, esi
sub eax, edx
cmp eax, dword [ebp - 0x10]
jbe 0x100582cb
sub esi, ecx
mov edi, eax
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x20], esi
cmp ecx, edx
jbe 0x100582d0
mov esi, edx
mov ecx, dword [ebp - 0x20]
lea eax, [edi - 3]
mov ebx, dword [ebp - 4]
add esi, edi
mov dword [ebp - 0x3c], esi
lea ecx, [ecx*8 - 8]
cmp eax, 7
jae 0x1005830e
add ecx, eax
mov word [ebx], cx
add ebx, 2
mov dword [ebp - 0x20], ecx
jmp 0x10058384
add esi, 0x1c
add ecx, 0x1c
jmp 0x10058294
add esi, 0x18
add ecx, 0x18
jmp 0x10058294
add esi, 0x14
add ecx, 0x14
jmp 0x10058294
add esi, 0x10
add ecx, 0x10
jmp 0x10058294
add esi, 0xc
add ecx, 0xc
jmp 0x10058294
add esi, 8
add ecx, 8
jmp 0x10058294
add esi, 4
add ecx, 4
mov al, byte [esi]
cmp al, byte [ecx]
jne 0x1005820c
mov al, byte [esi + 1]
cmp al, byte [ecx + 1]
je 0x100582ad
inc esi
inc ecx
jmp 0x1005820c
mov al, byte [esi + 2]
cmp al, byte [ecx + 2]
je 0x100582c0
add esi, 2
add ecx, 2
jmp 0x1005820c
add esi, 3
add ecx, 3
jmp 0x1005820c
mov edi, dword [ebp - 0x10]
add ebx, eax
sub ecx, eax
mov esi, edx
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0xc]
inc ebx
mov dword [ebp - 0x1c], ebx
cmp ebx, 0x18
jae 0x10058230
sub ecx, dword [ebp - 8]
mov edi, dword [ebp + 0x14]
and ecx, 0x3fff
mov ecx, dword [edi + ecx*4 + 0x20000]
mov edi, dword [ebp - 0x10]
cmp ecx, eax
jb 0x10058230
cmp edx, dword [ecx]
jne 0x100582da
jmp 0x10058175
or ecx, 7
sub eax, 7
mov word [ebx], cx
add ebx, 2
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 4], ebx
test ecx, ecx
jne 0x1005833a
mov dword [ebp - 0x28], ebx
cmp eax, 0xf
jae 0x10058334
mov byte [ebx], al
inc ebx
jmp 0x10058384
mov byte [ebx], 0xf
inc ebx
jmp 0x10058353
cmp eax, 0xf
jae 0x1005834b
shl al, 4
or byte [ecx], al
xor ecx, ecx
mov dword [ebp - 0x28], ecx
jmp 0x10058387
or byte [ecx], 0xf0
xor ecx, ecx
mov dword [ebp - 0x28], ecx
sub eax, 0xf
cmp eax, 0xff
jae 0x10058362
mov byte [ebx], al
inc ebx
jmp 0x10058384
add eax, 0x16
mov byte [ebx], 0xff
cmp eax, 0x10000
jae 0x10058378
mov word [ebx + 1], ax
add ebx, 3
jmp 0x10058384
xor ecx, ecx
mov word [ebx + 1], cx
mov dword [ebx + 3], eax
add ebx, 7
mov dword [ebp - 4], ebx
mov edx, dword [ebp - 0x14]
test edx, edx
jle 0x10058397
lea edx, [edx*2 + 1]
jmp 0x100583b1
lea eax, [edx*2 + 1]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x18], ebx
add ebx, 4
mov dword [ebp - 4], ebx
mov dword [edx], eax
mov edx, 1
mov eax, dword [ebp - 0x30]
add eax, 0xffffffd7
mov dword [ebp - 0x14], edx
cmp ebx, eax
mov eax, dword [ebp - 8]
jae 0x100583d4
jmp 0x10058030
mov edi, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x2c]
cmp esi, edi
jb 0x10057f90
mov edi, dword [ebp - 0x40]
add edi, eax
cmp esi, edi
jae 0x1005840a
lea ecx, [ecx]
cmp ebx, dword [ebp - 0x30]
jae 0x10058448
mov al, byte [esi]
inc esi
mov byte [ebx], al
inc ebx
test edx, edx
jle 0x100583f3
add edx, edx
jmp 0x10058406
lea eax, [edx + edx]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x18], ebx
add ebx, 4
mov dword [edx], eax
mov edx, 1
cmp esi, edi
jb 0x100583e0
cmp ebx, dword [ebp - 0x30]
jae 0x10058448
test edx, edx
jle 0x1005841e
lea edx, [edx*2 + 1]
test edx, edx
jg 0x10058413
sub ebx, dword [ebp + 8]
lea eax, [edx*2 + 1]
mov edx, dword [ebp - 0x18]
mov dword [edx], eax
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
cmp ebx, 8
jae 0x1005843d
mov dword [eax], 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
pop edi
pop esi
mov eax, 0xc0000023
pop ebx
mov esp, ebp
pop ebp
ret 0x1c