Function at 0x6e6027c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp + 8]
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
mov esi, dword [eax + 8]
movzx eax, byte [esi + 0x21d]
cmp al, 8
jbe 0x6e602810
mov ebx, dword [0x6e60b024]
test ebx, ebx
jle 0x6e60284a
mov ecx, 8
mov edx, str.Too_many_configurations___d____d__n
mov dword [esp + 0xc], ecx
movzx eax, byte [esi + 0x21d]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
jmp 0x6e60283a
test al, al
jne 0x6e602857
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e60284a
mov eax, 1
mov dword [esp + 0xc], eax
movzx eax, byte [esi + 0x21d]
mov dword [esp + 8], eax
mov eax, str.Not_enough_configurations___d____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 ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
movzx eax, al
lea edx, [eax + eax*4]
lea edx, [eax + edx*4]
mov dword [esp], edx
call sub.msvcrt.dll_malloc
mov dword [esi + 0x21e], eax
test eax, eax
mov ecx, eax
je 0x6e6029ed
movzx eax, byte [esi + 0x21d]
xor edi, edi
mov dword [esp + 4], edi
mov dword [esp], ecx
lea edx, [eax + eax*4]
lea edx, [eax + edx*4]
mov dword [esp + 8], edx
call sub.msvcrt.dll_memset
mov dword [ebp - 0x44], 0
cmp byte [esi + 0x21d], 0
je 0x6e60284a
mov dword [ebp - 0x48], 0
nop
movzx edi, byte [ebp - 0x44]
lea eax, [ebp - 0x40]
mov ecx, 2
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov ebx, 8
mov dword [esp + 0x10], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym.libusb0.dll_usb_get_descriptor
cmp eax, 7
jle 0x6e602a29
lea eax, [ebp - 0x38]
mov dword [esp + 8], eax
mov eax, 0x6e60931d
mov dword [esp + 4], eax
lea eax, [ebp - 0x40]
mov dword [esp], eax
call fcn.6e601b50
movzx eax, word [ebp - 0x36]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov ebx, eax
je 0x6e602a7c
movzx eax, word [ebp - 0x36]
mov dword [esp + 8], edi
mov edi, 2
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], edi
mov dword [esp], eax
call sym.libusb0.dll_usb_get_descriptor
movzx edx, word [ebp - 0x36]
cmp edx, eax
jg 0x6e602ab1
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x48]
mov edx, dword [esi + 0x21e]
add eax, edx
mov dword [esp], eax
call fcn.6e601c20
cmp dword [0x6e60b024], 1
jle 0x6e6029a0
test eax, eax
jle 0x6e6029c4
mov dword [esp], str.Descriptor_data_still_left_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 0x1b
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
lea esi, [esi]
lea edi, [edi]
mov dword [esp], ebx
call sub.msvcrt.dll_free
inc dword [ebp - 0x44]
add dword [ebp - 0x48], 0x15
movzx eax, byte [esi + 0x21d]
cmp eax, dword [ebp - 0x44]
jg 0x6e6028b0
jmp 0x6e60284a
jge 0x6e6029a0
mov dword [esp], str.Unable_to_parse_descriptors_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edi, 1
mov dword [esp + 4], edi
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 0x1c
mov dword [esp + 8], eax
jmp 0x6e60298f
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e60284a
mov dword [esp], str.Unable_to_allocate_memory_for_config_descriptor_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 0x30
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
jmp 0x6e60284a
mov edx, dword [0x6e60b024]
test edx, edx
jle 0x6e602a61
test eax, eax
js 0x6e602aed
mov dword [esp + 0xc], eax
mov eax, 8
mov dword [esp + 8], eax
mov eax, str.Config_descriptor_too_short__expected__d__got__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, dword [esi + 0x21e]
mov dword [esp], eax
call sub.msvcrt.dll_free
xor ecx, ecx
mov dword [esi + 0x21e], ecx
jmp 0x6e60284a
mov eax, dword [0x6e60b024]
test eax, eax
jle 0x6e602a61
mov dword [esp], str.Unable_to_allocate_memory_for_descriptors_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 0x2a
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
jmp 0x6e602a61
mov ecx, dword [0x6e60b024]
test ecx, ecx
jle 0x6e602ae0
test eax, eax
js 0x6e602b0f
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ecx, str.Config_descriptor_too_short__expected__d__got__d__n
mov dword [esp + 8], edx
add eax, 0x40
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], ebx
call sub.msvcrt.dll_free
jmp 0x6e602a61
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ebx, str.Unable_to_get_descriptor___d__n
mov dword [esp + 4], ebx
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x6e602a61
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edi, str.Unable_to_get_descriptor___d__n
mov dword [esp + 4], edi
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x6e602ae0