Function at 0x4c7ee0
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 edx, dword [0x5bd228]
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x64], str.input
mov eax, dword [eax + 0x10]
test edx, edx
mov dword [ebp - 0x60], str.output
mov dword [ebp - 0x5c], str.feature
mov ebx, dword [eax + 8]
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x90], ebx
je 0x4c8398
mov eax, dword [eax + 0x354]
test eax, eax
je 0x4c8531
mov eax, dword [ebp - 0x8c]
mov ebx, 0xffffffff
xor edi, edi
lea esi, [eax + 0x54]
mov eax, ebx
mov ebx, dword [ebp + 0xc]
jmp 0x4c7f5b
add edi, 1
add esi, 0x18
cmp edi, 0x20
je 0x4c7fc0
mov edx, dword [esi]
test edx, edx
je 0x4c7f50
mov ecx, dword [esi + 4]
cmp byte [ecx], 4
jne 0x4c7f50
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x40000080
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x4c80df
mov dword [ebx + edi*8 + 0x20], eax
add edi, 1
add esi, 0x18
cmp edi, 0x20
jne 0x4c7f5b
lea esi, [esi]
mov ebx, eax
lea eax, [ebp - 0x7a]
mov dword [ebp - 0x7a], 0xa
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [0x5bd38c]
sub esp, 8
test eax, eax
je 0x4c80d5
mov edx, dword [ebp - 0x8c]
movzx ecx, word [ebp - 0x76]
mov eax, dword [edx + 0x354]
mov word [eax], cx
mov eax, dword [edx + 0x354]
movzx ecx, word [ebp - 0x74]
mov word [eax + 2], cx
jmp 0x4c8009
add edi, edi
mov dword [esp + 4], edi
mov dword [esp], ebx
call dword [0x5bd36c]
sub esp, 8
test eax, eax
jne 0x4c8007
mov edx, edi
sar edx, 1
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.set_maximum_input_buffer_size_to__d
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 4
mov dword [esp], 0
call dbg.usbi_log
lea eax, [ebp - 0x80]
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [0x5bd384]
sub esp, 8
test eax, eax
je 0x4c8090
mov eax, dword [ebp - 0x80]
test eax, eax
je 0x4c8090
lea edx, [ebp - 0x58]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [0x5bd370]
sub esp, 8
cmp eax, 0x110000
je 0x4c8158
mov dword [esp + 0xc], str.could_not_parse_HID_capabilities__HidP_GetCaps_
jmp 0x4c8098
mov dword [esp + 0xc], str.could_not_read_HID_preparsed_data__HidD_GetPreparsedData_
mov eax, dword [ebp - 0x90]
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 1
mov dword [esp], eax
call dbg.usbi_log
mov eax, dword [ebp - 0x80]
xor ebx, ebx
test eax, eax
je 0x4c80cb
mov dword [esp], eax
call dword [0x5bd380]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], str.could_not_gain_access_to_HID_top_collection__HidD_GetAttributes_
jmp 0x4c8098
mov eax, dword [ebp - 0x90]
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 dword [esp], eax
call dbg.usbi_log
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x40000080
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0
mov eax, dword [esi]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x4c84c5
mov dword [esi + 0x14], 1
jmp 0x4c7fae
movzx edx, word [ebp - 0x22]
xor esi, esi
movzx eax, word [ebp - 0x28]
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x94], ebx
mov edi, ecx
mov ebx, esi
mov dword [ebp - 0x6c], edx
movzx edx, word [ebp - 0x1c]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x68], edx
mov edx, str.input
mov esi, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], str._u_HID__s_report_value_s__found
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 4
mov dword [esp], 0
call dbg.usbi_log
mov eax, dword [ebp - 0x8c]
mov eax, dword [eax + 0x354]
mov dword [eax + ebx*4 + 8], 0
mov eax, dword [edi]
test eax, eax
jne 0x4c82b1
add ebx, 1
add edi, 4
cmp ebx, 3
je 0x4c81e0
mov esi, dword [ebp + ebx*4 - 0x64]
mov eax, dword [edi]
jmp 0x4c8183
mov ecx, dword [ebp - 0x8c]
movzx edx, word [ebp - 0x54]
mov ebx, dword [ebp - 0x94]
mov eax, dword [ecx + 0x354]
mov word [eax + 0x14], dx
movzx edx, word [ebp - 0x52]
mov eax, dword [ecx + 0x354]
mov word [eax + 0x16], dx
movzx edx, word [ebp - 0x50]
mov eax, dword [ecx + 0x354]
mov word [eax + 0x18], dx
movzx eax, byte [ecx + 0x366]
mov edx, dword [ecx + 0x354]
mov byte [edx + 0x31a], al
mov eax, dword [ecx + 0x354]
cmp byte [eax + 0x31a], 0
jne 0x4c8334
xor esi, esi
mov word [eax + 0x1a], si
mov ecx, dword [ebp - 0x8c]
movzx eax, byte [ecx + 0x367]
mov edx, dword [ecx + 0x354]
mov byte [edx + 0x31b], al
mov eax, dword [ecx + 0x354]
cmp byte [eax + 0x31b], 0
jne 0x4c8376
xor ecx, ecx
mov word [eax + 0x11a], cx
mov ecx, dword [ebp - 0x8c]
movzx eax, byte [ecx + 0x368]
mov edx, dword [ecx + 0x354]
mov byte [edx + 0x31c], al
mov eax, dword [ecx + 0x354]
cmp byte [eax + 0x31c], 0
jne 0x4c8354
xor edx, edx
mov word [eax + 0x21a], dx
jmp 0x4c80b6
mov dword [esp + 4], 0x48
mov dword [esp], eax
call sym._calloc
test eax, eax
mov ecx, eax
mov dword [ebp - 0x98], eax
je 0x4c842b
mov eax, dword [ebp - 0x80]
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp], ebx
mov dword [esp + 0xc], eax
call dword [0x5bd350]
sub esp, 0x10
cmp eax, 0x110000
je 0x4c83a2
mov eax, dword [ebp - 0x90]
mov dword [esp + 0x10], esi
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], eax
call dbg.usbi_log
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
call sym._free
jmp 0x4c81cd
add eax, 0x1a
mov dword [esp + 8], 0x100
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [0x5bd37c]
sub esp, 0xc
jmp 0x4c8242
add eax, 0x21a
mov dword [esp + 8], 0x100
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [0x5bd374]
sub esp, 0xc
jmp 0x4c80b6
add eax, 0x11a
mov dword [esp + 8], 0x100
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [0x5bd378]
sub esp, 0xc
jmp 0x4c8277
mov ebx, 0xfffffffd
jmp 0x4c80cb
cmp dword [edi], 0
je 0x4c82f7
jle 0x4c8321
mov eax, dword [ebp - 0x98]
xor edx, edx
mov dword [ebp - 0xa4], esi
mov esi, edx
mov dword [ebp - 0xa8], ebx
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0xa0], 0
mov ebx, eax
jmp 0x4c83f0
add dword [ebp - 0xa0], 1
add esi, 1
add ebx, 0x48
cmp dword [edi], esi
jle 0x4c845e
movzx ecx, byte [ebx + 2]
mov dword [esp + 0xc], str.__Report_ID:_0x_02X
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 4
mov dword [esp + 0x10], ecx
mov dword [esp], 0
call dbg.usbi_log
cmp byte [ebx + 2], 0
jne 0x4c83df
add dword [ebp - 0x9c], 1
jmp 0x4c83e6
mov eax, dword [ebp + ebx*4 - 0x64]
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 [ebp - 0x90]
mov dword [esp], eax
call dbg.usbi_log
jmp 0x4c81cd
mov eax, dword [ebp - 0xa0]
mov esi, dword [ebp - 0xa4]
mov ebx, dword [ebp - 0xa8]
test eax, eax
je 0x4c8321
mov eax, dword [ebp - 0x9c]
test eax, eax
je 0x4c84ac
mov eax, dword [ebp - 0x90]
mov dword [esp + 0x10], esi
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], eax
call dbg.usbi_log
mov eax, dword [ebp - 0x8c]
mov eax, dword [eax + 0x354]
mov dword [eax + ebx*4 + 8], 1
jmp 0x4c8321
mov dword [esp], 0
mov ebx, 0xfffffffc
call dbg.windows_error_str
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x8c]
mov eax, dword [eax + 0x4c]
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 - 0x90]
mov dword [esp], eax
call dbg.usbi_log
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4c80cb
xor ebx, ebx
cmp eax, 5
setne bl
lea ebx, [ebx + ebx - 3]
jmp 0x4c80cb
mov dword [esp], ebx
mov ebx, 0xfffffffb
mov dword [esp + 0xc], str.program_assertion_failed___private_HID_structure_is_unitialized
mov dword [esp + 8], str.hid_open
mov dword [esp + 4], 1
call dbg.usbi_log
jmp 0x4c80cb