Function at 0x100188f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
push ebx
sub esp, 0x5d0
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0xb6c]
mov dword [ebp - 0x5a4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xba8]
mov dword [esp + 0xc], edi
lea edi, [ebp - 0x598]
mov dword [esp + 8], edi
mov dword [ebp - 0x5a0], eax
mov eax, dword [ebp + 8]
add eax, 0x93c
mov dword [esp + 4], eax
mov dword [ebp - 0x5a8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x938]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
mov ebx, eax
mov eax, dword [ebp + 8]
sub esp, 0x10
add eax, 0x20
mov dword [esp], eax
mov dword [ebp - 0x5b4], eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
add eax, 0x525
mov dword [ebp - 0x5ac], eax
and eax, 1
mov dword [ebp - 0x5b8], eax
sub esp, 4
test ebx, ebx
je 0x10018d40
mov ebx, dword [ebp + 8]
jmp 0x10018aa6
test dl, 4
je 0x100189a6
mov dword [edi], 0
add edi, 4
test dl, 2
je 0x100189b3
mov word [edi], 0
add edi, 2
test dl, 1
je 0x100189bb
mov byte [edi], 0
mov eax, dword [ebp - 0x5a4]
xor esi, esi
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x5a0]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x950]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x598]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0xbb4]
mov dword [esp + 4], esi
mov dword [esp], 0
mov dword [esp + 8], eax
call sym._HidP_GetUsagesEx_28
sub esp, 0x1c
cmp eax, 0x110000
je 0x10018a16
test byte [0x10022114], 4
jne 0x10018d10
mov eax, dword [ebp - 0x5a0]
movzx edx, byte [ebx + 0x524]
movsx eax, byte [eax]
cmp eax, edx
je 0x10018d80
movzx edx, byte [ebx + 0xde4]
cmp eax, edx
je 0x10018bc0
mov ecx, dword [ebp - 0x5a8]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
mov eax, dword [ebx + 0x51c]
mov dword [ebx + 0x94c], eax
lea eax, [ebp - 0x598]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x5a4]
mov dword [esp + 0x10], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x5a0]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x938]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x10018d40
test byte [0x10022114], 8
jne 0x10018b00
mov edx, dword [ebx + 0xbb8]
mov eax, dword [ebx + 0xbb4]
mov dword [ebp - 0x598], edx
shl edx, 2
cmp edx, 8
mov edi, eax
jb 0x10018998
test al, 1
jne 0x10018fe5
test edi, 2
jne 0x10018fbd
test edi, 4
jne 0x10018fd4
mov ecx, edx
xor eax, eax
shr ecx, 2
and edx, 3
rep stosd dword es:[edi], eax
jmp 0x10018998
mov dword [esp], 0x10022114
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x10018aaf
test byte [0x10022114], 8
mov eax, dword [ebp - 0x598]
jne 0x10018e9b
test eax, eax
je 0x10018aaf
mov dword [ebp + 8], ebx
mov edi, dword [ebp - 0x5a0]
xor esi, esi
lea esi, [esi]
lea edi, [edi]
mov dword [esp + 8], esi
mov eax, str._08lx
mov dword [esp + 4], eax
lea eax, [ebp - 0x594]
mov dword [esp], eax
call sym._sprintf
lea edx, [ebp - 0x594]
lea ebx, [edx + eax]
jmp 0x10018b78
cmp dword [ebp - 0x598], esi
jbe 0x10018b9c
movzx eax, byte [edi + esi]
inc esi
mov dword [esp], ebx
mov dword [esp + 8], eax
mov eax, str.__02x
mov dword [esp + 4], eax
call sym._sprintf
add ebx, eax
test esi, 0xf
jne 0x10018b70
test byte [0x10022114], 8
jne 0x10018cd8
cmp dword [ebp - 0x598], esi
ja 0x10018b40
mov ebx, dword [ebp + 8]
jmp 0x10018aaf
cmp dword [ebx + 0x4c8], 1
jne 0x10018a3d
mov eax, dword [ebx + 0x4c0]
and eax, 1
mov dword [ebp - 0x5bc], eax
je 0x10018a3d
mov eax, dword [ebp - 0x5a4]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x5a0]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x950]
mov dword [esp], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x59c]
mov dword [esp + 0x10], eax
mov eax, 0x22
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, 0xf
mov dword [esp + 4], eax
call sym._HidP_GetUsageValue_32
movzx edx, byte [0x10022114]
sub esp, 0x20
cmp eax, 0x110000
je 0x10018c48
test dl, 4
jne 0x1001901c
mov edi, dword [ebp - 0x598]
mov esi, dword [ebx + 0x930]
mov dword [ebp - 0x5b0], edi
lea eax, [edi - 1]
mov dword [ebp - 0x598], eax
and esi, 1
test edi, edi
je 0x10018fef
xor ecx, ecx
mov dword [ebp - 0x5b0], ecx
jmp 0x10018ca1
mov al, dl
and al, 1
jne 0x10018ed8
mov ecx, dword [ebp - 0x598]
lea eax, [ecx - 1]
test ecx, ecx
mov dword [ebp - 0x598], eax
je 0x10018f0f
mov ecx, dword [ebx + 0xbb4]
lea edi, [ecx + eax*4]
movzx ecx, word [ecx + eax*4 + 2]
cmp ecx, 0xf
jne 0x10018c80
movzx ecx, word [edi]
lea eax, [ecx - 0x94]
cmp ax, 0x12
movzx edi, ax
ja case.0x10018cca.1
jmp dword [edi*4 + 0x10028554]
mov dword [esp], 3
lea eax, [ebp - 0x594]
mov ebx, 0x10028422
mov dword [esp + 0x10], eax
mov eax, str.hid_joystick_read
mov dword [esp + 8], eax
mov eax, 0x10022114
mov dword [esp + 0xc], ebx
mov dword [esp + 4], eax
call sym._wine_dbg_log.constprop.0_4
jmp 0x10018ba9
mov dword [esp + 0x10], eax
mov edx, str.hid_joystick_read
mov ecx, 0x10022114
mov dword [esp + 8], edx
mov eax, str.HidP_GetUsagesEx_returned__lx_n
mov dword [esp + 0xc], eax
mov dword [esp + 4], ecx
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_4
jmp 0x10018a16
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x10018fb6
xor ebx, ebx
cmp dword [eax + 0x34], 0x3e3
jne 0x1001920d
mov eax, dword [ebp - 0x5b4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.kernel32.dll_GetTickCount]
mov edx, dword [ebx + 0x38]
lea edi, [ebp - 0x494]
mov esi, dword [ebp - 0x5ac]
mov dword [ebp - 0x14], eax
mov eax, dword [edx + 0x20]
lea ecx, [eax + 1]
mov dword [edx + 0x20], ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x4f8]
cmp eax, 8
mov ecx, eax
jae 0x10018e74
rep movsb byte es:[edi], byte [esi]
xor edx, edx
mov dword [ebp + edx - 0x94], ecx
mov dword [ebp + edx - 0x90], ecx
add edx, 8
cmp edx, 0x80
jb 0x10018db9
cmp eax, 8
mov edi, dword [ebp - 0x5ac]
mov edx, eax
jae 0x100191be
test dl, 4
je 0x10018df1
mov dword [edi], 0
add edi, 4
test dl, 2
je 0x10018dfe
mov word [edi], 0
add edi, 2
test dl, 1
je 0x10018e10
mov byte [edi], 0
lea esi, [esi]
lea edi, [edi]
mov edx, dword [ebp - 0x598]
lea eax, [edx - 1]
test edx, edx
mov dword [ebp - 0x598], eax
je 0x100190f0
mov edx, dword [ebx + 0xbb4]
lea ecx, [edx + eax*4]
movzx eax, word [edx + eax*4 + 2]
cmp eax, 9
je 0x10019098
test byte [0x10022114], 1
je 0x10018e10
mov dword [esp + 0x10], eax
mov eax, str.unimplemented_usage_page__x._n
mov dword [esp + 0xc], eax
mov eax, str.hid_joystick_read
mov dword [esp + 8], eax
mov eax, 0x10022114
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_4
jmp 0x10018e10
mov edx, edi
test dl, 4
je 0x10018db5
mov edx, dword [esi]
lea edi, [ebp - 0x490]
lea esi, [ebx + 0x529]
lea ecx, [eax - 4]
mov dword [ebp - 0x494], edx
jmp 0x10018db5
mov dword [esp + 0x14], eax
mov edx, str.hid_joystick_read
mov eax, str.iface__p__size__lu__report:_n
mov dword [esp + 0x10], ebx
mov ecx, 0x10022114
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_4
mov eax, dword [ebp - 0x598]
jmp 0x10018b23
mov dword [esp + 0x10], ecx
mov eax, str.unimplemented_usage_page__04x._n
mov dword [esp + 0xc], eax
mov dword [esp], 0
mov edx, str.hid_joystick_read
mov ecx, 0x10022114
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
call sym._wine_dbg_log.constprop.0_4
movzx edx, byte [0x10022114]
jmp 0x10018c8a
test esi, 0x10
je 0x10018fef
test esi, 0x100
jne 0x10018f33
mov eax, dword [ebx + 0xdec]
test eax, eax
je 0x10018f33
or esi, 0x200
test esi, 0x400
jne 0x10018f4b
mov eax, dword [ebx + 0xdf4]
test eax, eax
je 0x10018f4b
or esi, 0x800
test esi, 0x40
jne 0x10018f63
mov eax, dword [ebx + 0xdf0]
test eax, eax
je 0x10018f63
or esi, 0x80
and dl, 8
jne 0x1001917a
mov edx, dword [ebx + 0xcbc]
lea ecx, [ebx + 0xcbc]
mov edi, dword [ebp - 0x59c]
lea eax, [edx - 0x10]
cmp ecx, edx
je 0x10018fab
lea esi, [esi]
lea edi, [edi]
cmp dword [eax + 0xc], edi
jne 0x10018fa1
mov edx, dword [ebp - 0x5b0]
mov dword [eax + 0x14c], edx
mov edx, dword [eax + 0x10]
lea eax, [edx - 0x10]
cmp ecx, edx
jne 0x10018f90
mov dword [ebx + 0x930], esi
jmp 0x10018a3d
xor ebx, ebx
jmp 0x10018d62
mov word [edi], 0
add edi, 2
sub edx, 2
test edi, 4
je 0x10018aef
mov dword [edi], 0
sub edx, 4
add edi, 4
jmp 0x10018aef
mov byte [eax], 0
inc edi
dec edx
jmp 0x10018ad7
or esi, 0x20
jmp 0x10018f1b
mov al, dl
and al, 1
je 0x10018c8a
mov dword [esp + 0x10], ecx
mov edi, str.unimplemented_usage__04x_n
mov dword [esp + 0xc], edi
jmp 0x10018ee5
mov dword [esp + 0x10], eax
mov esi, str.HidP_GetUsageValue_EFFECT_BLOCK_INDEX_returned__lx_n
mov eax, 0x10022114
mov dword [esp + 0xc], esi
mov edi, str.hid_joystick_read
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_4
movzx edx, byte [0x10022114]
jmp 0x10018c48
or esi, 0x40
jmp 0x10018c8a
or esi, 0x400
jmp 0x10018c8a
or esi, 0x100
jmp 0x10018c8a
or esi, 0x10
jmp 0x10018c8a
or esi, 4
jmp 0x10018c8a
mov eax, dword [ebp - 0x5bc]
mov dword [ebp - 0x5b0], eax
jmp 0x10018c8a
movzx eax, word [ecx]
cmp eax, 0x7f
jbe 0x100190e0
test byte [0x10022114], 1
je 0x10018e10
mov ecx, str.ignoring_extraneous_button__d._n
mov esi, str.hid_joystick_read
mov dword [esp + 0x10], eax
mov edi, 0x10022114
mov dword [esp + 0xc], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_4
jmp 0x10018e10
mov dl, pe_nt_image_headers32
mov byte [ebp + eax - 0x95], dl
jmp 0x10018e10
lea eax, [ebp - 0x494]
mov ecx, 0x13
mov dword [esp + 4], eax
mov edx, 0x10029664
mov eax, ebx
mov dword [esp], sym._read_device_state_value
call sym._enum_objects
lea eax, [ebp - 0x494]
mov ecx, 0xc
mov dword [esp + 4], eax
mov edx, 0x10029664
mov eax, ebx
mov dword [esp], sym._check_device_state_button
call sym._enum_objects
mov esi, dword [ebx + 0x44]
test esi, esi
je 0x10018a3d
mov eax, dword [ebx + 0x4f8]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x5ac]
mov dword [esp + 4], eax
lea eax, [ebp - 0x494]
mov dword [esp], eax
call sym._memcmp
test eax, eax
je 0x10018a3d
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetEvent]
sub esp, 4
jmp 0x10018a3d
mov dword [esp + 0x18], esi
mov eax, dword [ebp - 0x5b0]
mov edi, str.effect__lu_state__x__device_state__x_n
mov dword [esp + 0xc], edi
mov dword [esp], 3
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x59c]
mov dword [esp + 0x10], eax
mov eax, str.hid_joystick_read
mov dword [esp + 8], eax
mov eax, 0x10022114
mov dword [esp + 4], eax
call sym._wine_dbg_log.constprop.0_4
jmp 0x10018f6c
mov eax, dword [ebp - 0x5b8]
test eax, eax
jne 0x10019204
test edi, 2
jne 0x100191f7
test edi, 4
jne 0x100191e9
mov ecx, edx
xor eax, eax
shr ecx, 2
and edx, 3
rep stosd dword es:[edi], eax
jmp 0x10018de3
mov dword [edi], 0
sub edx, 4
add edi, 4
jmp 0x100191d8
mov word [edi], 0
sub edx, 2
add edi, 2
jmp 0x100191d0
mov byte [edi], 0
lea edi, [edi + 1]
dec edx
jmp 0x100191c8
test byte [0x10022114], 4
jne 0x10019243
mov eax, dword [ebp + 8]
mov ebx, 0x8007001e
mov eax, dword [eax + 0x938]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp + 8]
mov edx, 0xffffffff
mov dword [eax + 0x938], edx
sub esp, 4
jmp 0x10018d62
mov eax, dword [eax + 0x34]
mov ecx, str.GetOverlappedResult_ReadFile_failed__error__lu_n
mov ebx, str.hid_joystick_read
mov dword [esp + 0xc], ecx
mov esi, 0x10022114
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp + 0x10], eax
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_4
jmp 0x10019216