Function at 0x10002f30
Capabilities:
Read file on windows

Disassembly:
push ebp
xor edx, edx
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x108
mov dword [ebp + eax - 0x54], edx
mov dword [ebp + eax - 0x50], 0
add eax, 8
cmp eax, 0x18
jb 0x10002f40
xor eax, eax
lea edi, [ebp - 0x38]
mov ecx, 0xb
mov dword [ebp - 0x5c], 0x20
rep stosd dword es:[edi], eax
mov eax, dword [0x1000c010]
mov dword [ebp - 0x58], 5
mov edi, 1
mov dword [ebp - 0x50], 0x6c53d5fd
mov dword [ebp - 0x4c], 0x440f6480
mov dword [ebp - 0x48], 0x674718b6
mov dword [ebp - 0x44], 0xa6e1c550
mov dword [ebp - 0x3c], 0x30
mov dword [ebp - 0x34], dbg.xinput_devnotify_wndproc
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], str.__wine_xinput_devnotify
mov dword [esp + 4], str.wine_xinput_hid_update
mov dword [esp], 0xfffffffe
call dword [sym.imp.kernel32.dll_SetThreadDescription]
push eax
push eax
lea eax, [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_RegisterClassExW]
push eax
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x20], 0xfffffffd
mov dword [esp + 4], eax
xor eax, eax
mov dword [esp], eax
call dword [sym.imp.user32.dll_CreateWindowExW]
xor ecx, ecx
mov edx, eax
sub esp, 0x30
mov dword [ebp - 0xd4], eax
lea eax, [ebp - 0x5c]
mov dword [esp + 8], ecx
mov dword [esp], edx
mov dword [esp + 4], eax
call dword [sym.imp.user32.dll_RegisterDeviceNotificationW]
sub esp, 0xc
mov esi, eax
call dbg.update_controller_list
mov eax, dword [0x1000c00c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetEvent]
mov dword [ebp - 0xd8], esi
mov ecx, 0x102
push ebx
lea esi, [esi]
nop
cmp ecx, 0x102
je 0x1000312d
lea edx, [edi - 1]
cmp ecx, edx
jb 0x10003142
mov esi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov edi, 0x100060a0
xor ebx, ebx
mov edx, dword [edi + 0x4c]
test edx, edx
je 0x100030c0
mov dword [esp], edi
call esi
mov eax, dword [edi + 0x258]
sub esp, 4
test eax, eax
je 0x100030b4
mov eax, dword [edi + 0x450]
mov dword [ebp + ebx*4 - 0xb8], edi
mov dword [ebp + ebx*4 - 0xa4], eax
add ebx, 1
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
add edi, 0x508
cmp edi, 0x100074c0
jne 0x10003084
mov ecx, dword [0x1000c008]
lea eax, [ebp - 0xa4]
lea edi, [ebx + 1]
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0x1cff
mov dword [ebp + ebx*4 - 0xa4], ecx
mov dword [esp + 8], 0x7d0
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.user32.dll_MsgWaitForMultipleObjectsEx]
sub esp, 0x14
mov ecx, eax
cmp edi, eax
jae 0x10003200
cmp eax, 0x102
jne 0x100036b0
cmp edi, 0x102
je 0x10003206
call dbg.update_controller_list
mov ecx, 0x102
lea edx, [edi - 1]
cmp ecx, edx
jae 0x10003077
mov ebx, dword [ebp + ecx*4 - 0xb8]
mov eax, dword [ebx + 0x468]
movzx esi, word [ebx + 0x264]
mov dword [esp + 0xc], 1
mov dword [ebp - 0xc8], eax
lea eax, [ebx + 0x454]
mov edx, eax
mov dword [ebp - 0xd0], eax
lea eax, [ebp - 0xc4]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebx + 0x4c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
sub esp, 0x10
test eax, eax
jne 0x10003270
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e3
je 0x10003077
cmp dword [eax + 0x34], 5
je 0x100036a0
cmp dword [eax + 0x34], 6
je 0x100036a0
test byte [0x100074c0], 2
je 0x10003077
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.Failed_to_read_input_report__GetOverlappedResult_failed_with_error__lu_n
mov dword [esp + 8], str.read_controller_state
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x100074c0
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x10003077
jne 0x10003060
mov dword [ebp - 0xc8], edi
mov esi, dword [sym.imp.user32.dll_PeekMessageW]
lea ebx, [ebp - 0x78]
mov dword [ebp - 0xcc], ecx
mov edi, dword [ebp - 0xd4]
jmp 0x10003234
mov dword [esp], ebx
call dword [sym.imp.user32.dll_DispatchMessageW]
sub esp, 4
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], ebx
call esi
sub esp, 0x14
test eax, eax
jne 0x10003228
mov edi, dword [ebp - 0xc8]
mov ecx, dword [ebp - 0xcc]
jmp 0x10003060
mov dword [ebp - 0xc0], 0xb
movzx eax, si
lea esi, [ebp - 0x8e]
mov dword [esp + 0x1c], eax
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0xc8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x25c]
mov dword [esp + 0xc], esi
mov dword [esp + 0x14], eax
lea eax, [ebp - 0xc0]
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 9
mov dword [esp], 0
call sym._HidP_GetUsages_32
sub esp, 0x20
cmp eax, 0x110000
je 0x100032e2
test byte [0x100074c0], 4
jne 0x10003929
mov edx, dword [ebp - 0xc0]
test edx, edx
je 0x10003a8e
mov eax, esi
lea ecx, [esi + edx*2]
xor esi, esi
lea esi, [esi]
nop
cmp word [eax], 0xb
ja case.0x10003309.0
movzx edx, word [eax]
jmp dword [edx*4 + 0x100098c4]
or si, 0x400
lea esi, [esi]
add eax, 2
cmp eax, ecx
jne 0x10003300
mov eax, dword [ebp - 0xcc]
lea edi, [ebp - 0xbc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0xc8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x25c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0x39
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._HidP_GetUsageValue_32
sub esp, 0x20
cmp eax, 0x110000
je 0x10003717
test byte [0x100074c0], 4
jne 0x100038fc
mov eax, dword [ebp - 0xcc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0xc8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x25c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0x30
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._HidP_GetUsageValue_32
sub esp, 0x20
cmp eax, 0x110000
je 0x10003956
test byte [0x100074c0], 4
jne 0x10003848
mov eax, dword [ebp - 0xcc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0xc8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x25c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0x31
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._HidP_GetUsageValue_32
sub esp, 0x20
cmp eax, 0x110000
je 0x10003a1d
test byte [0x100074c0], 4
jne 0x1000381b
mov eax, dword [ebp - 0xcc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0xc8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x25c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0x33
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._HidP_GetUsageValue_32
sub esp, 0x20
cmp eax, 0x110000
je 0x100039f4
test byte [0x100074c0], 4
jne 0x100037ee
mov eax, dword [ebp - 0xcc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0xc8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x25c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0x34
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._HidP_GetUsageValue_32
sub esp, 0x20
cmp eax, 0x110000
je 0x100039c9
test byte [0x100074c0], 4
jne 0x100038cf
mov eax, dword [ebp - 0xcc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0xc8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x25c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0x35
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._HidP_GetUsageValue_32
sub esp, 0x20
cmp eax, 0x110000
je 0x100039a4
test byte [0x100074c0], 4
jne 0x100038a2
mov eax, dword [ebp - 0xcc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0xc8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x25c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0x32
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._HidP_GetUsageValue_32
sub esp, 0x20
cmp eax, 0x110000
je 0x1000397f
test byte [0x100074c0], 4
jne 0x10003875
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0x258]
sub esp, 4
test edi, edi
jne 0x10003731
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x10003077
or si, 0x80
jmp case.0x10003309.0
or esi, 0x40
jmp case.0x10003309.0
or esi, 0x10
jmp case.0x10003309.0
or esi, 0x20
jmp case.0x10003309.0
or si, 0x200
jmp case.0x10003309.0
or si, 0x100
jmp case.0x10003309.0
or si, 0x8000
jmp case.0x10003309.0
or si, 0x1000
jmp case.0x10003309.0
or si, 0x4000
jmp case.0x10003309.0
or si, 0x2000
jmp case.0x10003309.0
mov eax, ebx
call sym._controller_destroy.constprop.0
jmp 0x10003077
mov esi, dword [ebp - 0xd8]
test byte [0x100074c0], 2
jne 0x10003a48
mov dword [ebp - 0xc8], ecx
mov dword [esp], esi
call dword [sym.imp.user32.dll_UnregisterDeviceNotification]
mov eax, dword [ebp - 0xd4]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.user32.dll_DestroyWindow]
mov eax, dword [0x1000c010]
sub esp, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.user32.dll_UnregisterClassW]
mov ecx, dword [ebp - 0xc8]
mov eax, dword [0x1000c010]
sub esp, 8
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FreeLibraryAndExitThread]
cmp dword [ebp - 0xbc], 8
ja case.0x1000372a.0
mov eax, dword [ebp - 0xbc]
jmp dword [eax*4 + 0x100098f4]
movzx eax, byte [ebp - 0xd9]
mov edi, dword [ebp - 0xd0]
mov ecx, 4
mov word [ebx + 0x30], si
add dword [ebx + 0x2c], 1
mov byte [ebx + 0x32], al
movzx eax, byte [ebp - 0xda]
mov byte [ebx + 0x33], al
movzx eax, word [ebp - 0xdc]
mov word [ebx + 0x34], ax
movzx eax, word [ebp - 0xde]
mov word [ebx + 0x36], ax
movzx eax, word [ebp - 0xe0]
mov word [ebx + 0x38], ax
movzx eax, word [ebp - 0xe2]
mov word [ebx + 0x3a], ax
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0xd0]
xor ecx, ecx
mov eax, dword [ebx + 0x450]
mov dword [ebx + 0x464], eax
mov eax, dword [ebp - 0xcc]
mov dword [esp + 0x10], edi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc8]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x4c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x100035e6
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x100035e6
mov eax, ebx
call sym._controller_destroy.constprop.0
jmp 0x100035e6
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.HidP_GetUsageValue_HID_USAGE_PAGE_GENERIC___HID_USAGE_GENERIC_RX_returned__lx_n
mov dword [esp + 8], str.read_controller_state
mov dword [esp + 4], 0x100074c0
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x100034a9
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.HidP_GetUsageValue_HID_USAGE_PAGE_GENERIC___HID_USAGE_GENERIC_Y_returned__lx_n
mov dword [esp + 8], str.read_controller_state
mov dword [esp + 4], 0x100074c0
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x10003448
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.HidP_GetUsageValue_HID_USAGE_PAGE_GENERIC___HID_USAGE_GENERIC_X_returned__lx_n
mov dword [esp + 8], str.read_controller_state
mov dword [esp + 4], 0x100074c0
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x100033e7
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.HidP_GetUsageValue_HID_USAGE_PAGE_GENERIC___HID_USAGE_GENERIC_Z_returned__lx_n
mov dword [esp + 8], str.read_controller_state
mov dword [esp + 4], 0x100074c0
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x100035cc
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.HidP_GetUsageValue_HID_USAGE_PAGE_GENERIC___HID_USAGE_GENERIC_RZ_returned__lx_n
mov dword [esp + 8], str.read_controller_state
mov dword [esp + 4], 0x100074c0
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x1000356b
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.HidP_GetUsageValue_HID_USAGE_PAGE_GENERIC___HID_USAGE_GENERIC_RY_returned__lx_n
mov dword [esp + 8], str.read_controller_state
mov dword [esp + 4], 0x100074c0
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x1000350a
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.HidP_GetUsageValue_HID_USAGE_PAGE_GENERIC___HID_USAGE_GENERIC_HATSWITCH_returned__lx_n
mov dword [esp + 8], str.read_controller_state
mov dword [esp + 4], 0x100074c0
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp case.0x1000372a.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.HidP_GetUsages_HID_USAGE_PAGE_BUTTON_returned__lx_n
mov dword [esp + 8], str.read_controller_state
mov dword [esp + 4], 0x100074c0
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x100032e2
mov dword [esp], 0x7fff
mov eax, dword [ebp - 0xbc]
lea edx, [ebx + 0x2a0]
mov ecx, 0xffff8000
call dbg.scale_value
mov word [ebp - 0xdc], ax
jmp 0x100033e7
mov dword [esp], 0xff
mov eax, dword [ebp - 0xbc]
lea edx, [ebx + 0x330]
xor ecx, ecx
call dbg.scale_value
mov byte [ebp - 0xd9], al
jmp 0x100035cc
mov dword [esp], 0xff
mov eax, dword [ebp - 0xbc]
lea edx, [ebx + 0x408]
xor ecx, ecx
call dbg.scale_value
mov byte [ebp - 0xda], al
jmp 0x1000356b
mov dword [esp], 0x7fff
mov eax, dword [ebp - 0xbc]
lea edx, [ebx + 0x3c0]
mov ecx, 0xffff8000
call dbg.scale_value
not eax
mov word [ebp - 0xe2], ax
jmp 0x1000350a
mov dword [esp], 0x7fff
mov eax, dword [ebp - 0xbc]
lea edx, [ebx + 0x378]
mov ecx, 0xffff8000
call dbg.scale_value
mov word [ebp - 0xe0], ax
jmp 0x100034a9
mov dword [esp], 0x7fff
mov eax, dword [ebp - 0xbc]
lea edx, [ebx + 0x2e8]
mov ecx, 0xffff8000
call dbg.scale_value
not eax
mov word [ebp - 0xde], ax
jmp 0x10003448
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], str.wait_failed_in_the_update_thread__ret__lu__error__lu_n
mov dword [esp + 0x14], eax
mov dword [esp + 8], str.hid_update_thread_proc
mov dword [esp + 4], 0x100074c0
mov dword [esp], 1
mov dword [ebp - 0xc8], ecx
call sym._wine_dbg_log.constprop.0
mov ecx, dword [ebp - 0xc8]
jmp 0x100036c3
xor esi, esi
jmp 0x1000331f
or esi, 1
jmp case.0x1000372a.0
or esi, 9
jmp case.0x1000372a.0
or esi, 8
jmp case.0x1000372a.0
or esi, 0xa
jmp case.0x1000372a.0
or esi, 2
jmp case.0x1000372a.0
or esi, 6
jmp case.0x1000372a.0
or esi, 4
jmp case.0x1000372a.0
or esi, 5
jmp case.0x1000372a.0