Function at 0x1008c73d
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x44
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x24], edx
push 3
pop esi
mov eax, ebx
xor edx, edx
div esi
mov dword [ebp - 0x30], ecx
shl eax, 2
mov edi, edx
test edx, edx
je 0x1008cd3c
add eax, 4
setb cl
cmp ebx, 0xbfffffff
ja 0x1008cd48
test cl, cl
jne 0x1008cd48
xor edx, edx
mov ecx, eax
mov dword [ebp - 0x10], eax
inc edx
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::allocate_in::h27dc888bb151676b
mov ecx, ebx
mov dword [ebp - 0x28], eax
xor eax, eax
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x2c], edi
sub ecx, 0x1a
cmovb ecx, eax
mov dword [ebp - 0x38], ecx
mov ecx, 0
jbe 0x1008cbae
xor eax, eax
mov dword [ebp - 0x18], 0
mov edi, dword [ebp - 0x18]
lea edx, [eax + 0x1a]
mov ecx, eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x3c], edx
push 0x10167c48
push ebx
push dword [ebp - 0x24]
call sym.__ZN106__LT_core..ops..range..Range_LT_usize_GT__u20_as_u20_core..slice..index..SliceIndex_LT__u5b_T_u5d__GT__GT_5index17h19b4
add esp, 0xc
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov esi, eax
lea eax, [edi + 0x20]
push 0x10167c58
mov dword [ebp - 0x18], eax
push eax
push edi
call sym.__ZN4core5slice5index77__LT_impl_u20_core..ops..index..IndexMut_LT_I_GT__u20_for_u20__u5b_T_u5d__GT_9index_mut17hfa71a4a9d6660
add esp, 0xc
mov dword [ebp - 0x20], esi
mov ecx, esi
mov esi, dword [ebp - 0x1c]
mov ebx, edx
mov edi, eax
mov edx, esi
push 0x10167c68
push 0
call sym.core::slice::index::__LT_impl_u20_core..ops..index..Index_LT_I_GT__u20_for_u20__u5b_T_u5d__GT_::index::h1f500cfe40e440d1
pop ecx
pop ecx
mov ecx, eax
call sym.base64::encode::read_u64::hf4ef5562280f526b
test ebx, ebx
je 0x1008cea1
mov ecx, edx
shr ecx, 0x1a
cmp ebx, 1
mov cl, byte [ecx + 0x10167efc]
mov byte [edi], cl
je 0x1008ceaf
mov ecx, edx
shr ecx, 0x14
and ecx, 0x3f
cmp ebx, 2
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 1], cl
jbe 0x1008cebe
mov ecx, edx
shr ecx, 0xe
and ecx, 0x3f
cmp ebx, 3
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 2], cl
je 0x1008cecd
mov ecx, edx
shr ecx, 8
and ecx, 0x3f
cmp ebx, 4
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 3], cl
jbe 0x1008cedc
mov ecx, edx
shr ecx, 2
and ecx, 0x3f
cmp ebx, 5
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 4], cl
je 0x1008ceeb
shld edx, eax, 4
and edx, 0x3f
cmp ebx, 6
mov cl, byte [edx + 0x10167efc]
mov byte [edi + 5], cl
jbe 0x1008cefa
mov ecx, eax
shr ecx, 0x16
and ecx, 0x3f
cmp ebx, 7
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 6], cl
je 0x1008cf09
shr eax, 0x10
mov ecx, dword [ebp - 0x20]
mov edx, esi
and eax, 0x3f
mov al, byte [eax + 0x10167efc]
mov byte [edi + 7], al
push 0x10167cf8
push 6
call sym.core::slice::index::__LT_impl_u20_core..ops..index..Index_LT_I_GT__u20_for_u20__u5b_T_u5d__GT_::index::h1f500cfe40e440d1
pop ecx
pop ecx
mov ecx, eax
call sym.base64::encode::read_u64::hf4ef5562280f526b
cmp ebx, 8
jbe 0x1008cf18
mov ecx, edx
shr ecx, 0x1a
cmp ebx, 9
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 8], cl
je 0x1008cf27
mov ecx, edx
shr ecx, 0x14
and ecx, 0x3f
cmp ebx, 0xa
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 9], cl
jbe 0x1008cf36
mov ecx, edx
shr ecx, 0xe
and ecx, 0x3f
cmp ebx, 0xb
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0xa], cl
je 0x1008cf45
mov ecx, edx
shr ecx, 8
and ecx, 0x3f
cmp ebx, 0xc
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0xb], cl
jbe 0x1008cf54
mov ecx, edx
shr ecx, 2
and ecx, 0x3f
cmp ebx, 0xd
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0xc], cl
je 0x1008cf63
shld edx, eax, 4
and edx, 0x3f
cmp ebx, 0xe
mov cl, byte [edx + 0x10167efc]
mov byte [edi + 0xd], cl
jbe 0x1008cf72
mov ecx, eax
shr ecx, 0x16
and ecx, 0x3f
cmp ebx, 0xf
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0xe], cl
je 0x1008cf81
shr eax, 0x10
mov ecx, dword [ebp - 0x20]
mov edx, esi
and eax, 0x3f
mov al, byte [eax + 0x10167efc]
mov byte [edi + 0xf], al
push 0x10167d88
push 0xc
call sym.core::slice::index::__LT_impl_u20_core..ops..index..Index_LT_I_GT__u20_for_u20__u5b_T_u5d__GT_::index::h1f500cfe40e440d1
pop ecx
pop ecx
mov ecx, eax
call sym.base64::encode::read_u64::hf4ef5562280f526b
cmp ebx, 0x10
jbe 0x1008cf90
mov ecx, edx
shr ecx, 0x1a
cmp ebx, 0x11
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x10], cl
je 0x1008cf9f
mov ecx, edx
shr ecx, 0x14
and ecx, 0x3f
cmp ebx, 0x12
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x11], cl
jbe 0x1008cfae
mov ecx, edx
shr ecx, 0xe
and ecx, 0x3f
cmp ebx, 0x13
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x12], cl
je 0x1008cfbd
mov ecx, edx
shr ecx, 8
and ecx, 0x3f
cmp ebx, 0x14
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x13], cl
jbe 0x1008cfcc
mov ecx, edx
shr ecx, 2
and ecx, 0x3f
cmp ebx, 0x15
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x14], cl
je 0x1008cfdb
shld edx, eax, 4
and edx, 0x3f
cmp ebx, 0x16
mov cl, byte [edx + 0x10167efc]
mov byte [edi + 0x15], cl
jbe 0x1008cfea
mov ecx, eax
shr ecx, 0x16
and ecx, 0x3f
cmp ebx, 0x17
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x16], cl
je 0x1008cff9
shr eax, 0x10
mov ecx, dword [ebp - 0x20]
mov edx, esi
and eax, 0x3f
mov al, byte [eax + 0x10167efc]
mov byte [edi + 0x17], al
push 0x10167e18
push 0x12
call sym.core::slice::index::__LT_impl_u20_core..ops..index..Index_LT_I_GT__u20_for_u20__u5b_T_u5d__GT_::index::h1f500cfe40e440d1
pop ecx
pop ecx
mov ecx, eax
call sym.base64::encode::read_u64::hf4ef5562280f526b
cmp ebx, 0x18
jbe 0x1008d008
mov ecx, edx
shr ecx, 0x1a
cmp ebx, 0x19
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x18], cl
je 0x1008d017
mov ecx, edx
shr ecx, 0x14
and ecx, 0x3f
cmp ebx, 0x1a
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x19], cl
jbe 0x1008d026
mov ecx, edx
shr ecx, 0xe
and ecx, 0x3f
cmp ebx, 0x1b
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x1a], cl
je 0x1008d035
mov ecx, edx
shr ecx, 8
and ecx, 0x3f
cmp ebx, 0x1c
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x1b], cl
jbe 0x1008d044
mov ecx, edx
shr ecx, 2
and ecx, 0x3f
cmp ebx, 0x1d
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x1c], cl
je 0x1008d053
shld edx, eax, 4
and edx, 0x3f
cmp ebx, 0x1e
mov cl, byte [edx + 0x10167efc]
mov byte [edi + 0x1d], cl
jbe 0x1008d062
mov ecx, eax
shr ecx, 0x16
and ecx, 0x3f
cmp ebx, 0x1f
mov cl, byte [ecx + 0x10167efc]
mov byte [edi + 0x1e], cl
je 0x1008d071
shr eax, 0x10
mov ebx, dword [ebp + 8]
and eax, 0x3f
mov al, byte [eax + 0x10167efc]
mov byte [edi + 0x1f], al
mov eax, dword [ebp - 0x3c]
add eax, 0xfffffffe
cmp eax, dword [ebp - 0x38]
jbe 0x1008c7bd
mov ecx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x2c]
add ecx, 0x18
mov eax, ebx
sub eax, edi
mov dword [ebp - 0x1c], eax
cmp ecx, dword [ebp - 0x1c]
jae 0x1008cc99
lea edx, [ecx + 3]
mov dword [ebp - 0x20], edx
push 0x10167bb8
push ebx
push dword [ebp - 0x24]
call sym.__ZN106__LT_core..ops..range..Range_LT_usize_GT__u20_as_u20_core..slice..index..SliceIndex_LT__u5b_T_u5d__GT__GT_5index17h19b4
add esp, 0xc
mov esi, eax
mov eax, dword [ebp - 0x18]
mov edi, edx
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
lea ebx, [eax + 4]
push 0x10167bc8
push ebx
push eax
call sym.__ZN4core5slice5index77__LT_impl_u20_core..ops..index..IndexMut_LT_I_GT__u20_for_u20__u5b_T_u5d__GT_9index_mut17hfa71a4a9d6660
add esp, 0xc
test edi, edi
je 0x1008ce32
test edx, edx
je 0x1008ce40
movzx ecx, byte [esi]
shr ecx, 2
cmp edi, 1
mov cl, byte [ecx + 0x10167efc]
mov byte [eax], cl
jbe 0x1008ce4e
cmp edx, 1
jbe 0x1008ce5d
mov cl, byte [esi]
mov ch, byte [esi + 1]
shr ch, 4
shl cl, 4
or cl, ch
movzx ecx, cl
and ecx, 0x3f
cmp edi, 2
mov cl, byte [ecx + 0x10167efc]
mov byte [eax + 1], cl
jbe 0x1008ce6a
cmp edx, 2
jbe 0x1008ce79
mov cl, byte [esi + 1]
mov ch, byte [esi + 2]
shr ch, 6
shl cl, 2
or cl, ch
movzx ecx, cl
and ecx, 0x3f
cmp edx, 3
mov cl, byte [ecx + 0x10167efc]
mov byte [eax + 2], cl
je 0x1008ce86
movzx ecx, byte [esi + 2]
mov dword [ebp - 0x18], ebx
mov edi, dword [ebp - 0x2c]
mov ebx, dword [ebp + 8]
and ecx, 0x3f
mov cl, byte [ecx + 0x10167efc]
mov byte [eax + 3], cl
mov ecx, dword [ebp - 0x20]
jmp 0x1008cbb5
cmp edi, 1
je 0x1008cd5a
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
cmp edi, 2
jne 0x1008cdb0
mov eax, edx
mov edx, dword [ebp - 0x18]
cmp edx, eax
jae 0x1008d080
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x14]
movzx eax, byte [eax + ebx]
inc ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], eax
shr eax, 2
mov al, byte [eax + 0x10167efc]
mov byte [esi + edx], al
mov eax, dword [ebp + 8]
cmp ebx, eax
jae 0x1008d099
mov esi, dword [ebp - 0x10]
mov ecx, edx
lea ecx, [edx + 1]
cmp ecx, esi
jae 0x1008d0b2
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov al, byte [eax + ecx]
shl bl, 4
mov ecx, eax
shr cl, 4
or bl, cl
movzx ecx, bl
mov ebx, dword [ebp - 0x14]
and ecx, 0x3f
mov cl, byte [ecx + 0x10167efc]
mov byte [ebx + edx + 1], cl
lea ecx, [edx + 2]
mov edx, esi
cmp ecx, esi
jae 0x1008d0be
shl al, 2
and al, 0x3c
push 3
pop ebx
mov esi, dword [ebp - 0x14]
jmp 0x1008cd9b
cmp ebx, 0xc0000000
jb 0x1008c77f
push 0x2d
pop edx
mov ecx, 0x101bc376
push 0x101bc404
call sym.std::panicking::begin_panic::h03618493ec05f5ac
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
cmp ecx, edx
jae 0x1008d08f
mov edx, esi
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp - 0x1c]
movzx eax, byte [eax + esi]
mov esi, eax
shr esi, 2
mov bl, byte [esi + 0x10167efc]
mov esi, edx
mov edx, dword [ebp - 0x10]
mov byte [esi + ecx], bl
inc ecx
cmp ecx, edx
jae 0x1008d0a8
shl al, 4
and al, 0x30
push 2
pop ebx
movzx eax, al
mov al, byte [eax + 0x10167efc]
mov byte [esi + ecx], al
mov ecx, dword [ebp - 0x18]
add ecx, ebx
mov ebx, ecx
jmp 0x1008cdb3
mov ebx, dword [ebp - 0x18]
mov ecx, edx
sub ecx, ebx
jb 0x1008d0c8
mov eax, esi
mov esi, edi
xor edx, edx
add eax, ebx
xor esi, 3
test edi, edi
je 0x1008cddf
cmp esi, edx
jbe 0x1008cddf
cmp ecx, edx
je 0x1008ce95
mov byte [eax + edx], 0x3d
inc edx
jmp 0x1008cdc8
add ebx, edx
jb 0x1008d0d7
mov edi, dword [ebp - 0x14]
lea esi, [ebp - 0x50]
mov ecx, esi
mov edx, edi
push dword [ebp - 0x10]
call dbg.from_utf8
pop eax
cmp dword [esi], 0
je 0x1008ce19
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x4c]
cmp edx, 0x80000000
jne 0x1008d0e9
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
jmp 0x1008ce1f
mov ecx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x30]
mov dword [edx], esi
mov dword [edx + 4], edi
mov dword [edx + 8], ecx
add esp, 0x44
pop esi
pop edi
pop ebx
pop ebp
ret
xor ecx, ecx
xor edx, edx
push 0x10167bd8
call dbg.panic_bounds_check
xor ecx, ecx
xor edx, edx
push 0x10167be8
call dbg.panic_bounds_check
xor ecx, ecx
inc ecx
mov edx, ecx
push 0x10167bf8
call dbg.panic_bounds_check
xor ecx, ecx
inc ecx
push 0x10167c08
call dbg.panic_bounds_check
push 2
pop ecx
mov edx, ecx
push 0x10167c18
call dbg.panic_bounds_check
push 2
pop ecx
push 0x10167c28
call dbg.panic_bounds_check
push 3
pop ecx
mov edx, ecx
push 0x10167c38
call dbg.panic_bounds_check
mov edx, ecx
push 0x10167ea8
call dbg.panic_bounds_check
xor ecx, ecx
xor edx, edx
push 0x10167c78
call dbg.panic_bounds_check
xor ecx, ecx
inc ecx
mov edx, ecx
push 0x10167c88
call dbg.panic_bounds_check
push 2
pop ecx
mov edx, ebx
push 0x10167c98
call dbg.panic_bounds_check
push 3
pop ecx
mov edx, ecx
push 0x10167ca8
call dbg.panic_bounds_check
push 4
pop ecx
mov edx, ecx
push 0x10167cb8
call dbg.panic_bounds_check
push 5
pop ecx
mov edx, ecx
push 0x10167cc8
call dbg.panic_bounds_check
push 6
pop ecx
mov edx, ecx
push 0x10167cd8
call dbg.panic_bounds_check
push 7
pop ecx
mov edx, ecx
push 0x10167ce8
call dbg.panic_bounds_check
push 8
pop ecx
mov edx, ecx
push 0x10167d08
call dbg.panic_bounds_check
push 9
pop ecx
mov edx, ecx
push 0x10167d18
call dbg.panic_bounds_check
push 0xa
pop ecx
mov edx, ecx
push 0x10167d28
call dbg.panic_bounds_check
push 0xb
pop ecx
mov edx, ecx
push 0x10167d38
call dbg.panic_bounds_check
push 0xc
pop ecx
mov edx, ecx
push 0x10167d48
call dbg.panic_bounds_check
push 0xd
pop ecx
mov edx, ecx
push 0x10167d58
call dbg.panic_bounds_check
push 0xe
pop ecx
mov edx, ecx
push 0x10167d68
call dbg.panic_bounds_check
push 0xf
pop ecx
mov edx, ecx
push 0x10167d78
call dbg.panic_bounds_check
push 0x10
pop ecx
mov edx, ecx
push 0x10167d98
call dbg.panic_bounds_check
push 0x11
pop ecx
mov edx, ecx
push 0x10167da8
call dbg.panic_bounds_check
push 0x12
pop ecx
mov edx, ecx
push 0x10167db8
call dbg.panic_bounds_check
push 0x13
pop ecx
mov edx, ecx
push 0x10167dc8
call dbg.panic_bounds_check
push 0x14
pop ecx
mov edx, ecx
push 0x10167dd8
call dbg.panic_bounds_check
push 0x15
pop ecx
mov edx, ecx
push 0x10167de8
call dbg.panic_bounds_check
push 0x16
pop ecx
mov edx, ecx
push 0x10167df8
call dbg.panic_bounds_check
push 0x17
pop ecx
mov edx, ecx
push 0x10167e08
call dbg.panic_bounds_check
push 0x18
pop ecx
mov edx, ecx
push 0x10167e28
call dbg.panic_bounds_check
push 0x19
pop ecx
mov edx, ecx
push 0x10167e38
call dbg.panic_bounds_check
push 0x1a
pop ecx
mov edx, ecx
push 0x10167e48
call dbg.panic_bounds_check
push 0x1b
pop ecx
mov edx, ecx
push 0x10167e58
call dbg.panic_bounds_check
push 0x1c
pop ecx
mov edx, ecx
push 0x10167e68
call dbg.panic_bounds_check
push 0x1d
pop ecx
mov edx, ecx
push 0x10167e78
call dbg.panic_bounds_check
push 0x1e
pop ecx
mov edx, ecx
push 0x10167e88
call dbg.panic_bounds_check
push 0x1f
pop ecx
mov edx, ecx
push 0x10167e98
call dbg.panic_bounds_check
mov ecx, edx
mov edx, dword [ebp - 0x10]
push 0x10167b58
call dbg.panic_bounds_check
push 0x10167b98
call dbg.panic_bounds_check
mov ecx, dword [ebp - 0x1c]
mov edx, eax
push 0x10167b68
call dbg.panic_bounds_check
push 0x10167ba8
call dbg.panic_bounds_check
mov edx, esi
push 0x10167b78
call dbg.panic_bounds_check
push 0x10167b88
call dbg.panic_bounds_check
mov edx, dword [ebp - 0x10]
mov ecx, ebx
push 0x10167aec
call dbg.slice_start_index_len_fail
push 0x2a
pop edx
mov ecx, str.usize_overflow_when_calculating_b64_length
push 0x10167b28
call dbg.expect_failed
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x50], edx
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x4c], edx
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], eax
push 0xc
pop edx
mov ecx, str.Invalid_UTF8
push 0x101bc420
push 0x101ba300
push esi
call dbg.unwrap_failed