Function at 0x6de98cc0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x5a8]
push ebx
sub esp, 0x5ec
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0xb70]
mov dword [ebp - 0x5c0], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xbac]
mov dword [esp + 8], esi
mov dword [esp + 0xc], 0
mov dword [ebp - 0x5bc], eax
mov eax, dword [ebp + 8]
add eax, 0x940
mov dword [esp + 4], eax
mov dword [ebp - 0x5c4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x93c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
mov esi, dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov ebx, eax
mov eax, dword [0x6deb80e4]
sub esp, 0x10
mov dword [esp + 4], 0
mov dword [esp], eax
call esi
mov edx, eax
sub esp, 8
mov eax, 1
test edx, edx
jne 0x6de993ee
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
add eax, 0x20
mov dword [ebp - 0x5cc], eax
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
sub esp, 4
test ebx, ebx
je 0x6de990d8
mov ebx, dword [ebp + 8]
jmp 0x6de98e96
mov eax, dword [ebx + 0xbbc]
mov edx, dword [ebx + 0xbb8]
mov dword [esp + 4], 0
mov dword [ebp - 0x5a8], eax
shl eax, 2
mov dword [esp + 8], eax
mov dword [esp], edx
call sym._memset
mov eax, dword [ebp - 0x5c0]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x5bc]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x954]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x5a8]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0xbb8]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
call sym._HidP_GetUsagesEx_28
sub esp, 0x1c
cmp eax, 0x110000
je 0x6de98e06
test byte [0x6dea2114], 4
jne 0x6de990a8
mov eax, dword [ebp - 0x5bc]
movzx edx, byte [ebx + 0x524]
movsx eax, byte [eax]
cmp eax, edx
je 0x6de99118
movzx edx, byte [ebx + 0xde8]
cmp eax, edx
je 0x6de98f58
mov ecx, dword [ebp - 0x5c4]
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 + 0x950], eax
lea eax, [ebp - 0x5a8]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x5c0]
mov dword [esp + 0x10], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x5bc]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x93c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x6de990d8
test byte [0x6dea2114], 8
je 0x6de98d80
mov dword [esp], 0x6dea2114
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x6de98d80
mov eax, dword [ebp - 0x5a8]
test byte [0x6dea2114], 8
jne 0x6de992c4
xor edi, edi
test eax, eax
je 0x6de98d80
mov dword [ebp + 8], ebx
mov esi, dword [ebp - 0x5bc]
lea esi, [esi]
lea eax, [ebp - 0x5a4]
mov dword [esp + 8], edi
mov dword [esp + 4], str._08lx
mov dword [esp], eax
call sym._sprintf
lea edx, [ebp - 0x5a4]
lea ebx, [edx + eax]
jmp 0x6de98f10
cmp dword [ebp - 0x5a8], edi
jbe 0x6de98f35
movzx eax, byte [esi + edi]
mov dword [esp], ebx
add edi, 1
mov dword [esp + 4], str.__02x
mov dword [esp + 8], eax
call sym._sprintf
add ebx, eax
test edi, 0xf
jne 0x6de98f08
test byte [0x6dea2114], 8
jne 0x6de99070
cmp dword [ebp - 0x5a8], edi
ja 0x6de98ee0
mov ebx, dword [ebp + 8]
jmp 0x6de98d80
cmp dword [ebx + 0x4c8], 1
jne 0x6de98e2d
mov edi, dword [ebx + 0x4c0]
and edi, 1
je 0x6de98e2d
mov eax, dword [ebp - 0x5c0]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x5bc]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x954]
mov dword [esp + 0xc], 0x22
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x5ac]
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0xf
mov dword [esp], 0
call sym._HidP_GetUsageValue_32
movzx ecx, byte [0x6dea2114]
sub esp, 0x20
cmp eax, 0x110000
je 0x6de98fda
test cl, 4
jne 0x6de9943a
mov edx, dword [ebp - 0x5a8]
mov esi, dword [ebx + 0x930]
lea eax, [edx - 1]
and esi, 1
mov dword [ebp - 0x5d0], edx
mov dword [ebp - 0x5c8], esi
mov dword [ebp - 0x5a8], eax
test edx, edx
je 0x6de99410
mov dword [ebp - 0x5d0], 0
jmp 0x6de99038
test cl, 1
jne 0x6de99300
mov edx, dword [ebp - 0x5a8]
lea eax, [edx - 1]
mov dword [ebp - 0x5a8], eax
test edx, edx
je 0x6de99334
mov edx, dword [ebx + 0xbb8]
lea edx, [edx + eax*4]
movzx eax, word [edx + 2]
cmp ax, 0xf
jne 0x6de99018
movzx edx, word [edx]
lea eax, [edx - 0x94]
cmp ax, 0x12
ja case.0x6de99061.1
movzx eax, ax
jmp dword [eax*4 + 0x6dea8604]
lea eax, [ebp - 0x5a4]
mov dword [esp + 0xc], 0x6dea84d2
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.hid_joystick_read
mov dword [esp + 4], 0x6dea2114
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de98f42
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.HidP_GetUsagesEx_returned__lx_n
mov dword [esp + 8], str.hid_joystick_read
mov dword [esp + 4], 0x6dea2114
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de98e06
xor ebx, ebx
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x6de990f6
cmp dword [eax + 0x34], 0x3e3
jne 0x6de994ee
mov eax, dword [ebp - 0x5cc]
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 esi, [ebx + 0x525]
mov dword [ebp - 0x20], eax
mov eax, dword [edx + 0x20]
lea ecx, [eax + 1]
mov dword [edx + 0x20], ecx
lea edx, [ebp - 0x4a4]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x4f8]
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [ebp - 0x5c8], eax
call sym._memcpy
lea edx, [ebp - 0xa4]
xor eax, eax
mov ecx, 0x20
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x5c8]
mov dword [esp + 4], 0
mov dword [esp], esi
mov dword [esp + 8], eax
call sym._memset
nop
lea esi, [esi]
mov edx, dword [ebp - 0x5a8]
lea eax, [edx - 1]
mov dword [ebp - 0x5a8], eax
test edx, edx
je 0x6de99240
mov edx, dword [ebx + 0xbb8]
lea edx, [edx + eax*4]
movzx eax, word [edx + 2]
cmp ax, 9
je 0x6de991e8
test byte [0x6dea2114], 1
je 0x6de99188
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.unimplemented_usage_page__x._n
mov dword [esp + 8], str.hid_joystick_read
mov dword [esp + 4], 0x6dea2114
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de99188
movzx eax, word [edx]
cmp ax, 0x7f
jbe 0x6de99230
test byte [0x6dea2114], 1
je 0x6de99188
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.ignoring_extraneous_button__d._n
mov dword [esp + 8], str.hid_joystick_read
mov dword [esp + 4], 0x6dea2114
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de99188
mov byte [ebp + eax - 0xa5], pe_nt_image_headers32
jmp 0x6de99188
lea eax, [ebp - 0x4a4]
mov ecx, 0x13
mov edx, 0x6dea9734
mov dword [esp], sym._read_device_state_value
mov dword [esp + 4], eax
mov eax, ebx
call sym._enum_objects
lea eax, [ebp - 0x4a4]
mov ecx, 0xc
mov dword [esp], sym._check_device_state_button
mov dword [esp + 4], eax
mov edx, 0x6dea9734
mov eax, ebx
call sym._enum_objects
mov edi, dword [ebx + 0x44]
test edi, edi
je 0x6de98e2d
mov eax, dword [ebx + 0x4f8]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
lea eax, [ebp - 0x4a4]
mov dword [esp], eax
call sym._memcmp
test eax, eax
je 0x6de98e2d
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_SetEvent]
sub esp, 4
jmp 0x6de98e2d
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0x6dea84a8
mov dword [esp + 8], str.hid_joystick_read
mov dword [esp + 4], 0x6dea2114
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_4
mov eax, dword [ebp - 0x5a8]
jmp 0x6de98eca
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.unimplemented_usage_page__04x._n
mov dword [esp + 8], str.hid_joystick_read
mov dword [esp + 4], 0x6dea2114
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_4
movzx ecx, byte [0x6dea2114]
jmp 0x6de99021
mov dword [ebp - 0x5c8], esi
and esi, 0x10
je 0x6de99410
mov eax, dword [ebp - 0x5c8]
test ah, 1
jne 0x6de99361
mov edi, dword [ebx + 0xdf0]
test edi, edi
je 0x6de99361
or ah, 2
mov dword [ebp - 0x5c8], eax
mov eax, dword [ebp - 0x5c8]
test ah, 4
jne 0x6de9937f
mov esi, dword [ebx + 0xdf8]
test esi, esi
je 0x6de9937f
or ah, 8
mov dword [ebp - 0x5c8], eax
mov eax, dword [ebp - 0x5c8]
test al, 0x40
jne 0x6de9939b
mov edx, dword [ebx + 0xdf4]
test edx, edx
je 0x6de9939b
or al, 0x80
mov dword [ebp - 0x5c8], eax
and ecx, 8
jne 0x6de994a7
mov edx, dword [ebx + 0xcc0]
lea ecx, [ebx + 0xcc0]
mov edi, dword [ebp - 0x5ac]
mov esi, dword [ebp - 0x5d0]
lea eax, [edx - 0x10]
cmp ecx, edx
je 0x6de993dd
nop
lea esi, [esi]
cmp dword [eax + 0xc], edi
jne 0x6de993d3
mov dword [eax + 0x14c], esi
mov edx, dword [eax + 0x10]
lea eax, [edx - 0x10]
cmp ecx, edx
jne 0x6de993c8
mov eax, dword [ebp - 0x5c8]
mov dword [ebx + 0x930], eax
jmp 0x6de98e2d
mov eax, dword [0x6deb80ec]
mov dword [esp + 4], 0
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
sete al
movzx eax, al
jmp 0x6de98d50
or dword [ebp - 0x5c8], 0x20
jmp 0x6de99343
test cl, 1
je 0x6de99021
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.unimplemented_usage__04x_n
jmp 0x6de9930c
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.HidP_GetUsageValue_EFFECT_BLOCK_INDEX_returned__lx_n
mov dword [esp + 8], str.hid_joystick_read
mov dword [esp + 4], 0x6dea2114
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_4
movzx ecx, byte [0x6dea2114]
jmp 0x6de98fda
or esi, 0x40
jmp 0x6de99021
or esi, 0x400
jmp 0x6de99021
or esi, 0x100
jmp 0x6de99021
or esi, 0x10
jmp 0x6de99021
or esi, 4
jmp 0x6de99021
mov dword [ebp - 0x5d0], edi
jmp 0x6de99021
mov eax, dword [ebp - 0x5c8]
mov dword [esp + 0xc], str.effect__lu_state__x__device_state__x_n
mov dword [esp + 8], str.hid_joystick_read
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x5d0]
mov dword [esp + 4], 0x6dea2114
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x5ac]
mov dword [esp], 3
mov dword [esp + 0x10], eax
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de993a4
test byte [0x6dea2114], 4
jne 0x6de99523
mov eax, dword [ebp + 8]
mov ebx, 0x8007001e
mov eax, dword [eax + 0x93c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp + 8]
sub esp, 4
mov dword [eax + 0x93c], 0xffffffff
jmp 0x6de990f6
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.GetOverlappedResult_ReadFile_failed__error__lu_n
mov dword [esp + 8], str.hid_joystick_read
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x6dea2114
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de994f7