Function at 0x1002b5c0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x5c
mov eax, dword [0x1008ce00]
xor eax, esp
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x88]
push ebx
mov ebx, dword [esp + 0x88]
push ebp
push esi
mov esi, dword [esp + 0x80]
push edi
mov edi, dword [esp + 0x70]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], eax
call fcn.1004ce2f
push 0x58
push 0
push ebx
mov dword [eax], 0
call fcn.10046f20
add esp, 0xc
lea ebp, [edi + 4]
push ebp
call fcn.10005a60
test eax, eax
je 0x1002b64d
push eax
push str.Failed_to_initialize_libusb_context._Error:__d.
push edi
push 2
call fcn.1002aac0
add esp, 0x10
call fcn.1004ce2f
pop edi
pop esi
pop ebp
mov dword [eax], 0xfffffffe
xor al, al
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.10045740
add esp, 0x5c
ret
push 2
push 0x1002aaf0
push dword [ebp]
call fcn.10005850
mov cl, byte [edi]
mov eax, dword [ebp]
mov byte [edi], cl
test eax, eax
je 0x1002b68f
movzx ecx, cl
cmp ecx, 7
ja case.0x1002b66f.0
jmp dword [ecx*4 + 0x1002bd68]
push 1
jmp 0x1002b684
push 3
jmp 0x1002b684
push 4
jmp 0x1002b684
push 0
push 0
push eax
call fcn.100058c0
add esp, 0xc
cmp byte [esp + 0x7c], 0
je 0x1002b6a4
cmp byte [esp + 0x80], 0
je 0x1002b6a4
mov bl, 1
jmp 0x1002b6a6
xor bl, bl
mov byte [esp + 0x15], bl
test esi, esi
je 0x1002b6e2
mov ecx, 0x10081102
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1002b6d5
test dl, dl
je 0x1002b6d1
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1002b6d5
add eax, 2
add ecx, 2
test dl, dl
jne 0x1002b6b5
xor eax, eax
jmp 0x1002b6da
sbb eax, eax
or eax, 1
test eax, eax
je 0x1002b6e2
mov bh, 1
jmp 0x1002b6e4
xor bh, bh
lea eax, [esp + 0x20]
mov byte [esp + 0x16], bh
push eax
push dword [ebp]
mov dword [esp + 0x18], 0
call fcn.10004e50
mov dword [esp + 0x28], eax
test eax, eax
js 0x1002bcef
xor ebp, ebp
test eax, eax
je 0x1002bce1
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x24]
push dword [eax + ebp*4]
call fcn.100047b0
test eax, eax
jne 0x1002bc1f
mov ax, word [esp + 0x74]
cmp word [esp + 0x50], ax
jne 0x1002bc1f
mov ax, word [esp + 0x78]
cmp word [esp + 0x52], ax
jne 0x1002bc1f
mov eax, dword [esp + 0x20]
xorps xmm0, xmm0
movups xmmword [esp + 0x34], xmm0
mov word [esp + 0x44], 0
push dword [eax + ebp*4]
call fcn.10004fd0
mov cl, byte [esp + 0x7c]
test cl, cl
je 0x1002b790
cmp al, cl
je 0x1002b790
movzx eax, al
push eax
movzx eax, cl
push eax
push str.USB_bus_number_restriction_is_present___hhu___this_device_didnt_match_it___hhu_.
push edi
push 7
call fcn.1002aac0
add esp, 0x14
jmp 0x1002bc1f
mov byte [esp + 0x34], al
mov eax, dword [esp + 0x20]
push dword [eax + ebp*4]
call fcn.10004fe0
mov cl, byte [esp + 0x80]
test cl, cl
je 0x1002b7cc
cmp al, cl
je 0x1002b7cc
movzx eax, al
push eax
movzx eax, cl
push eax
push str.USB_device_address_restriction_is_present___hhu___this_device_didnt_match_it___hhu_.
push edi
push 7
call fcn.1002aac0
add esp, 0x14
jmp 0x1002bc1f
mov byte [esp + 0x35], al
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x24]
push dword [eax + ebp*4]
call fcn.100050b0
test eax, eax
je 0x1002b807
mov dword [esp + 0x10], 0
test bl, bl
jne 0x1002bc2f
push str.Failed_to_open_candidate_USB_device._This_usually_happens_due_to_permissions_or_driver_issues__or_because_the_device_is_already_in_use_by_another_running_program._Trying_next_device.
push edi
push 6
call fcn.1002aac0
jmp 0x1002bc1c
movzx eax, byte [esp + 0x34]
shl ax, 8
movzx ecx, ax
movzx eax, byte [esp + 0x35]
or ecx, eax
lea eax, [esp + 0x36]
push ecx
push str.TMP_05hu
push 9
push eax
call fcn.10004d10
add esp, 0x10
cmp byte [esp + 0x58], 0
je 0x1002b87f
push 9
lea eax, [esp + 0x60]
mov byte [esp + 0x68], 0
push eax
push dword [esp + 0x60]
xorps xmm0, xmm0
push dword [esp + 0x1c]
movq qword [esp + 0x6c], xmm0
call fcn.10004940
mov esi, eax
cmp esi, 8
ja 0x1002b8cf
test esi, esi
jle 0x1002b87b
push esi
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x3e]
push eax
call fcn.10047080
add esp, 0xc
mov byte [esp + esi + 0x36], 0
mov esi, dword [esp + 0x1c]
test bh, bh
je 0x1002b900
test esi, esi
je 0x1002b89b
push 8
lea eax, [esp + 0x3a]
push eax
push esi
call fcn.1004d520
add esp, 0xc
test eax, eax
je 0x1002b900
push dword [esp + 0x10]
call fcn.100051a0
mov dword [esp + 0x10], 0
lea eax, [esp + 0x36]
push eax
push esi
test bl, bl
jne 0x1002bc68
push str.USB_serial_number_restriction_is_present___s___this_device_didnt_match_it___s_.
push edi
push 7
call fcn.1002aac0
add esp, 0x14
jmp 0x1002bc1f
push dword [esp + 0x10]
call fcn.100051a0
mov dword [esp + 0x10], 0
call fcn.1004ce2f
mov dword [eax], 0xfffffffc
test bl, bl
jne 0x1002bc56
push str.Failed_to_get_a_valid_USB_serial_number._Trying_next_device.
push edi
push 3
jmp 0x1002bc13
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x24]
push eax
push esi
call fcn.10005530
test eax, eax
jne 0x1002bbea
cmp dword [esp + 0x24], 1
je 0x1002b92e
push 1
push esi
call fcn.10005640
test eax, eax
jne 0x1002bbea
push 0
push esi
call fcn.100056a0
test eax, eax
jne 0x1002bbea
mov eax, dword [esp + 0x90]
mov byte [esp + 0x17], 1
test eax, eax
js 0x1002b986
mov bl, byte [esp + 0x54]
cmp bl, al
jae 0x1002b97e
movzx eax, al
push eax
movzx eax, bl
push eax
push str.Device_firmware_version_incorrect._You_have_version__hhu__but_at_least_version__hhu_is_required._Please_update_by_following_the_Flashy_documentation_at_https:__inivation.gitlab.io_dv_dv_docs_docs_update_firmware_.
push edi
push 2
call fcn.1002aac0
add esp, 0x14
mov byte [esp + 0x17], 0
call fcn.1004ce2f
mov dword [eax], 0xfffffffb
movzx eax, bl
mov word [esp + 0x42], ax
mov eax, dword [esp + 0x88]
mov bh, 1
test eax, eax
js 0x1002ba1a
push 0
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0
push eax
push 0
push 6
push 0xbf
push 0xc0
push dword [esp + 0x2c]
call fcn.100039b0
cmp eax, 4
jne 0x1002bb1b
movzx esi, byte [esp + 0x18]
movzx eax, byte [esp + 0x19]
shl esi, 8
or esi, eax
movzx eax, byte [esp + 0x1a]
shl esi, 8
or esi, eax
movzx eax, byte [esp + 0x1b]
shl esi, 8
or esi, eax
mov eax, dword [esp + 0x88]
cmp esi, eax
je 0x1002ba15
push eax
push esi
push str.Device_logic_version_incorrect._You_have_version__u__but_version__u_is_required._Please_update_by_following_the_Flashy_documentation_at_https:__inivation.gitlab.io_dv_dv_docs_docs_update_firmware_.
push edi
push 2
call fcn.1002aac0
add esp, 0x14
xor bh, bh
call fcn.1004ce2f
mov dword [eax], 0xfffffffa
mov word [esp + 0x44], si
mov esi, dword [esp + 0x8c]
mov bl, 1
test esi, esi
js 0x1002ba9e
push 0
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0
push eax
push 7
push 6
push 0xbf
push 0xc0
push dword [esp + 0x2c]
call fcn.100039b0
cmp eax, 4
jne 0x1002bb67
movzx ecx, byte [esp + 0x18]
movzx eax, byte [esp + 0x19]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x1a]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x1b]
shl ecx, 8
or ecx, eax
cmp ecx, esi
jae 0x1002ba9e
push esi
push ecx
push str.Device_logic_patch_level_insufficient._You_have_patch_level__u__but_at_least_patch_level__u_is_required._Please_update_by_following_the_Flashy_documentation_at_https:__inivation.gitlab.io_dv_dv_docs_docs_update_firmware_.
push edi
push 2
call fcn.1002aac0
add esp, 0x14
xor bl, bl
call fcn.1004ce2f
mov dword [eax], 0xfffffffa
cmp byte [esp + 0x17], 0
je 0x1002bbb0
test bh, bh
je 0x1002bbb0
test bl, bl
je 0x1002bbb0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [edi + 0x34], eax
test eax, eax
jne 0x1002bcb0
push eax
push dword [esp + 0x14]
call fcn.10005750
push dword [esp + 0x10]
call fcn.100051a0
mov dword [esp + 0x10], 0
call fcn.1004ce2f
mov bl, byte [esp + 0x15]
mov dword [eax], 0xfffffffe
test bl, bl
jne 0x1002bc9e
mov bh, byte [esp + 0x16]
test bh, bh
jne 0x1002bc9e
push str.Failed_to_initialize_USB_transfer_mutex._Trying_next_device.
push edi
push 3
jmp 0x1002bc13
push 0
push dword [esp + 0x14]
call fcn.10005750
push dword [esp + 0x10]
call fcn.100051a0
mov dword [esp + 0x10], 0
call fcn.1004ce2f
mov bl, byte [esp + 0x15]
mov dword [eax], 0xfffffffc
test bl, bl
jne 0x1002bc7a
mov bh, byte [esp + 0x16]
test bh, bh
jne 0x1002bc7a
push str.Failed_to_get_current_logic_version._Trying_next_device.
push edi
push 3
jmp 0x1002bc13
push 0
push dword [esp + 0x14]
call fcn.10005750
push dword [esp + 0x10]
call fcn.100051a0
mov dword [esp + 0x10], 0
call fcn.1004ce2f
mov bl, byte [esp + 0x15]
mov dword [eax], 0xfffffffc
test bl, bl
jne 0x1002bc8c
mov bh, byte [esp + 0x16]
test bh, bh
jne 0x1002bc8c
push str.Failed_to_get_current_logic_patch_level._Trying_next_device.
push edi
push 3
jmp 0x1002bc13
push 0
push dword [esp + 0x14]
call fcn.10005750
push dword [esp + 0x10]
call fcn.100051a0
mov bl, byte [esp + 0x15]
mov dword [esp + 0x10], 0
test bl, bl
jne 0x1002bce1
mov bh, byte [esp + 0x16]
test bh, bh
jne 0x1002bce1
mov esi, dword [esp + 0x1c]
jmp 0x1002bc1f
push dword [esp + 0x10]
call fcn.100051a0
mov dword [esp + 0x10], 0
test bl, bl
jne 0x1002bcc6
test bh, bh
jne 0x1002bcc6
push str.Failed_to_open_candidate_USB_device._This_usually_happens_because_the_device_is_already_in_use_by_another_running_program._Trying_next_device.
push edi
push 6
call fcn.1002aac0
mov esi, dword [esp + 0x28]
add esp, 0xc
inc ebp
cmp ebp, dword [esp + 0x28]
jb 0x1002b713
jmp 0x1002bce1
movzx eax, byte [esp + 0x80]
push eax
movzx eax, byte [esp + 0x80]
push eax
push str.Failed_to_open_USB_device_with_user_specified_busNumber_hhu_and_devAddress_hhu._This_usually_happens_due_to_permissions_or_driver_issues__or_because_the_device_is_already_in_use_by_another_running_program.
push edi
push 2
call fcn.1002aac0
add esp, 0x14
jmp 0x1002bcd6
push str.Failed_to_get_a_valid_USB_serial_number.
push edi
push 2
call fcn.1002aac0
add esp, 0xc
jmp 0x1002bce1
push str.USB_serial_number_restriction_is_present___s__in_addition_to_USB_bus_address_restrictions__this_single_candidate_device_didnt_match_it___s_.
push edi
push 2
call fcn.1002aac0
add esp, 0x14
jmp 0x1002bcd6
push str.Failed_to_get_current_logic_version.
push edi
push 2
call fcn.1002aac0
add esp, 0xc
jmp 0x1002bce1
push str.Failed_to_get_current_logic_patch_level.
push edi
push 2
call fcn.1002aac0
add esp, 0xc
jmp 0x1002bce1
push str.Failed_to_initialize_USB_transfer_mutex.
push edi
push 2
call fcn.1002aac0
add esp, 0xc
jmp 0x1002bce1
push dword [esp + 0x10]
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x34]
call dword [esp + 0x3c]
add esp, 0xc
jmp 0x1002bce1
push str.Failed_to_open_USB_device_with_user_specified_bus_address_or_serial_number._This_usually_happens_because_the_device_is_already_in_use_by_another_running_program.
push edi
push 2
call fcn.1002aac0
add esp, 0xc
call fcn.1004ce2f
mov dword [eax], 0xfffffffd
push 1
push dword [esp + 0x24]
call fcn.10004f90
lea ebp, [edi + 4]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1002bd1a
mov dword [edi + 8], eax
call fcn.1004ce2f
pop edi
pop esi
pop ebp
mov dword [eax], 0
mov al, 1
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.10045740
add esp, 0x5c
ret
push dword [ebp]
call fcn.10005dd0
mov dword [ebp], 0
call fcn.1004ce2f
cmp dword [eax], 0
jle 0x1002bd3e
call fcn.1004ce2f
mov dword [eax], 0
call fcn.1004ce2f
cmp dword [eax], 0
jne 0x1002bd53
call fcn.1004ce2f
mov dword [eax], 0xfffffffd
mov ecx, dword [esp + 0x68]
xor al, al
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10045740
add esp, 0x5c
ret