Function at 0x489730
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x14c
movzx eax, byte [ebp + 0x20]
mov ebx, dword [ebp + 0x14]
test ebx, ebx
mov byte [ebp - 0x12c], al
jle 0x48a0df
mov eax, dword [ebp + 0x18]
cmp dword [ebp + 0x14], eax
jg 0x48a0df
mov eax, dword [ebp + 0x1c]
add eax, 1
cmp eax, 8
ja 0x48a0df
cmp dword [ebp + 0x18], 0x28
jg 0x48a0df
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x10]
lea eax, [eax + eax*4]
lea edi, [ebx + eax*8]
mov ebx, dword [ebp + 0xc]
jmp 0x4897a0
mov edx, dword [ebp + 0x18]
cmp dword [ebp + 0x14], edx
jge 0x489c00
add dword [ebp + 0x14], 1
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call method.qrcodegen::QrCode.getNumRawDataModules_int_
mov esi, dword [ebp + 0x14]
lea ecx, [eax + 7]
test eax, eax
mov dword [esp], ebx
cmovs eax, ecx
movsx ecx, byte [edi + esi + 0x5e3200]
movsx esi, byte [edi + esi + 0x5e32c0]
sar eax, 3
imul ecx, esi
sub eax, ecx
lea esi, [eax*8]
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
call method.qrcodegen::QrSegment.getTotalBits_std::vector_qrcodegen::QrSegment__std::allocator_qrcodegen::QrSegment____const__int_
cmp eax, 0xffffffff
je 0x489790
cmp esi, eax
jl 0x489790
mov dword [esp], 0xc
mov dword [ebp - 0x138], eax
call sym.operator_new_unsigned_int_
mov ebx, eax
mov esi, eax
mov eax, dword [0x5e31ec]
mov dword [ebx], eax
mov eax, dword [0x5e31f0]
mov dword [ebx + 4], eax
mov eax, dword [0x5e31f4]
mov dword [ebx + 8], eax
xor ebx, ebx
jmp 0x489828
add ebx, 4
cmp ebx, 0xc
je 0x48988c
cmp byte [ebp - 0x12c], 0
je 0x489820
mov eax, dword [ebp + 0x14]
mov edi, dword [esi + ebx]
mov dword [esp], eax
call method.qrcodegen::QrCode.getNumRawDataModules_int_
lea edx, [eax + 7]
test eax, eax
cmovs eax, edx
lea edx, [edi + edi*4]
sar eax, 3
mov dword [ebp - 0x130], eax
mov eax, dword [ebp + 0x14]
lea ecx, [edi + edx*8]
movsx edx, byte [eax + ecx + 0x5e32c0]
movsx ecx, byte [eax + ecx + 0x5e3200]
mov eax, dword [ebp - 0x130]
imul edx, ecx
sub eax, edx
shl eax, 3
cmp eax, dword [ebp - 0x138]
cmovl edi, dword [ebp + 0x10]
add ebx, 4
cmp ebx, 0xc
mov dword [ebp + 0x10], edi
jne 0x489828
mov dword [esp], esi
call sym.operator_delete_void_
lea eax, [ebp - 0xe0]
mov ecx, eax
mov dword [ebp - 0x12c], eax
call method.qrcodegen::BitBuffer.BitBuffer__
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax]
mov eax, dword [eax + 4]
cmp ebx, eax
mov dword [ebp - 0x134], eax
je 0x4899a0
lea eax, [ebp - 0xf8]
mov dword [ebp - 0x130], eax
lea esi, [esi]
mov edi, dword [ebp - 0x130]
mov dword [esp], ebx
mov ecx, edi
call method.qrcodegen::QrSegment.getMode___const
sub esp, 4
mov ecx, edi
call method.qrcodegen::QrSegment::Mode.getModeBits___const
mov esi, dword [ebp - 0x12c]
mov dword [esp + 4], 4
mov dword [esp], eax
mov ecx, esi
call method.qrcodegen::BitBuffer.appendBits_unsigned_int__int_
sub esp, 8
mov ecx, edi
mov dword [esp], ebx
call method.qrcodegen::QrSegment.getMode___const
mov eax, dword [ebp + 0x14]
sub esp, 4
mov ecx, edi
mov dword [esp], eax
call method.qrcodegen::QrSegment::Mode.numCharCountBits_int__const
sub esp, 4
mov ecx, ebx
mov edi, eax
call method.qrcodegen::QrSegment.getNumChars___const
mov dword [esp + 4], edi
mov dword [esp], eax
mov ecx, esi
mov dword [ebp - 0x12c], esi
call method.qrcodegen::BitBuffer.appendBits_unsigned_int__int_
sub esp, 8
mov ecx, ebx
call method.qrcodegen::QrSegment.getData___const
mov ecx, ebx
mov edi, dword [eax + 0xc]
mov esi, dword [eax + 8]
call method.qrcodegen::QrSegment.getData___const
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x12c]
mov byte [esp + 0x18], 0
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xd8]
mov dword [esp + 0xc], edx
mov dword [esp], eax
mov eax, dword [ebp - 0xd4]
mov dword [esp + 4], eax
call method.void_std::vector_bool__std::allocator_bool___::_M_insert_range_std._Bit_const_iterator__std::_Bit_iterator__std::_Bit_const_iterator__std::_Bit_const_iterator__std::forward_iterator_tag_
sub esp, 0x1c
add ebx, 0x28
cmp dword [ebp - 0x134], ebx
jne 0x4898d0
mov edx, dword [ebp - 0xd8]
mov eax, dword [ebp - 0xd4]
sub edx, dword [ebp - 0xe0]
sub eax, dword [ebp - 0xdc]
lea eax, [eax + edx*8]
cmp dword [ebp - 0x138], eax
jne 0x48a216
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call method.qrcodegen::QrCode.getNumRawDataModules_int_
lea edi, [eax + 7]
test eax, eax
mov ebx, dword [ebp + 0x10]
cmovns edi, eax
mov eax, dword [ebp + 0x10]
sar edi, 3
lea eax, [eax + eax*4]
lea edx, [ebx + eax*8]
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x14]
movsx eax, byte [eax + edx + 0x5e32c0]
movsx edx, byte [ebx + edx + 0x5e3200]
imul eax, edx
mov edx, dword [ebp - 0xd8]
sub edx, dword [ebp - 0xe0]
sub edi, eax
mov eax, dword [ebp - 0xd4]
sub eax, dword [ebp - 0xdc]
shl edi, 3
lea eax, [eax + edx*8]
cmp edi, eax
jb 0x48a182
mov ebx, edi
mov edx, 4
mov dword [esp], 0
sub ebx, eax
mov eax, ebx
cmp ebx, 4
mov ebx, dword [ebp - 0x12c]
cmovae eax, edx
mov dword [esp + 4], eax
mov ecx, ebx
call method.qrcodegen::BitBuffer.appendBits_unsigned_int__int_
mov edx, dword [ebp - 0xd8]
mov eax, dword [ebp - 0xd4]
sub esp, 8
sub edx, dword [ebp - 0xe0]
sub eax, dword [ebp - 0xdc]
mov ecx, ebx
mov dword [esp], 0
lea eax, [eax + edx*8]
neg eax
and eax, 7
mov dword [esp + 4], eax
call method.qrcodegen::BitBuffer.appendBits_unsigned_int__int_
mov edx, dword [ebp - 0xd8]
mov eax, dword [ebp - 0xd4]
sub esp, 8
mov ebx, edx
mov ecx, eax
sub ebx, dword [ebp - 0xe0]
sub ecx, dword [ebp - 0xdc]
lea ecx, [ecx + ebx*8]
test cl, 7
jne 0x48a14d
cmp edi, ecx
jbe 0x489b04
mov ebx, 0xffffffec
lea esi, [esi]
mov ecx, dword [ebp - 0x12c]
movzx eax, bl
mov dword [esp + 4], 8
mov dword [esp], eax
call method.qrcodegen::BitBuffer.appendBits_unsigned_int__int_
mov edx, dword [ebp - 0xd8]
sub esp, 8
xor ebx, 0xfffffffd
mov eax, edx
sub eax, dword [ebp - 0xe0]
mov esi, eax
mov eax, dword [ebp - 0xd4]
mov ecx, eax
sub ecx, dword [ebp - 0xdc]
lea ecx, [ecx + esi*8]
cmp edi, ecx
ja 0x489ac0
mov ebx, ecx
xor edi, edi
mov dword [ebp - 0xf8], 0
shr ebx, 3
mov dword [ebp - 0xf4], 0
mov dword [ebp - 0xf0], 0
test ebx, ebx
jne 0x489fb5
sub eax, dword [ebp - 0xdc]
mov ebx, dword [ebp - 0xe0]
mov dword [ebp - 0xf4], edi
sub edx, ebx
lea eax, [eax + edx*8]
test eax, eax
je 0x489ba1
xor eax, eax
nop
mov edi, eax
mov ecx, eax
mov edx, eax
shr edi, 5
mov esi, 1
shr edx, 3
shl esi, cl
add edx, dword [ebp - 0xf8]
test dword [ebx + edi*4], esi
mov ecx, eax
not ecx
setne bl
and ecx, 7
add eax, 1
movzx ebx, bl
shl ebx, cl
or byte [edx], bl
mov ebx, dword [ebp - 0xe0]
mov ecx, dword [ebp - 0xd8]
mov edx, dword [ebp - 0xd4]
sub edx, dword [ebp - 0xdc]
sub ecx, ebx
lea edx, [edx + ecx*8]
cmp eax, edx
jb 0x489b50
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 8]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0xf8]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call method.qrcodegen::QrCode.QrCode_int__qrcodegen::QrCode::Ecc__std::vector_unsigned_char__std::allocator_unsigned_char____const__int_
mov eax, dword [ebp - 0xf8]
sub esp, 0x10
test eax, eax
je 0x489bdc
mov dword [esp], eax
call sym.operator_delete_void_
mov eax, dword [ebp - 0xe0]
test eax, eax
je 0x489bee
mov dword [esp], eax
call sym.operator_delete_void_
mov eax, dword [ebp + 8]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebp - 0xe0]
lea ecx, [ebp - 0xa0]
mov ebx, esi
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x12c], edi
call sym.std::ios_base::ios_base__
mov esi, dword [sym.imp.libstdc_6.dll_vtable_for___cxxabiv1::__class_type_info]
mov byte [ebp - 0x2c], 0
mov edx, dword [sym.imp.libstdc_6.dll_vtable_for___cxxabiv1::__si_class_type_info]
mov dword [ebp - 0xa0], sym.imp.libstdc_6.dll_operator_delete_void_
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x2b], 0
add edi, dword [esi - 0xc]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0xe0], esi
mov ecx, edi
mov dword [edi], edx
mov dword [esp], 0
call sym.std::basic_ios_char__std::char_traits_char___::init_std::basic_streambuf_char__std::char_traits_char____
lea ecx, [ebp - 0xc0]
sub esp, 4
lea edi, [ebp - 0xdc]
mov dword [ebp - 0xe0], sym.imp.libstdc_6.dll_operator_delete___void_
mov dword [ebp - 0xa0], sym.imp.libstdc_6.dll___cxa_begin_catch
mov dword [ebp - 0xdc], sym.imp.libstdc_6.dll_operator_delete___void_
mov dword [ebp - 0xd8], 0
mov dword [ebp - 0xd4], 0
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0xcc], 0
mov dword [ebp - 0xc8], 0
mov dword [ebp - 0xc4], 0
call sym.std::locale::locale__
lea eax, [ebp - 0xb0]
lea ecx, [ebp - 0xa0]
mov dword [esp], edi
mov dword [ebp - 0xdc], sym.imp.libstdc_6.dll_vtable_for_std::basic_streambuf_char__std::char_traits_char___
mov dword [ebp - 0xbc], 0x10
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xb4], 0
mov byte [ebp - 0xb0], 0
call sym.std::basic_ios_char__std::char_traits_char___::init_std::basic_streambuf_char__std::char_traits_char____
sub esp, 4
cmp dword [ebp - 0x138], 0xffffffff
je 0x489ff1
mov esi, dword [ebp - 0x12c]
mov dword [esp + 8], 0xe
mov dword [esp + 4], str.Data_length_
mov dword [esp], esi
call sym.std::basic_ostream_char__std::char_traits_char____std::__ostream_insert_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const__int_
mov eax, dword [ebp - 0x138]
mov ecx, esi
mov dword [esp], eax
call sym.std::ostream::operator___int_
sub esp, 4
mov dword [esp + 8], 7
mov dword [esp + 4], str._bits_
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::__ostream_insert_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const__int_
mov dword [esp + 8], 0xf
mov dword [esp + 4], str.Max_capacity_
mov dword [esp], esi
call sym.std::basic_ostream_char__std::char_traits_char____std::__ostream_insert_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const__int_
mov dword [esp], ebx
mov ecx, esi
call sym.std::ostream::operator___int_
sub esp, 4
mov dword [esp + 8], 5
mov dword [esp + 4], str._bits
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::__ostream_insert_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const__int_
mov dword [esp], 8
lea esi, [ebp - 0x120]
call sym.___cxa_allocate_exception
mov ebx, eax
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 0x128], esi
mov dword [ebp - 0x124], 0
mov byte [ebp - 0x120], 0
test eax, eax
je 0x48a014
mov edx, dword [ebp - 0xd0]
mov ecx, dword [ebp - 0xcc]
cmp eax, edx
ja 0x489f00
lea edi, [ebp - 0x108]
mov dword [esp], ecx
lea ecx, [ebp - 0x110]
mov dword [esp + 4], edx
mov dword [ebp - 0x110], edi
call method.void_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_construct_char__char__char__std::forward_iterator_tag___clone_.isra.226_
mov edx, dword [ebp - 0x110]
sub esp, 8
mov eax, dword [ebp - 0x128]
cmp edx, edi
je 0x48a0bd
mov ecx, dword [ebp - 0x10c]
cmp eax, esi
mov dword [ebp - 0x134], ecx
mov ecx, dword [ebp - 0x108]
mov dword [ebp - 0x130], ecx
je 0x48a045
mov dword [ebp - 0x128], edx
mov edx, dword [ebp - 0x134]
test eax, eax
mov ecx, dword [ebp - 0x120]
mov dword [ebp - 0x124], edx
mov edx, dword [ebp - 0x130]
mov dword [ebp - 0x120], edx
je 0x48a05d
mov dword [ebp - 0x110], eax
mov dword [ebp - 0x108], ecx
mov dword [ebp - 0x10c], 0
mov byte [eax], 0
mov eax, dword [ebp - 0x110]
cmp eax, edi
je 0x489eb5
mov dword [esp], eax
call sym.operator_delete_void_
lea eax, [ebp - 0x128]
mov ecx, ebx
mov dword [esp], eax
call sym.std::length_error::length_error_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
mov eax, dword [ebp - 0x128]
sub esp, 4
mov dword [ebx], vtable._Q.7.0
cmp eax, esi
je 0x489ee0
mov dword [esp], eax
call sym.operator_delete_void_
mov dword [esp + 8], method.qrcodegen::data_too_long.data_too_long__
mov dword [esp + 4], 0x8b6f1c
mov dword [esp], ebx
call sym.___cxa_throw
nop
lea esi, [esi]
lea edx, [ebp - 0xf8]
lea edi, [ebp - 0xf0]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov ecx, edx
mov dword [ebp - 0x130], edx
mov dword [ebp - 0xf8], edi
call method.void_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_construct_char__char__char__std::forward_iterator_tag___clone_.isra.226_
mov edx, dword [ebp - 0xf8]
sub esp, 8
mov eax, dword [ebp - 0x128]
cmp edx, edi
je 0x48a09b
mov ecx, dword [ebp - 0xf0]
cmp eax, esi
mov dword [ebp - 0x134], ecx
mov ecx, dword [ebp - 0xf4]
mov dword [ebp - 0x130], ecx
je 0x48a070
mov dword [ebp - 0x128], edx
mov edx, dword [ebp - 0x130]
test eax, eax
mov ecx, dword [ebp - 0x120]
mov dword [ebp - 0x124], edx
mov edx, dword [ebp - 0x134]
mov dword [ebp - 0x120], edx
je 0x48a088
mov dword [ebp - 0xf8], eax
mov dword [ebp - 0xf0], ecx
mov dword [ebp - 0xf4], 0
mov byte [eax], 0
mov eax, dword [ebp - 0xf8]
cmp eax, edi
jne 0x489ead
jmp 0x489eb5
mov dword [esp], ebx
call sym.operator_new_unsigned_int_
lea edi, [eax + ebx]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [ebp - 0xf8], eax
mov dword [ebp - 0xf0], edi
call sym._memset
mov edx, dword [ebp - 0xd8]
mov eax, dword [ebp - 0xd4]
jmp 0x489b31
mov eax, dword [ebp - 0x12c]
mov dword [esp + 8], 0x10
mov dword [esp + 4], str.Segment_too_long
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::__ostream_insert_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const__int_
jmp 0x489dbc
lea eax, [ebp - 0xb8]
lea ecx, [ebp - 0x128]
mov dword [esp], eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::_M_assign_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
sub esp, 4
jmp 0x489eb5
mov ecx, dword [ebp - 0x12c]
call sym.std::__cxx11::basic_ostringstream_char__std::char_traits_char___std::allocator_char___::basic_ostringstream__
mov dword [esp], esi
call sym.__Unwind_Resume
mov eax, dword [ebp - 0x134]
mov dword [ebp - 0x128], edx
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x110], edi
lea edi, [ebp - 0x108]
mov eax, edi
jmp 0x489e96
mov eax, dword [ebp - 0x134]
mov dword [ebp - 0x128], edx
mov dword [ebp - 0x124], ecx
mov dword [ebp - 0x120], eax
mov dword [ebp - 0xf8], edi
lea edi, [ebp - 0xf0]
mov eax, edi
jmp 0x489f95
mov eax, dword [ebp - 0x130]
lea ecx, [ebp - 0x128]
mov dword [esp], eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::_M_assign_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
mov eax, dword [ebp - 0xf8]
sub esp, 4
jmp 0x489f95
lea eax, [ebp - 0x110]
lea ecx, [ebp - 0x128]
mov dword [esp], eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::_M_assign_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
mov eax, dword [ebp - 0x110]
sub esp, 4
jmp 0x489e96
mov dword [esp], 8
call sym.___cxa_allocate_exception
mov dword [esp], 0x5e319f
mov ecx, eax
mov ebx, eax
call sym.std::invalid_argument::invalid_argument_char_const_
sub esp, 4
mov dword [esp + 8], sym.std::invalid_argument::invalid_argument__
mov dword [esp + 4], 0x8b6f64
mov dword [esp], ebx
call sym.___cxa_throw
mov edi, eax
mov eax, dword [ebp - 0x128]
cmp eax, esi
je 0x48a12a
mov dword [esp], eax
call sym.operator_delete_void_
mov dword [esp], ebx
mov esi, edi
call sym.___cxa_free_exception
jmp 0x48a032
mov dword [esp], 8
call sym.___cxa_allocate_exception
mov dword [esp], str.Assertion_error
mov ecx, eax
mov esi, eax
call sym.std::logic_error::logic_error_char_const_
push eax
mov dword [esp + 8], sym.std::logic_error::logic_error__
mov dword [esp + 4], 0x8b6f28
mov dword [esp], esi
call sym.___cxa_throw
mov dword [esp], 8
call sym.___cxa_allocate_exception
mov dword [esp], str.Assertion_error
mov ecx, eax
mov esi, eax
call sym.std::logic_error::logic_error_char_const_
push edx
mov dword [esp + 8], sym.std::logic_error::logic_error__
mov dword [esp + 4], 0x8b6f28
mov dword [esp], esi
call sym.___cxa_throw
mov dword [esp], esi
mov ebx, eax
call sym.___cxa_free_exception
mov ecx, dword [ebp - 0x12c]
call method.std::_Bvector_base_std::allocator_bool___._M_deallocate__
mov dword [esp], ebx
call sym.__Unwind_Resume
jmp 0x48a1b7
mov dword [esp], 8
call sym.___cxa_allocate_exception
mov dword [esp], str.Assertion_error
mov ecx, eax
mov esi, eax
call sym.std::logic_error::logic_error_char_const_
push ecx
mov dword [esp + 8], sym.std::logic_error::logic_error__
mov dword [esp + 4], 0x8b6f28
mov dword [esp], esi
call sym.___cxa_throw
mov ebx, eax
mov eax, dword [ebp - 0xf8]
test eax, eax
je 0x48a1c1
mov dword [esp], eax
call sym.operator_delete_void_
jmp 0x48a1c1