Function at 0x5a2eb0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xbc
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x743e14]
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x64], str.input
mov dword [ebp - 0x60], str.output
mov dword [ebp - 0x5c], str.feature
mov eax, dword [eax + 0x24]
test ecx, ecx
mov dword [ebp - 0x8c], eax
je 0x5a347f
mov edx, dword [eax + 0x3cc]
test edx, edx
je 0x5a3489
mov eax, dword [ebp - 0x8c]
mov ecx, 0xffffffff
xor esi, esi
lea ebx, [eax + 0x4c]
mov eax, dword [ebp + 0xc]
lea edi, [eax + 0x3c]
mov eax, ecx
jmp 0x5a2f2e
add esi, 1
add ebx, 0x1c
add edi, 0x28
cmp esi, 0x20
je 0x5a2f62
mov edx, dword [ebx]
test edx, edx
je 0x5a2f20
mov ecx, dword [ebx + 4]
cmp byte [ecx], 4
jne 0x5a2f20
mov eax, dword [ebp + 0xc]
mov ecx, 0xc0000000
call sym._windows_open_1
cmp eax, 0xffffffff
je 0x5a2fe0
mov dword [edi], eax
add esi, 1
add ebx, 0x1c
add edi, 0x28
cmp esi, 0x20
jne 0x5a2f2e
mov ecx, eax
lea eax, [ebp - 0x7a]
mov dword [ebp - 0x7a], 0xa
mov dword [esp], ecx
mov dword [ebp - 0x90], ecx
mov dword [esp + 4], eax
call dword [0x743e0c]
sub esp, 8
test eax, eax
mov ecx, dword [ebp - 0x90]
jne 0x5a3030
mov dword [esp + 0xc], str.could_not_gain_access_to_HID_top_collection__HidD_GetAttributes_
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 1
mov eax, dword [eax + 0x24]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._usbi_log
mov eax, dword [ebp - 0x80]
xor ebx, ebx
test eax, eax
je 0x5a2fd0
mov dword [esp], eax
call dword [0x743e04]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], str.could_not_open_HID_device_in_R_W_mode__keyboard_or_mouse_____trying_without
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 2
mov eax, dword [eax + 0x24]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._usbi_log
mov edx, dword [ebx]
mov eax, dword [ebp + 0xc]
xor ecx, ecx
call sym._windows_open_1
cmp eax, 0xffffffff
je 0x5a3318
mov byte [ebx + 0x18], 1
mov dword [edi], eax
jmp 0x5a2f54
mov eax, dword [ebp - 0x8c]
movzx edx, word [ebp - 0x76]
mov ebx, ecx
mov eax, dword [eax + 0x3cc]
mov word [eax], dx
movzx edx, word [ebp - 0x74]
mov word [eax + 2], dx
jmp 0x5a3052
add esi, esi
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [0x743df0]
sub esp, 8
test eax, eax
jne 0x5a3050
mov eax, dword [ebp + 0xc]
sar esi, 1
mov dword [esp + 0xc], str.set_maximum_input_buffer_size_to__d
mov dword [esp + 0x10], esi
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 4
mov dword [ebp - 0x90], ebx
mov eax, dword [eax + 0x24]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._usbi_log
mov ecx, dword [ebp - 0x90]
lea eax, [ebp - 0x80]
mov dword [esp + 4], eax
mov dword [esp], ecx
call dword [0x743e08]
sub esp, 8
test eax, eax
je 0x5a3100
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x90]
test eax, eax
je 0x5a3100
lea edx, [ebp - 0x58]
mov dword [ebp - 0x90], ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [0x743df4]
sub esp, 8
cmp eax, 0x110000
mov ecx, dword [ebp - 0x90]
je 0x5a310d
mov dword [esp + 0xc], str.could_not_parse_HID_capabilities__HidP_GetCaps_
jmp 0x5a2f9a
mov dword [esp + 0xc], str.could_not_read_HID_preparsed_data__HidD_GetPreparsedData_
jmp 0x5a2f9a
movzx edx, word [ebp - 0x22]
movzx eax, word [ebp - 0x28]
mov esi, str.input
mov dword [ebp - 0x90], esi
mov esi, dword [ebp + 0xc]
lea ebx, [ebp - 0x70]
xor edi, edi
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0x6c], edx
movzx edx, word [ebp - 0x1c]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x68], edx
mov ecx, dword [ebp - 0x90]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str._lu_HID__s_report_value_s__found
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 4
mov dword [esp + 0x14], ecx
mov eax, dword [esi + 0x24]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._usbi_log
mov eax, dword [ebp - 0x8c]
mov eax, dword [eax + 0x3cc]
mov byte [eax + edi + 6], 0
mov eax, dword [ebx]
test eax, eax
jne 0x5a3293
add edi, 1
add ebx, 4
cmp edi, 3
je 0x5a31a3
mov eax, dword [ebp + edi*4 - 0x64]
mov dword [ebp - 0x90], eax
mov eax, dword [ebx]
jmp 0x5a313b
mov edi, dword [ebp - 0x8c]
movzx edx, word [ebp - 0x54]
mov ecx, dword [ebp - 0xa0]
mov eax, dword [edi + 0x3cc]
mov word [eax + 0xa], dx
movzx edx, word [ebp - 0x52]
mov word [eax + 0xc], dx
movzx edx, word [ebp - 0x50]
mov word [eax + 0xe], dx
movzx edx, word [ebp - 0x58]
mov word [eax + 0x10], dx
movzx edx, word [ebp - 0x56]
mov word [eax + 0x12], dx
movzx edx, byte [edi + 0x2e]
mov byte [eax + 0x314], dl
mov eax, dword [edi + 0x3cc]
cmp byte [eax + 0x314], 0
jne 0x5a325b
xor esi, esi
mov word [eax + 0x14], si
mov edi, dword [ebp - 0x8c]
movzx edx, byte [edi + 0x2f]
mov byte [eax + 0x315], dl
mov eax, dword [edi + 0x3cc]
movzx edx, byte [eax + 0x315]
test dl, dl
jne 0x5a33a9
xor ebx, ebx
mov word [eax + 0x114], bx
mov edi, dword [ebp - 0x8c]
movzx edx, byte [edi + 0x30]
mov byte [eax + 0x316], dl
mov eax, dword [edi + 0x3cc]
cmp byte [eax + 0x316], 0
jne 0x5a3387
xor edx, edx
mov word [eax + 0x214], dx
jmp 0x5a2fbb
add eax, 0x14
mov dword [esp], ecx
mov dword [ebp - 0x90], ecx
mov dword [esp + 8], 0x100
mov dword [esp + 4], eax
call dword [0x743e00]
mov eax, dword [ebp - 0x8c]
sub esp, 0xc
mov ecx, dword [ebp - 0x90]
mov eax, dword [eax + 0x3cc]
jmp 0x5a31fc
mov dword [esp + 4], 0x48
mov dword [esp], eax
call sym._calloc
test eax, eax
mov ecx, eax
mov dword [ebp - 0x94], eax
je 0x5a32d5
mov eax, dword [ebp - 0x80]
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp], edi
mov dword [esp + 0xc], eax
call dword [0x743de4]
sub esp, 0x10
cmp eax, 0x110000
je 0x5a33e7
mov eax, dword [ebp - 0x90]
mov dword [esp + 0xc], str.__could_not_process__s_report_IDs
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 2
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x24]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._usbi_log
mov eax, dword [ebp - 0x94]
mov dword [esp], eax
call sym._free
jmp 0x5a318a
mov dword [esp], 0
mov ebx, 0xfffffffc
call sym._windows_error_str
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x8c]
mov dword [esp + 0x14], esi
mov eax, dword [eax + 0x44]
mov dword [esp + 0xc], str.could_not_open_device__s__interface__d_:__s
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 1
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x24]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._usbi_log
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x5a2fd0
xor ebx, ebx
cmp eax, 5
setne bl
lea ebx, [ebx + ebx - 3]
jmp 0x5a2fd0
add eax, 0x214
mov dword [esp + 8], 0x100
mov dword [esp], ecx
mov dword [esp + 4], eax
call dword [0x743dfc]
sub esp, 0xc
jmp 0x5a2fbb
add eax, 0x114
mov dword [esp], ecx
mov dword [ebp - 0x90], ecx
mov dword [esp + 0xc], 0x100
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call dword [0x743df8]
mov eax, dword [ebp - 0x8c]
sub esp, 0x10
mov ecx, dword [ebp - 0x90]
mov eax, dword [eax + 0x3cc]
jmp 0x5a322a
cmp dword [ebx], 0
je 0x5a32d5
jle 0x5a3305
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x9c], 0
xor edx, edx
mov dword [ebp - 0x98], 0
add eax, 2
jmp 0x5a342c
add dword [ebp - 0x98], 1
add edx, 1
add eax, 0x48
cmp dword [ebx], edx
jle 0x5a34b6
movzx ecx, byte [eax]
mov dword [esp + 0xc], str.__Report_ID:_0x_02X
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 4
mov dword [ebp - 0xa8], edx
mov dword [ebp - 0xa4], eax
mov dword [esp + 0x10], ecx
mov ecx, dword [esi + 0x24]
mov ecx, dword [ecx + 4]
mov dword [esp], ecx
call sym._usbi_log
mov eax, dword [ebp - 0xa4]
mov edx, dword [ebp - 0xa8]
cmp byte [eax], 0
jne 0x5a3417
add dword [ebp - 0x9c], 1
jmp 0x5a341e
mov ebx, 0xfffffffd
jmp 0x5a2fd0
mov dword [esp + 0xc], str.program_assertion_failed___private_HID_structure_is_uninitialized
mov dword [esp + 8], str.hid_open
mov ebx, 0xfffffffb
mov dword [esp + 4], 1
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._usbi_log
jmp 0x5a2fd0
mov eax, dword [ebp - 0x98]
test eax, eax
je 0x5a3305
mov eax, dword [ebp - 0x9c]
test eax, eax
je 0x5a34fe
mov eax, dword [ebp - 0x90]
mov dword [esp + 0xc], str.program_assertion_failed___zero_and_nonzero_report_IDs_used_for__s
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 2
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x24]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._usbi_log
mov eax, dword [ebp - 0x8c]
mov eax, dword [eax + 0x3cc]
mov byte [eax + edi + 6], 1
jmp 0x5a3305