Function at 0x280535
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x11ec4
call fcn.002a2790
push edi
mov dword [ebp - 0x11ec0], ecx
mov dword [ebp - 0x11e60], 0
mov dword [ebp - 0x11e78], 0
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0xff
je 0x280584
mov edx, dword [ebp + 0xc]
xor eax, eax
mov al, byte [edx]
cmp eax, 0xf3
je 0x280584
mov eax, 0x7fffffff
jmp 0x280eaa
mov ecx, dword [ebp - 0x11ec0]
xor edx, edx
mov dl, byte [ecx + 0x810]
cmp edx, 1
je 0x2805b4
mov eax, dword [ebp - 0x11ec0]
xor ecx, ecx
mov cl, byte [eax + 0x810]
cmp ecx, 2
je 0x2805b4
mov eax, 1
jmp 0x280eaa
mov ecx, 0x10
xor eax, eax
lea edi, [ebp - 0x48]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov ecx, 0x10
xor eax, eax
lea edi, [ebp - 0x11e44]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov edx, dword [ebp - 0x11ec0]
xor eax, eax
mov al, byte [edx + 0x810]
cmp eax, 1
jne 0x280617
push 4
push str.TORM
lea ecx, [ebp - 0x3d]
push ecx
call fcn.002a27c0
add esp, 0xc
mov edx, dword [ebp + 0xc]
mov ax, word [edx + 1]
mov word [ebp - 0x47], ax
push 9
mov ecx, dword [ebp + 0xc]
add ecx, 3
push ecx
lea edx, [ebp - 0x37]
push edx
call fcn.002a27c0
add esp, 0xc
mov eax, dword [ebp - 0x11ec0]
xor ecx, ecx
mov cl, byte [eax + 0x810]
cmp ecx, 2
jne 0x280655
push 4
push str.PMAP
lea edx, [ebp - 0x11e39]
push edx
call fcn.002a27c0
add esp, 0xc
push 0xc
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x11e33]
push ecx
call fcn.002a27c0
add esp, 0xc
mov byte [ebp - 0x11e34], 0
mov dl, byte [ebp - 0x11e34]
mov byte [ebp - 0x38], dl
mov byte [ebp - 0x11e35], 1
mov al, byte [ebp - 0x11e35]
mov byte [ebp - 0x39], al
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x11e41], ecx
mov edx, dword [ebp - 0x11e41]
mov dword [ebp - 0x45], edx
mov dword [ebp - 0x11e50], 0xa
push 0
push 0x20000000
push 3
push 0
push 3
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x11e5c], eax
cmp dword [ebp - 0x11e5c], 0xffffffff
jne 0x28072f
mov ecx, dword [ebp - 0x11e50]
sub ecx, 1
mov dword [ebp - 0x11e50], ecx
cmp dword [ebp - 0x11e50], 0
je 0x2806fd
push 0x64
mov ecx, dword [ebp - 0x11ec0]
add ecx, 0x814
call fcn.00264f2a
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push str._nRe_try_CreateFile_...
call fcn.002a5638
add esp, 4
jmp 0x280691
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x11e4c], eax
mov edx, dword [ebp - 0x11e4c]
push edx
push 0
mov eax, dword [ebp - 0x11e5c]
push eax
mov ecx, dword [ebp - 0x11ec0]
call fcn.0027fd2a
mov eax, dword [ebp - 0x11e4c]
jmp 0x280eaa
lea ecx, [ebp - 0x11e74]
push ecx
mov edx, dword [ebp - 0x11e5c]
push edx
call sub.HID.DLL_HidD_GetPreparsedData
and eax, 0xff
test eax, eax
je 0x2807fc
lea eax, [ebp - 0x11ebc]
push eax
mov ecx, dword [ebp - 0x11e74]
push ecx
call sub.HID.DLL_HidP_GetCaps
cmp eax, 0x110000
jne 0x2807be
mov dx, word [ebp - 0x11eb8]
mov word [ebp - 0x11e54], dx
mov eax, dword [ebp - 0x11e54]
and eax, 0xffff
sub eax, 1
mov word [ebp - 0x11e68], ax
mov cx, word [ebp - 0x11eb6]
mov word [ebp - 0x11e7c], cx
mov edx, dword [ebp - 0x11e7c]
and edx, 0xffff
sub edx, 1
mov word [ebp - 0x11e48], dx
mov eax, dword [ebp - 0x11e74]
push eax
call sub.HID.DLL_HidD_FreePreparsedData
jmp 0x2807fa
mov ecx, dword [ebp - 0x11e74]
push ecx
call sub.HID.DLL_HidD_FreePreparsedData
push 0x7ffffffe
push 1
mov edx, dword [ebp - 0x11e5c]
push edx
mov ecx, dword [ebp - 0x11ec0]
call fcn.0027fd2a
mov eax, dword [ebp - 0x11e5c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffe
jmp 0x280eaa
jmp 0x28082c
push 0x7ffffffe
push 1
mov ecx, dword [ebp - 0x11e5c]
push ecx
mov ecx, dword [ebp - 0x11ec0]
call fcn.0027fd2a
mov edx, dword [ebp - 0x11e5c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffe
jmp 0x280eaa
mov eax, dword [ebp - 0x11ec0]
xor ecx, ecx
mov cl, byte [eax + 0x810]
cmp ecx, 1
jne 0x280880
mov eax, dword [ebp - 0x11e68]
and eax, 0xffff
add eax, 0x1ff
mov ecx, dword [ebp - 0x11e68]
and ecx, 0xffff
cdq
idiv ecx
mov dword [ebp - 0x41], eax
mov edx, dword [ebp + 0x10]
add edx, 0x1ff
shr edx, 9
imul edx, dword [ebp - 0x41]
mov dword [ebp - 0x11e64], edx
mov eax, dword [ebp - 0x11e64]
mov dword [ebp - 0x41], eax
mov ecx, dword [ebp - 0x11ec0]
xor edx, edx
mov dl, byte [ecx + 0x810]
cmp edx, 2
jne 0x2808dd
mov eax, dword [ebp - 0x11e68]
and eax, 0xffff
add eax, 0x1ff
mov ecx, dword [ebp - 0x11e68]
and ecx, 0xffff
cdq
idiv ecx
mov dword [ebp - 0x11e3d], eax
mov edx, dword [ebp + 0x10]
add edx, 0x1ff
shr edx, 9
imul edx, dword [ebp - 0x11e3d]
mov dword [ebp - 0x11e64], edx
mov eax, dword [ebp - 0x11e64]
mov dword [ebp - 0x11e3d], eax
mov dword [ebp - 0x11e6c], 0x100
mov ecx, 1
test ecx, ecx
je 0x280958
mov edx, dword [ebp - 0x11e6c]
push edx
mov eax, dword [ebp - 0x11e5c]
push eax
call sub.HID.DLL_HidD_SetNumInputBuffers
and eax, 0xff
test eax, eax
je 0x28090e
jmp 0x280958
cmp dword [ebp - 0x11e6c], 0x20
jne 0x280947
push 0x7ffffffe
push 1
mov ecx, dword [ebp - 0x11e5c]
push ecx
mov ecx, dword [ebp - 0x11ec0]
call fcn.0027fd2a
mov edx, dword [ebp - 0x11e5c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffe
jmp 0x280eaa
mov eax, dword [ebp - 0x11e6c]
sub eax, 8
mov dword [ebp - 0x11e6c], eax
jmp 0x2808e7
mov ecx, dword [ebp - 0x11ec0]
xor edx, edx
mov dl, byte [ecx + 0x810]
cmp edx, 1
jne 0x280998
push 0
lea eax, [ebp - 0x11e58]
push eax
mov ecx, dword [ebp - 0x11e7c]
and ecx, 0xffff
push ecx
lea edx, [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x11e5c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x11e60], eax
mov ecx, dword [ebp - 0x11ec0]
xor edx, edx
mov dl, byte [ecx + 0x810]
cmp edx, 2
jne 0x2809db
push 0
lea eax, [ebp - 0x11e58]
push eax
mov ecx, dword [ebp - 0x11e7c]
and ecx, 0xffff
push ecx
lea edx, [ebp - 0x11e44]
push edx
mov eax, dword [ebp - 0x11e5c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x11e60], eax
cmp dword [ebp - 0x11e60], 0
jne 0x280a1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x11e4c], eax
mov ecx, dword [ebp - 0x11e4c]
push ecx
push 2
mov edx, dword [ebp - 0x11e5c]
push edx
mov ecx, dword [ebp - 0x11ec0]
call fcn.0027fd2a
mov eax, dword [ebp - 0x11e5c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x280687
mov ecx, dword [ebp - 0x11e7c]
and ecx, 0xffff
cmp dword [ebp - 0x11e58], ecx
je 0x280a61
push 0x7ffffffd
push 3
mov edx, dword [ebp - 0x11e5c]
push edx
mov ecx, dword [ebp - 0x11ec0]
call fcn.0027fd2a
mov eax, dword [ebp - 0x11e5c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffd
jmp 0x280eaa
mov dword [ebp - 0x11e70], 0
cmp dword [ebp + 0x10], 0x10200
ja 0x280cb7
mov ecx, dword [ebp - 0x11e64]
add ecx, 1
mov edx, dword [ebp - 0x11e54]
and edx, 0xffff
imul ecx, edx
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0x11db7
jbe 0x280aa8
mov dword [ebp - 0x11ec4], 0x11db7
jmp 0x280ab1
mov eax, dword [ebp - 4]
mov dword [ebp - 0x11ec4], eax
mov ecx, dword [ebp - 0x11ec4]
mov dword [ebp - 4], ecx
push 0
lea edx, [ebp - 0x11e58]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x11e70]
lea edx, [ebp + ecx - 0x11e00]
push edx
mov eax, dword [ebp - 0x11e5c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x280b1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x11e4c], eax
mov ecx, dword [ebp - 0x11e4c]
push ecx
push 4
mov edx, dword [ebp - 0x11e5c]
push edx
mov ecx, dword [ebp - 0x11ec0]
call fcn.0027fd2a
mov eax, dword [ebp - 0x11e5c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x280687
mov ecx, dword [ebp - 0x11e70]
add ecx, dword [ebp - 0x11e58]
mov dword [ebp - 0x11e70], ecx
mov edx, dword [ebp - 4]
sub edx, dword [ebp - 0x11e58]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
jne 0x280aba
mov dword [ebp - 0x11e6c], 0
mov dword [ebp - 0x11e70], 0
mov eax, 1
test eax, eax
je 0x280c79
mov dword [ebp - 4], 0x200
mov ecx, 1
test ecx, ecx
je 0x280c5d
mov edx, dword [ebp - 0x11e68]
and edx, 0xffff
cmp dword [ebp - 4], edx
ja 0x280be0
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x11e54]
and ecx, 0xffff
mov edx, dword [ebp - 0x11e6c]
imul edx, ecx
lea eax, [ebp + edx - 0x11dff]
push eax
mov ecx, dword [ebp + 0x14]
add ecx, dword [ebp - 0x11e70]
push ecx
call fcn.002a27c0
add esp, 0xc
mov edx, dword [ebp - 0x11e6c]
add edx, 1
mov dword [ebp - 0x11e6c], edx
mov eax, dword [ebp - 0x11e70]
add eax, dword [ebp - 4]
mov dword [ebp - 0x11e70], eax
jmp 0x280c5d
mov ecx, dword [ebp - 0x11e68]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x11e54]
and edx, 0xffff
mov eax, dword [ebp - 0x11e6c]
imul eax, edx
lea ecx, [ebp + eax - 0x11dff]
push ecx
mov edx, dword [ebp + 0x14]
add edx, dword [ebp - 0x11e70]
push edx
call fcn.002a27c0
add esp, 0xc
mov eax, dword [ebp - 0x11e6c]
add eax, 1
mov dword [ebp - 0x11e6c], eax
mov ecx, dword [ebp - 0x11e68]
and ecx, 0xffff
mov edx, dword [ebp - 0x11e70]
add edx, ecx
mov dword [ebp - 0x11e70], edx
mov eax, dword [ebp - 0x11e68]
and eax, 0xffff
mov ecx, dword [ebp - 4]
sub ecx, eax
mov dword [ebp - 4], ecx
jmp 0x280b6f
cmp dword [ebp + 0x10], 0x200
ja 0x280c68
jmp 0x280c79
mov edx, dword [ebp + 0x10]
sub edx, 0x200
mov dword [ebp + 0x10], edx
jmp 0x280b5b
mov eax, dword [ebp - 0x11e5c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x11e54]
and ecx, 0xffff
mov edx, dword [ebp - 0x11e64]
imul edx, ecx
xor eax, eax
mov al, byte [ebp + edx - 0x11df9]
test eax, eax
je 0x280cb0
or eax, 0xffffffff
jmp 0x280eaa
xor eax, eax
jmp 0x280eaa
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x11e6c], 0
jmp 0x280cd8
mov edx, dword [ebp - 0x11e6c]
add edx, 1
mov dword [ebp - 0x11e6c], edx
mov eax, dword [ebp - 0x11e6c]
cmp eax, dword [ebp - 0x11e64]
jae 0x280ded
push 0
lea ecx, [ebp - 0x11e58]
push ecx
push 0x201
lea edx, [ebp - 0x11e00]
push edx
mov eax, dword [ebp - 0x11e5c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x280d49
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x11e4c], eax
mov ecx, dword [ebp - 0x11e4c]
push ecx
push 4
mov edx, dword [ebp - 0x11e5c]
push edx
mov ecx, dword [ebp - 0x11ec0]
call fcn.0027fd2a
mov eax, dword [ebp - 0x11e5c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x280687
cmp dword [ebp - 0x11e58], 0x201
je 0x280d85
push 0x7ffffffc
push 5
mov ecx, dword [ebp - 0x11e5c]
push ecx
mov ecx, dword [ebp - 0x11ec0]
call fcn.0027fd2a
mov edx, dword [ebp - 0x11e5c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffc
jmp 0x280eaa
cmp dword [ebp - 4], 0x200
jae 0x280dad
mov eax, dword [ebp - 4]
push eax
lea ecx, [ebp - 0x11dff]
push ecx
mov edx, dword [ebp + 0x14]
add edx, dword [ebp - 0x11e70]
push edx
call fcn.002a27c0
add esp, 0xc
jmp 0x280de8
push 0x200
lea eax, [ebp - 0x11dff]
push eax
mov ecx, dword [ebp + 0x14]
add ecx, dword [ebp - 0x11e70]
push ecx
call fcn.002a27c0
add esp, 0xc
mov edx, dword [ebp - 4]
sub edx, 0x200
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x11e70]
add eax, 0x200
mov dword [ebp - 0x11e70], eax
jmp 0x280cc9
push 0
lea ecx, [ebp - 0x11e58]
push ecx
mov edx, dword [ebp - 0x11e54]
and edx, 0xffff
push edx
lea eax, [ebp - 0x11e00]
push eax
mov ecx, dword [ebp - 0x11e5c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x280e46
mov edx, dword [ebp - 0x11e5c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x64
mov ecx, dword [ebp - 0x11ec0]
add ecx, 0x814
call fcn.00264f2a
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
jmp 0x280eaa
mov eax, dword [ebp - 0x11e54]
and eax, 0xffff
cmp dword [ebp - 0x11e58], eax
je 0x280e86
push 0x7ffffffa
push 9
mov ecx, dword [ebp - 0x11e5c]
push ecx
mov ecx, dword [ebp - 0x11ec0]
call fcn.0027fd2a
mov edx, dword [ebp - 0x11e5c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffa
jmp 0x280eaa
mov eax, dword [ebp - 0x11e5c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x11df9]
and ecx, 0xff
test ecx, ecx
je 0x280ea8
or eax, 0xffffffff
jmp 0x280eaa
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret 0x10