Function at 0x10057b90
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ecx]
push ebx
push esi
push edi
test byte [ecx + 4], 0x60
mov edi, edx
movzx eax, word [ecx + 0x14]
je 0x10057bad
dec eax
movzx ebx, ax
jmp 0x10057baf
mov ebx, eax
movzx eax, word [ecx + 0xc]
add eax, 0xfffffffe
mov dword [ebp - 4], ebx
cmp eax, 0x89
ja case.0x10057bcb.8
movzx eax, byte [eax + 0x10057f34]
jmp dword [eax*4 + 0x10057efc]
cmp dword [ebp + 0xc], 0
jne 0x10057be6
pop edi
pop esi
mov eax, 0x80070057
pop ebx
mov esp, ebp
pop ebp
ret 0x20
mov esi, dword [ebp + 0x10]
mov ecx, edi
mov edx, dword [ebp + 8]
push esi
push ebx
call fcn.10057130
jmp 0x10057cf8
mov esi, dword [ebp + 0x10]
movzx ecx, bx
mov dl, byte [ecx + edi - 1]
sar dl, 7
sub ecx, 1
js 0x10057c1f
lea esp, [esp]
mov al, byte [edi]
lea edi, [edi + 1]
xor al, dl
mov byte [ecx + esi], al
sub ecx, 1
jns 0x10057c10
test dl, dl
jne 0x10057ea4
or byte [esi], 0x80
jmp 0x10057ea4
mov esi, dword [ebp + 0x10]
xor eax, eax
cmp dword [ecx + 0x10], 5
mov edx, esi
mov ecx, edi
sete al
push eax
movzx eax, bx
push eax
call fcn.10057100
jmp 0x10057cf8
cmp dword [ebp + 0xc], 0
je 0x10057bd8
mov esi, dword [ebp + 0x10]
mov ecx, edi
mov edx, dword [ebp + 8]
movzx eax, bx
push eax
push esi
call fcn.10057390
jmp 0x10057cf8
cmp dword [ebp + 0xc], 0
jne 0x10057caf
test edi, edi
jne 0x10057c84
push dword [ebp + 0x20]
xor edx, edx
push dword [ebp + 0x24]
push dword [ebp + 0x18]
push 1
jmp 0x10057ce9
mov ecx, edi
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10057c90
push dword [ebp + 0x20]
sub ecx, edx
push dword [ebp + 0x24]
sar ecx, 1
push dword [ebp + 0x18]
push 1
lea edx, [ecx + ecx]
jmp 0x10057ce9
push dword [ebp + 0x20]
mov edx, dword [ebp + 8]
push dword [ebp + 0x24]
push dword [ebp + 0x18]
push 1
jmp 0x10057ce9
cmp dword [ebp + 0xc], 0
jne 0x10057cdb
test edi, edi
jne 0x10057ccd
xor edx, edx
jmp 0x10057cde
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x10057cd0
sub edx, ecx
jmp 0x10057cde
mov edx, dword [ebp + 8]
push dword [ebp + 0x20]
push dword [ebp + 0x24]
push dword [ebp + 0x18]
push 0
mov esi, dword [ebp + 0x10]
mov ecx, edi
movzx eax, bx
push eax
push esi
call fcn.100573e0
mov ebx, eax
test ebx, ebx
jns 0x10057ea6
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20
movzx eax, bx
or bl, 0xff
cmp eax, 0x13
jae 0x10057d26
pop edi
mov ebx, 0x8007000e
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0x20
mov esi, dword [ebp + 0x10]
push eax
push 0
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
cmp byte [edi + 2], 0
je 0x10057d40
mov byte [esi], 0x80
xor bl, bl
add edi, 3
mov ecx, 0xf
mov al, byte [edi]
lea edi, [edi + 1]
xor al, bl
mov byte [ecx + esi + 1], al
sub ecx, 1
jns 0x10057d48
jmp 0x10057ea4
movzx eax, bx
cmp eax, 0x10
jb 0x10057d16
mov esi, dword [ebp + 0x10]
push eax
push 0
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
cmp byte [edi + 3], 0
jne 0x10057d7d
mov byte [esi], 0x80
movzx eax, byte [edi + 4]
lea ecx, [esi + 1]
mov byte [esi + 4], al
movzx eax, byte [edi + 5]
mov byte [esi + 3], al
movzx eax, byte [edi + 6]
mov byte [esi + 2], al
movzx eax, byte [edi + 7]
mov byte [ecx], al
movzx eax, byte [edi + 0xc]
mov byte [esi + 8], al
movzx eax, byte [edi + 0xd]
mov byte [esi + 7], al
movzx eax, byte [edi + 0xe]
mov byte [esi + 6], al
movzx eax, byte [edi + 0xf]
mov byte [esi + 5], al
movzx eax, byte [edi + 8]
mov byte [esi + 0xc], al
movzx eax, byte [edi + 9]
mov byte [esi + 0xb], al
movzx eax, byte [edi + 0xa]
mov byte [esi + 0xa], al
movzx eax, byte [edi + 0xb]
mov byte [esi + 9], al
cmp byte [edi + 3], 0
je 0x10057ea4
mov edx, 0xc
not byte [ecx]
lea ecx, [ecx + 1]
dec edx
test edx, edx
jg 0x10057de2
jmp 0x10057ea4
mov esi, dword [ebp + 0x10]
movzx ecx, bx
sub ecx, 1
js 0x10057e0d
lea esp, [esp]
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [ecx + esi], al
sub ecx, 1
jns 0x10057e00
xor byte [esi], 0x80
jmp 0x10057ea4
mov esi, dword [ebp + 0x10]
movzx eax, bx
push eax
push edi
push esi
call sub.msvcrt.dll_memcpy
movzx eax, byte [edi]
mov byte [esi + 1], al
movzx eax, byte [edi + 1]
mov byte [esi], al
jmp 0x10057ea1
mov esi, dword [ebp + 0x10]
movzx eax, bx
push eax
push edi
push esi
call sub.msvcrt.dll_memcpy
movzx eax, byte [edi]
mov byte [esi + 1], al
movzx eax, byte [edi + 1]
mov byte [esi], al
movzx eax, byte [edi + 0xc]
mov byte [esi + 0xf], al
movzx eax, byte [edi + 0xd]
mov byte [esi + 0xe], al
movzx eax, byte [edi + 0xe]
mov byte [esi + 0xd], al
movzx eax, byte [edi + 0xf]
mov byte [esi + 0xc], al
jmp 0x10057ea1
mov esi, dword [ebp + 0x10]
movzx ecx, bx
sub ecx, 1
js 0x10057ea4
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [ecx + esi], al
sub ecx, 1
jns 0x10057e74
jmp 0x10057ea4
pop edi
mov ebx, 0x80004005
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0x20
mov esi, dword [ebp + 0x10]
movzx eax, bx
push eax
push edi
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
xor ebx, ebx
mov eax, dword [ebp - 4]
movzx edi, ax
mov eax, dword [ebp + 0x14]
sub eax, edi
push eax
lea eax, [edi + esi]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [ebp + 0x1c], 0
je 0x10057eee
test edi, edi
je 0x10057eee
mov ecx, edi
shr edi, 2
and ecx, 3
test edi, edi
je 0x10057ee0
not dword [esi]
add esi, 4
sub edi, 1
jne 0x10057ed6
test ecx, ecx
je 0x10057eee
not byte [esi]
lea esi, [esi + 1]
sub ecx, 1
jne 0x10057ee4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0x20