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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
mov eax, dword [0x75a1c0]
xor eax, esp
mov dword [esp + 0x88], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
or ebx, 0xffffffff
cmp dword [0x75ec54], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], ebx
mov eax, dword [edi + 0x24]
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], str.input
mov dword [esp + 0x34], str.output
mov dword [esp + 0x38], str.feature
je 0x465c1a
cmp dword [eax + 0x3cc], 0
jne 0x4656b3
push str.program_assertion_failed___private_HID_structure_is_uninitialized
push str.hid_open
push 1
push dword [eax + 4]
call fcn.0045c870
add esp, 0x10
lea eax, [ebx - 4]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0067bc9f
mov esp, ebp
pop ebp
ret
xor ecx, ecx
lea esi, [eax + 0x4c]
mov dword [esp + 0x10], ecx
xor eax, eax
mov dword [esp + 0x18], ecx
mov edx, dword [esi]
test edx, edx
je 0x4657bb
mov eax, dword [esi + 4]
cmp byte [eax], 4
jne 0x4657b7
mov eax, dword [edi + 0x24]
push 0
push 0x40000000
push 3
mov eax, dword [eax + 4]
push 0
push 3
push 0xc0000000
push edx
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [esp + 0x1c], ebx
cmp ebx, 0xffffffff
je 0x465749
mov eax, dword [esp + 0xc]
push 0
push edi
push dword [eax + 0x12c]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
jne 0x4657af
xor ecx, ecx
call fcn.0045cb20
push eax
push str.failed_to_associate_handle_to_I_O_completion_port:__s
push str.windows_open
push 1
push dword [esp + 0x1c]
call fcn.0045c870
add esp, 0x14
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi + 0x24]
push str.could_not_open_HID_device_in_R_W_mode__keyboard_or_mouse_____trying_without
push str.hid_open
push 2
push dword [eax + 4]
call fcn.0045c870
mov eax, dword [edi + 0x24]
add esp, 0x10
mov eax, dword [eax + 4]
push 0
push 0x40000000
push 3
push 0
push 3
push 0
push dword [esi]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [esp + 0x1c], eax
cmp ebx, 0xffffffff
je 0x465823
mov eax, dword [esp + 0xc]
push 0
push edi
push dword [eax + 0x12c]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
je 0x4657fc
mov byte [esi + 0x18], 1
mov ecx, dword [esp + 0x18]
mov dword [edi + ecx + 0x3c], ebx
mov eax, dword [esp + 0x10]
add ecx, 0x28
inc eax
add esi, 0x1c
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ecx
cmp ecx, 0x500
jl 0x4656c2
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 0xa
push eax
push ebx
call dword [0x75ec48]
test eax, eax
jne 0x465898
push str.could_not_gain_access_to_HID_top_collection__HidD_GetAttributes_
jmp 0x465bdf
xor ecx, ecx
call fcn.0045cb20
push eax
push str.failed_to_associate_handle_to_I_O_completion_port:__s
push str.windows_open
push 1
push dword [esp + 0x1c]
call fcn.0045c870
add esp, 0x14
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi + 0x24]
xor ecx, ecx
mov esi, dword [eax + 4]
call fcn.0045cb20
mov ecx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x18]
push ecx
push dword [eax + 0x44]
push str.could_not_open_device__s__interface__d_:__s
push str.hid_open
push 1
push esi
call fcn.0045c870
add esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 2
je 0x46587e
sub eax, 3
je 0x465c1a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0067bc9f
mov esp, ebp
pop ebp
ret
mov eax, 0xfffffffc
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0067bc9f
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x14]
mov esi, 0x20
movzx eax, word [esp + 0x40]
push esi
push ebx
mov ecx, dword [edx + 0x3cc]
mov word [ecx], ax
mov ecx, dword [edx + 0x3cc]
movzx eax, word [esp + 0x4a]
mov word [ecx + 2], ax
call dword [0x75ec04]
test eax, eax
je 0x4658de
nop word [eax + eax]
add esi, esi
push esi
push ebx
call dword [0x75ec04]
test eax, eax
jne 0x4658d0
mov eax, esi
cdq
sub eax, edx
sar eax, 1
push eax
mov eax, dword [edi + 0x24]
push str.set_maximum_input_buffer_size_to__d
push str.hid_open
push 4
push dword [eax + 4]
call fcn.0045c870
add esp, 0x14
lea eax, [esp + 0x20]
push eax
push ebx
call dword [0x75ec20]
test eax, eax
je 0x465bda
mov eax, dword [esp + 0x20]
test eax, eax
je 0x465bda
lea ecx, [esp + 0x48]
push ecx
push eax
call dword [0x75ec24]
cmp eax, 0x110000
je 0x46593d
push str.could_not_parse_HID_capabilities__HidP_GetCaps_
jmp 0x465bdf
movzx eax, word [esp + 0x78]
xor ebx, ebx
mov dword [esp + 0x88], eax
movzx eax, word [esp + 0x7e]
mov dword [esp + 0x8c], eax
movzx eax, word [esp + 0x84]
mov dword [esp + 0x90], eax
mov dword [esp + 0x28], ebx
nop word [eax + eax]
push dword [esp + ebx*4 + 0x30]
mov eax, dword [edi + 0x24]
lea esi, [esp + 0x8c]
push dword [esi + ebx*4]
lea esi, [esi + ebx*4]
push str._lu_HID__s_report_value_s__found
push str.hid_open
push 4
push dword [eax + 4]
mov dword [esp + 0x44], esi
call fcn.0045c870
mov eax, dword [esp + 0x2c]
add esp, 0x18
mov eax, dword [eax + 0x3cc]
mov byte [ebx + eax + 6], 0
mov eax, dword [esi]
test eax, eax
je 0x465ace
push 0x48
push eax
call fcn.00681a00
add esp, 8
mov dword [esp + 0x24], eax
test eax, eax
je 0x465aa3
push dword [esp + 0x20]
push esi
push eax
push ebx
call dword [0x75ec0c]
cmp eax, 0x110000
jne 0x465aa3
mov ecx, dword [esi]
cmp ecx, 1
jb 0x465aa3
xor eax, eax
xor edx, edx
mov dword [esp + 0x18], eax
test ecx, ecx
jle 0x465ac2
mov ecx, dword [esp + 0x24]
mov ebx, eax
add ecx, 2
mov dword [esp + 0x10], ecx
nop
movzx eax, byte [ecx]
mov esi, edx
push eax
mov eax, dword [edi + 0x24]
push str.__Report_ID:_0x_02X
push str.hid_open
push 4
push dword [eax + 4]
call fcn.0045c870
mov ecx, dword [esp + 0x24]
lea edx, [esi + 1]
add esp, 0x14
lea eax, [ebx + 1]
mov cl, byte [ecx]
test cl, cl
mov ecx, dword [esp + 0x10]
cmove ebx, eax
cmove edx, esi
mov esi, dword [esp + 0x18]
add ecx, 0x48
mov eax, dword [esp + 0x2c]
inc esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], ecx
cmp esi, dword [eax]
jl 0x465a10
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0x28]
test edx, edx
je 0x465ac2
cmp dword [esp + 0xc], 0
je 0x465a92
mov eax, dword [esp + ebx*4 + 0x30]
push eax
mov eax, dword [edi + 0x24]
push str.program_assertion_failed___zero_and_nonzero_report_IDs_used_for__s
push str.hid_open
push 2
push dword [eax + 4]
call fcn.0045c870
add esp, 0x14
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x3cc]
mov byte [ebx + eax + 6], 1
jmp 0x465ac2
mov eax, dword [esp + ebx*4 + 0x30]
push eax
mov eax, dword [edi + 0x24]
push str.__could_not_process__s_report_IDs
push str.hid_open
push 2
push dword [eax + 4]
call fcn.0045c870
add esp, 0x14
push dword [esp + 0x24]
call fcn.00687807
add esp, 4
inc ebx
mov dword [esp + 0x28], ebx
cmp ebx, 2
jle 0x465970
mov ebx, dword [esp + 0x14]
movzx eax, word [esp + 0x4c]
mov esi, dword [esp + 0x1c]
mov ecx, dword [ebx + 0x3cc]
mov word [ecx + 0xa], ax
mov ecx, dword [ebx + 0x3cc]
movzx eax, word [esp + 0x4e]
mov word [ecx + 0xc], ax
mov ecx, dword [ebx + 0x3cc]
movzx eax, word [esp + 0x50]
mov word [ecx + 0xe], ax
mov ecx, dword [ebx + 0x3cc]
movzx eax, word [esp + 0x48]
mov word [ecx + 0x10], ax
mov ecx, dword [ebx + 0x3cc]
movzx eax, word [esp + 0x4a]
mov word [ecx + 0x12], ax
mov ecx, dword [ebx + 0x3cc]
mov al, byte [ebx + 0x2e]
mov byte [ecx + 0x314], al
mov eax, dword [ebx + 0x3cc]
cmp byte [eax + 0x314], 0
lea ecx, [eax + 0x14]
je 0x465b5f
push 0x100
push ecx
push esi
call dword [0x75ec3c]
jmp 0x465b64
xor eax, eax
mov word [ecx], ax
mov ecx, dword [ebx + 0x3cc]
mov al, byte [ebx + 0x2f]
mov byte [ecx + 0x315], al
mov eax, dword [ebx + 0x3cc]
mov cl, byte [eax + 0x315]
add eax, 0x114
test cl, cl
je 0x465b9b
push 0x100
push eax
movzx eax, cl
push eax
push esi
call dword [0x75ed58]
jmp 0x465ba0
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebx + 0x3cc]
mov al, byte [ebx + 0x30]
mov byte [ecx + 0x316], al
mov eax, dword [ebx + 0x3cc]
cmp byte [eax + 0x316], 0
lea ecx, [eax + 0x214]
je 0x465bd3
push 0x100
push ecx
push esi
call dword [0x75ebfc]
jmp 0x465bf4
xor eax, eax
mov word [ecx], ax
jmp 0x465bf4
push str.could_not_read_HID_preparsed_data__HidD_GetPreparsedData_
mov eax, dword [edi + 0x24]
push str.hid_open
push 1
push dword [eax + 4]
call fcn.0045c870
add esp, 0x10
mov eax, dword [esp + 0x20]
test eax, eax
je 0x465c03
push eax
call dword [0x75ec1c]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0067bc9f
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x94]
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0067bc9f
mov esp, ebp
pop ebp
ret