Function at 0x6de99b90
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 [0x6deb600c]
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 0x6de9a2ae
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 0x6de99f98
mov ebx, dword [ebp + 8]
jmp 0x6de99d66
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 0x6de99cd6
test byte [0x6dea0114], 4
jne 0x6de99f68
mov eax, dword [ebp - 0x5bc]
movzx edx, byte [ebx + 0x524]
movsx eax, byte [eax]
cmp eax, edx
je 0x6de99fd8
movzx edx, byte [ebx + 0xde8]
cmp eax, edx
je 0x6de99e20
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 0x6de99f98
test byte [0x6dea0114], 8
je 0x6de99c50
mov dword [esp], 0x6dea0114
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x6de99c50
test byte [0x6dea0114], 8
jne 0x6de9a184
mov eax, dword [ebp - 0x5a8]
xor edi, edi
test eax, eax
je 0x6de99c50
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 0x6de99de0
cmp dword [ebp - 0x5a8], edi
jbe 0x6de99e03
movzx eax, byte [esi + edi]
mov dword [esp], ebx
inc edi
mov dword [esp + 4], str.__02x
mov dword [esp + 8], eax
call sym._sprintf
add ebx, eax
test edi, 0xf
jne 0x6de99dd8
test byte [0x6dea0114], 8
jne 0x6de99f30
cmp dword [ebp - 0x5a8], edi
ja 0x6de99db0
mov ebx, dword [ebp + 8]
jmp 0x6de99c50
cmp dword [ebx + 0x4c8], 1
jne 0x6de99cfd
mov edi, dword [ebx + 0x4c0]
and edi, 1
je 0x6de99cfd
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 [0x6dea0114]
sub esp, 0x20
cmp eax, 0x110000
je 0x6de99ea2
test cl, 4
jne 0x6de9a2fa
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 0x6de9a2d0
mov dword [ebp - 0x5d0], 0
jmp 0x6de99f00
test cl, 1
jne 0x6de9a1c0
mov edx, dword [ebp - 0x5a8]
lea eax, [edx - 1]
mov dword [ebp - 0x5a8], eax
test edx, edx
je 0x6de9a1f4
mov edx, dword [ebx + 0xbb8]
lea edx, [edx + eax*4]
movzx eax, word [edx + 2]
cmp ax, 0xf
jne 0x6de99ee0
movzx edx, word [edx]
lea eax, [edx - 0x94]
cmp ax, 0x12
ja case.0x6de99f29.1
movzx eax, ax
jmp dword [eax*4 + 0x6dea7180]
lea eax, [ebp - 0x5a4]
mov dword [esp + 0xc], 0x6dea704e
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.hid_joystick_read
mov dword [esp + 4], 0x6dea0114
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de99e10
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], 0x6dea0114
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de99cd6
xor ebx, ebx
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x6de99fb6
cmp dword [eax + 0x34], 0x3e3
jne 0x6de9a3ae
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
lea esi, [esi]
nop
mov edx, dword [ebp - 0x5a8]
lea eax, [edx - 1]
mov dword [ebp - 0x5a8], eax
test edx, edx
je 0x6de9a100
mov edx, dword [ebx + 0xbb8]
lea edx, [edx + eax*4]
movzx eax, word [edx + 2]
cmp ax, 9
je 0x6de9a0a8
test byte [0x6dea0114], 1
je 0x6de9a048
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], 0x6dea0114
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de9a048
movzx eax, word [edx]
cmp ax, 0x7f
jbe 0x6de9a0f0
test byte [0x6dea0114], 1
je 0x6de9a048
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], 0x6dea0114
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de9a048
mov byte [ebp + eax - 0xa5], pe_nt_image_headers32
jmp 0x6de9a048
lea eax, [ebp - 0x4a4]
mov ecx, 0x13
mov edx, 0x6dea7754
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, 0x6dea7754
mov eax, ebx
call sym._enum_objects
mov edi, dword [ebx + 0x44]
test edi, edi
je 0x6de99cfd
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 0x6de99cfd
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_SetEvent]
sub esp, 4
jmp 0x6de99cfd
mov eax, dword [ebp - 0x5a8]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0x6dea7024
mov dword [esp + 0x14], eax
mov dword [esp + 8], str.hid_joystick_read
mov dword [esp + 4], 0x6dea0114
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de99d94
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], 0x6dea0114
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_4
movzx ecx, byte [0x6dea0114]
jmp 0x6de99ee9
mov dword [ebp - 0x5c8], esi
and esi, 0x10
je 0x6de9a2d0
mov eax, dword [ebp - 0x5c8]
test ah, 1
jne 0x6de9a221
mov edi, dword [ebx + 0xdf0]
test edi, edi
je 0x6de9a221
or ah, 2
mov dword [ebp - 0x5c8], eax
mov eax, dword [ebp - 0x5c8]
test ah, 4
jne 0x6de9a23f
mov esi, dword [ebx + 0xdf8]
test esi, esi
je 0x6de9a23f
or ah, 8
mov dword [ebp - 0x5c8], eax
mov eax, dword [ebp - 0x5c8]
test al, 0x40
jne 0x6de9a25b
mov edx, dword [ebx + 0xdf4]
test edx, edx
je 0x6de9a25b
or al, 0x80
mov dword [ebp - 0x5c8], eax
and ecx, 8
jne 0x6de9a367
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 0x6de9a29d
lea esi, [esi]
nop
cmp dword [eax + 0xc], edi
jne 0x6de9a293
mov dword [eax + 0x14c], esi
mov edx, dword [eax + 0x10]
lea eax, [edx - 0x10]
cmp ecx, edx
jne 0x6de9a288
mov eax, dword [ebp - 0x5c8]
mov dword [ebx + 0x930], eax
jmp 0x6de99cfd
mov eax, dword [0x6deb6008]
mov dword [esp + 4], 0
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
sete al
movzx eax, al
jmp 0x6de99c20
or dword [ebp - 0x5c8], 0x20
jmp 0x6de9a203
test cl, 1
je 0x6de99ee9
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.unimplemented_usage__04x_n
jmp 0x6de9a1cc
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], 0x6dea0114
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_4
movzx ecx, byte [0x6dea0114]
jmp 0x6de99ea2
or esi, 0x40
jmp 0x6de99ee9
or esi, 0x400
jmp 0x6de99ee9
or esi, 0x100
jmp 0x6de99ee9
or esi, 0x10
jmp 0x6de99ee9
or esi, 4
jmp 0x6de99ee9
mov dword [ebp - 0x5d0], edi
jmp 0x6de99ee9
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], 0x6dea0114
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 0x6de9a264
test byte [0x6dea0114], 4
jne 0x6de9a3e3
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 0x6de99fb6
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], 0x6dea0114
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_4
jmp 0x6de9a3b7