Function at 0x6e601c20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov eax, str.bbwbbbbb
mov dword [esp + 4], eax
mov edx, dword [ebp + 0xc]
mov dword [esp], edx
call fcn.6e601b50
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
movzx ecx, word [ecx + 2]
mov dword [ebp - 0x1c], ecx
movzx eax, byte [edx + 4]
cmp al, 0x20
ja 0x6e602453
movzx eax, al
shl eax, 3
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov ecx, dword [ebp + 8]
test eax, eax
mov edx, eax
mov dword [ecx + 9], eax
je 0x6e602509
mov ecx, dword [ebp + 8]
xor ebx, ebx
movzx eax, byte [ecx + 4]
mov dword [esp], edx
mov dword [esp + 4], ebx
shl eax, 3
mov dword [esp + 8], eax
call sub.msvcrt.dll_memset
mov edx, dword [ebp + 8]
movzx eax, byte [edx]
mov dword [ebp - 0x18], 0
mov dword [edx + 0x11], 0
sub dword [ebp - 0x1c], eax
add dword [ebp + 0xc], eax
mov dword [edx + 0xd], 0
cmp byte [edx + 4], 0
je 0x6e6022b5
xor esi, esi
cmp dword [ebp - 0x1c], 1
mov edi, dword [ebp + 0xc]
jg 0x6e601ee0
mov ebx, dword [ebp + 0xc]
sub ebx, edi
je 0x6e601ce6
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x11]
test eax, eax
je 0x6e601f86
mov dword [ebp - 0x2c], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp + 0xc]
mov eax, dword [ecx + 9]
mov ecx, dword [ebp - 0x1c]
lea eax, [eax + edx*8]
cmp ecx, 8
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], ecx
mov dword [eax + 4], 0
jle 0x6e60229a
lea esi, [esi]
lea edi, [edi]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 4]
lea edx, [eax + eax*4]
lea edx, [eax + edx*4 + 0x15]
mov dword [esp + 4], edx
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
mov ecx, eax
mov eax, dword [ebp - 0x20]
test ecx, ecx
mov dword [eax], ecx
je 0x6e60248f
mov edx, dword [ebp - 0x20]
xor edi, edi
mov eax, dword [edx + 4]
lea edx, [eax + eax*4]
lea edx, [eax + edx*4]
add ecx, edx
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x20]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, str.bbbbbbbbb
mov dword [esp + 4], eax
call fcn.6e601b50
mov edx, dword [ebp - 0x30]
movzx eax, byte [edx]
sub dword [ebp - 0x24], eax
add esi, eax
add dword [ebp - 0x2c], eax
cmp dword [ebp - 0x24], 1
mov dword [ebp - 0x34], esi
jle 0x6e601e10
lea esi, [esi]
lea edi, [edi]
mov dword [esp], esi
lea ecx, [ebp - 0x10]
mov eax, 0x6e609073
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call fcn.6e601b50
movzx ebx, byte [ebp - 0x10]
cmp bl, 1
jbe 0x6e602315
movzx ecx, byte [ebp - 0xf]
mov al, cl
sub al, 4
cmp al, 1
setbe dl
cmp cl, 2
sete al
or eax, edx
test al, 1
jne 0x6e601df4
dec cl
je 0x6e601df4
movzx eax, bl
inc edi
add esi, eax
sub dword [ebp - 0x24], eax
add dword [ebp - 0x2c], eax
cmp dword [ebp - 0x24], 1
jg 0x6e601da0
test edi, edi
je 0x6e601e10
cmp dword [0x6e60b024], 1
jg 0x6e602361
lea esi, [esi]
lea edi, [edi]
mov ebx, esi
sub ebx, dword [ebp - 0x34]
jne 0x6e601fb7
mov eax, dword [ebp - 0x30]
mov dword [eax + 0xd], 0
mov dword [eax + 0x11], 0
mov dword [esp], esi
lea eax, [ebp - 0x10]
mov ebx, 0x6e609073
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
call fcn.6e601b50
cmp dword [ebp - 0x24], 1
jle 0x6e601e54
movzx eax, byte [ebp - 0xf]
dec al
cmp al, 1
jbe 0x6e601e8b
mov edx, dword [ebp - 0x30]
movzx eax, byte [edx + 4]
cmp al, 0x20
ja 0x6e6024cc
test al, al
jne 0x6e601feb
mov ecx, dword [ebp - 0x30]
mov dword [ecx + 9], 0
cmp dword [ebp - 0x24], 8
jle 0x6e601e8b
cmp byte [esi + 1], 4
jne 0x6e601e8b
cmp byte [esi + 3], 0
jne 0x6e601d20
mov eax, dword [ebp - 0x2c]
test eax, eax
jns 0x6e60229c
jmp 0x6e6022b8
movzx eax, cl
inc esi
mov dword [esp + 8], eax
mov eax, str.skipping_descriptor_0x_X_n
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
movzx ebx, byte [ebp - 0xe]
movzx eax, bl
sub dword [ebp - 0x1c], eax
add dword [ebp + 0xc], eax
cmp dword [ebp - 0x1c], 1
jle 0x6e601f4f
lea esi, [esi]
lea edi, [edi]
lea ecx, [ebp - 0xe]
mov dword [esp + 8], ecx
mov ecx, 0x6e609073
mov dword [esp + 4], ecx
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.6e601b50
movzx ebx, byte [ebp - 0xe]
movzx eax, bl
cmp eax, dword [ebp - 0x1c]
jg 0x6e6023c6
cmp bl, 1
jbe 0x6e6023c6
movzx ecx, byte [ebp - 0xd]
mov al, cl
sub al, 4
cmp al, 1
setbe dl
cmp cl, 2
sete al
or eax, edx
test al, 1
jne 0x6e601f4f
cmp cl, 1
je 0x6e601f4f
cmp dword [0x6e60b024], 1
jg 0x6e601ea0
movzx eax, bl
inc esi
sub dword [ebp - 0x1c], eax
add dword [ebp + 0xc], eax
cmp dword [ebp - 0x1c], 1
jg 0x6e601ee0
test esi, esi
je 0x6e601cd1
cmp dword [0x6e60b024], 1
jle 0x6e601cd1
mov dword [esp + 8], esi
mov eax, str.skipped__d_class_vendor_specific_endpoint_descriptors_n
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x6e601cd1
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
mov ecx, dword [ebp + 8]
test eax, eax
mov dword [ecx + 0xd], eax
je 0x6e6025c8
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp + 8]
mov dword [edx + 0x11], ebx
jmp 0x6e601ce6
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
mov edx, dword [ebp - 0x30]
test eax, eax
mov dword [edx + 0xd], eax
je 0x6e602581
mov dword [esp + 8], ebx
mov edx, dword [ebp - 0x34]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp - 0x30]
mov dword [ecx + 0x11], ebx
jmp 0x6e601e2c
movzx edx, al
mov eax, edx
shl eax, 4
add eax, edx
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov ecx, eax
mov eax, dword [ebp - 0x30]
test ecx, ecx
mov dword [eax + 9], ecx
je 0x6e602545
mov eax, dword [ebp - 0x30]
movzx edx, byte [eax + 4]
mov dword [esp], ecx
mov eax, edx
shl eax, 4
add eax, edx
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x28], 0
mov edx, dword [ebp - 0x30]
cmp byte [edx + 4], 0
je 0x6e601e75
mov dword [ebp - 0x4c], 0
lea ecx, [ebp - 0x10]
mov eax, 0x6e609073
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.6e601b50
movzx eax, byte [ebp - 0x10]
cmp eax, dword [ebp - 0x24]
jg 0x6e602105
lea esi, [esi]
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x4c]
mov ecx, dword [eax + 9]
mov eax, 0x6e609073
add edx, ecx
lea ecx, [ebp - 0x12]
mov dword [ebp - 0x38], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.6e601b50
movzx ebx, byte [ebp - 0x12]
movzx eax, bl
cmp eax, dword [ebp - 0x24]
jg 0x6e6023de
movzx eax, byte [ebp - 0x11]
cmp al, 5
je 0x6e602174
cmp dword [0x6e60b024], 1
jg 0x6e602146
xor eax, eax
add dword [ebp - 0x2c], eax
add esi, eax
mov edx, dword [ebp - 0x30]
sub dword [ebp - 0x24], eax
inc dword [ebp - 0x28]
add dword [ebp - 0x4c], 0x11
movzx eax, byte [edx + 4]
cmp eax, dword [ebp - 0x28]
jle 0x6e601e75
mov dword [esp], esi
lea ecx, [ebp - 0x10]
mov eax, 0x6e609073
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call fcn.6e601b50
movzx eax, byte [ebp - 0x10]
cmp eax, dword [ebp - 0x24]
jle 0x6e602070
mov edi, dword [0x6e60b024]
test edi, edi
jle 0x6e602139
mov dword [esp], str.ran_out_of_descriptors_parsing_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov esi, 0x1f
mov dword [esp + 8], esi
mov ebx, 1
mov dword [esp + 4], ebx
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, 0xffffffff
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, al
mov edi, 5
mov ebx, str.unexpected_descriptor_0x_X__expecting_endpoint_descriptor__type_0x_X_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0xc], edi
mov dword [esp + 4], ebx
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x6e6020bf
cmp bl, 8
ja 0x6e6022c0
cmp bl, 6
ja 0x6e60234c
mov dword [ebp - 0x48], 0
mov edi, dword [ebp - 0x24]
movzx eax, bl
mov dword [ebp - 0x44], eax
lea ecx, [esi + eax]
mov dword [ebp - 0x3c], ecx
sub edi, eax
cmp edi, 1
mov dword [ebp - 0x40], ecx
jg 0x6e6021d3
mov ebx, dword [ebp - 0x3c]
sub ebx, dword [ebp - 0x40]
jne 0x6e6022e1
mov eax, dword [ebp - 0x38]
mov dword [eax + 9], 0
mov dword [eax + 0xd], 0
mov eax, dword [ebp - 0x44]
test eax, eax
jns 0x6e6020c1
jmp 0x6e601e8e
lea eax, [ebp - 0x12]
mov dword [esp + 8], eax
mov eax, 0x6e609073
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x3c]
mov dword [esp], edx
call fcn.6e601b50
movzx ebx, byte [ebp - 0x12]
cmp bl, 1
jbe 0x6e602423
movzx ecx, byte [ebp - 0x11]
mov al, cl
sub al, 4
cmp al, 1
setbe dl
cmp cl, 2
sete al
or eax, edx
test al, 1
jne 0x6e60225d
cmp cl, 1
je 0x6e60225d
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e602246
movzx eax, cl
mov dword [esp + 8], eax
mov eax, str.skipping_descriptor_0x_X_n
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
movzx ebx, byte [ebp - 0x12]
inc dword [ebp - 0x48]
movzx eax, bl
sub edi, eax
add dword [ebp - 0x3c], eax
add dword [ebp - 0x44], eax
cmp edi, 1
jg 0x6e6021d3
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x6e6021a6
cmp dword [0x6e60b024], 1
jle 0x6e6021a6
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edi, str.skipped__d_class_vendor_specific_endpoint_descriptors_n
mov ecx, dword [ebp - 0x48]
mov dword [esp + 4], edi
add eax, 0x40
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x6e6021a6
xor eax, eax
sub dword [ebp - 0x1c], eax
mov edx, dword [ebp + 8]
inc dword [ebp - 0x18]
add dword [ebp + 0xc], eax
movzx eax, byte [edx + 4]
cmp eax, dword [ebp - 0x18]
jg 0x6e601cc2
mov eax, dword [ebp - 0x1c]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x38]
mov ecx, str.bbbbwbbb
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.6e601b50
movzx ebx, byte [ebp - 0x12]
jmp 0x6e602186
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
mov edx, dword [ebp - 0x38]
test eax, eax
mov dword [edx + 9], eax
je 0x6e602383
mov dword [esp + 8], ebx
mov edx, dword [ebp - 0x40]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp - 0x38]
mov dword [ecx + 0xd], ebx
jmp 0x6e6021c3
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e602139
movzx eax, bl
mov dword [esp + 8], eax
mov eax, str.invalid_descriptor_length_of__d_n
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, 0xffffffff
jmp 0x6e60213e
mov edx, dword [ebp - 0x38]
mov dword [esp + 8], edx
mov edx, str.bbbbwb
mov dword [esp + 4], edx
jmp 0x6e6022d0
mov dword [esp + 8], edi
mov eax, str.skipped__d_class_vendor_specific_interface_descriptors_n
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x6e601e10
mov ebx, dword [0x6e60b024]
test ebx, ebx
jle 0x6e6023b7
mov dword [esp], str.couldnt_allocate_memory_for_endpoint_extra_descriptors_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ecx, 0x38
mov dword [esp + 8], ecx
mov edx, 1
mov dword [esp + 4], edx
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov ecx, dword [ebp - 0x38]
mov dword [ecx + 0xd], 0
jmp 0x6e6021c3
mov edx, dword [0x6e60b024]
test edx, edx
jg 0x6e602325
mov eax, 0xffffffff
jmp 0x6e60213e
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e602411
mov dword [esp], str.ran_out_of_descriptors_parsing_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 0x1f
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
mov eax, 0xffffffff
test eax, eax
jns 0x6e60229c
jmp 0x6e6022b8
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e602411
movzx eax, bl
mov dword [esp + 8], eax
mov eax, str.invalid_descriptor_length_of__d_n
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, 0xffffffff
jmp 0x6e602416
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e602139
mov dword [esp], str.too_many_interfaces_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 0x14
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
jmp 0x6e602139
mov ebx, dword [0x6e60b024]
test ebx, ebx
jle 0x6e602139
mov dword [esp], str.couldnt_malloc_interface__altsetting_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ecx, 0x26
mov dword [esp + 8], ecx
mov edx, 1
mov dword [esp + 4], edx
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
jmp 0x6e602139
mov ecx, dword [0x6e60b024]
test ecx, ecx
jle 0x6e602139
mov dword [esp], str.too_many_endpoints_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, 0x13
mov dword [esp + 8], edx
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
jmp 0x6e602139
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e602139
mov dword [esp], str.out_of_memory_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edi, 0xe
mov dword [esp + 8], edi
mov esi, 1
mov dword [esp + 4], esi
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
jmp 0x6e602139
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e602139
mov dword [esp], str.couldnt_allocate_memory_for_ifp__endpoint_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 0x2b
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
jmp 0x6e602139
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e6025b4
mov dword [esp], str.couldnt_allocate_memory_for_interface_extra_descriptors_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edi, 0x39
mov dword [esp + 8], edi
mov esi, 1
mov dword [esp + 4], esi
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov ecx, dword [ebp - 0x30]
mov eax, 0xffffffff
mov dword [ecx + 0x11], 0
jmp 0x6e60213e
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e6025fb
mov dword [esp], str.couldnt_allocate_memory_for_config_extra_descriptors_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edi, 0x36
mov dword [esp + 8], edi
mov esi, 1
mov dword [esp + 4], esi
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp + 8]
mov dword [eax + 0x11], 0
mov eax, 0xffffffff
jmp 0x6e60213e