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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
push edi
mov dword [ebp - 0x354], ecx
mov dword [ebp - 0x310], 0x3e
mov dword [ebp - 0x2c0], 0
mov dword [ebp - 0x2b0], 0
mov dword [ebp - 0x308], 0
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0xff
je 0x27fdc0
mov edx, dword [ebp + 0xc]
xor eax, eax
mov al, byte [edx]
cmp eax, 0xf3
je 0x27fdc0
mov eax, 0x7fffffff
jmp 0x28052e
mov ecx, dword [ebp - 0x354]
xor edx, edx
mov dl, byte [ecx + 0x810]
cmp edx, 1
je 0x27fdf0
mov eax, dword [ebp - 0x354]
xor ecx, ecx
mov cl, byte [eax + 0x810]
cmp ecx, 2
je 0x27fdf0
mov eax, 1
jmp 0x28052e
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 - 0x294]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov edx, dword [ebp - 0x354]
xor eax, eax
mov al, byte [edx + 0x810]
cmp eax, 1
jne 0x27fe53
push 4
push 0x2d8a58
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 - 0x354]
xor ecx, ecx
mov cl, byte [eax + 0x810]
cmp ecx, 2
jne 0x27fe91
push 4
push 0x2d8a60
lea edx, [ebp - 0x289]
push edx
call fcn.002a27c0
add esp, 0xc
push 0xc
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x283]
push ecx
call fcn.002a27c0
add esp, 0xc
mov byte [ebp - 0x284], 0
mov dl, byte [ebp - 0x284]
mov byte [ebp - 0x38], dl
mov byte [ebp - 0x285], 0
mov al, byte [ebp - 0x285]
mov byte [ebp - 0x39], al
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x291], ecx
mov edx, dword [ebp - 0x291]
mov dword [ebp - 0x45], edx
mov eax, dword [ebp + 0x10]
add eax, 0x3d
xor edx, edx
mov ecx, 0x3e
div ecx
mov dword [ebp - 0x2b4], eax
mov dword [ebp - 0x28d], 0
mov edx, dword [ebp - 0x28d]
mov dword [ebp - 0x41], edx
mov dword [ebp - 0x2a0], 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 - 0x2ac], eax
cmp dword [ebp - 0x2ac], 0xffffffff
jne 0x27ff86
mov ecx, dword [ebp - 0x2a0]
sub ecx, 1
mov dword [ebp - 0x2a0], ecx
cmp dword [ebp - 0x2a0], 0
je 0x27ff54
push 0x64
mov ecx, dword [ebp - 0x354]
add ecx, 0x814
call fcn.00264f2a
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x27fef5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x29c], eax
mov edx, dword [ebp - 0x29c]
push edx
push 0
mov eax, dword [ebp - 0x2ac]
push eax
mov ecx, dword [ebp - 0x354]
call fcn.0027fd2a
mov eax, dword [ebp - 0x29c]
jmp 0x28052e
lea ecx, [ebp - 0x304]
push ecx
mov edx, dword [ebp - 0x2ac]
push edx
call sub.HID.DLL_HidD_GetPreparsedData
and eax, 0xff
test eax, eax
je 0x280053
lea eax, [ebp - 0x350]
push eax
mov ecx, dword [ebp - 0x304]
push ecx
call sub.HID.DLL_HidP_GetCaps
cmp eax, 0x110000
jne 0x280015
mov dx, word [ebp - 0x34c]
mov word [ebp - 0x2a4], dx
mov eax, dword [ebp - 0x2a4]
and eax, 0xffff
sub eax, 1
mov word [ebp - 0x2b8], ax
mov cx, word [ebp - 0x34a]
mov word [ebp - 0x30c], cx
mov edx, dword [ebp - 0x30c]
and edx, 0xffff
sub edx, 1
mov word [ebp - 0x298], dx
mov eax, dword [ebp - 0x304]
push eax
call sub.HID.DLL_HidD_FreePreparsedData
jmp 0x280051
mov ecx, dword [ebp - 0x304]
push ecx
call sub.HID.DLL_HidD_FreePreparsedData
push 0x7ffffffe
push 1
mov edx, dword [ebp - 0x2ac]
push edx
mov ecx, dword [ebp - 0x354]
call fcn.0027fd2a
mov eax, dword [ebp - 0x2ac]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffe
jmp 0x28052e
jmp 0x280083
push 0x7ffffffe
push 1
mov ecx, dword [ebp - 0x2ac]
push ecx
mov ecx, dword [ebp - 0x354]
call fcn.0027fd2a
mov edx, dword [ebp - 0x2ac]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffe
jmp 0x28052e
mov dword [ebp - 0x28d], 0
mov eax, dword [ebp - 0x28d]
mov dword [ebp - 0x41], eax
mov ecx, dword [ebp - 0x298]
and ecx, 0xffff
mov edx, dword [ebp + 0x10]
lea eax, [edx + ecx - 1]
mov ecx, dword [ebp - 0x298]
and ecx, 0xffff
xor edx, edx
div ecx
mov dword [ebp - 0x2b4], eax
push 0x20
mov edx, dword [ebp - 0x2ac]
push edx
call sub.HID.DLL_HidD_SetNumInputBuffers
and eax, 0xff
test eax, eax
jne 0x280106
push 0x7ffffffe
push 1
mov eax, dword [ebp - 0x2ac]
push eax
mov ecx, dword [ebp - 0x354]
call fcn.0027fd2a
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffe
jmp 0x28052e
mov edx, dword [ebp - 0x354]
xor eax, eax
mov al, byte [edx + 0x810]
cmp eax, 1
jne 0x280146
push 0
lea ecx, [ebp - 0x2a8]
push ecx
mov edx, dword [ebp - 0x30c]
and edx, 0xffff
push edx
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x2b0], eax
mov edx, dword [ebp - 0x354]
xor eax, eax
mov al, byte [edx + 0x810]
cmp eax, 2
jne 0x280189
push 0
lea ecx, [ebp - 0x2a8]
push ecx
mov edx, dword [ebp - 0x30c]
and edx, 0xffff
push edx
lea eax, [ebp - 0x294]
push eax
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x2b0], eax
cmp dword [ebp - 0x2b0], 0
jne 0x2801cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x29c], eax
mov edx, dword [ebp - 0x29c]
push edx
push 2
mov eax, dword [ebp - 0x2ac]
push eax
mov ecx, dword [ebp - 0x354]
call fcn.0027fd2a
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x27feeb
mov edx, dword [ebp - 0x30c]
and edx, 0xffff
cmp dword [ebp - 0x2a8], edx
je 0x28020f
push 0x7ffffffd
push 3
mov eax, dword [ebp - 0x2ac]
push eax
mov ecx, dword [ebp - 0x354]
call fcn.0027fd2a
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffd
jmp 0x28052e
call fcn.002a55ba
mov dword [ebp - 0x4c], eax
mov edx, 1
test edx, edx
je 0x2802cb
push 0x3c
lea eax, [ebp - 0x2fc]
push eax
push 4
mov ecx, dword [ebp - 0x2ac]
push ecx
call sub.HID.DLL_HidD_GetIndexedString
and eax, 0xff
test eax, eax
jne 0x28027d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x29c], eax
mov edx, dword [ebp - 0x29c]
push edx
push 4
mov eax, dword [ebp - 0x2ac]
push eax
mov ecx, dword [ebp - 0x354]
call fcn.0027fd2a
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x27feeb
mov edx, dword [ebp - 0x2f6]
and edx, 0xff
cmp edx, 0x37
jne 0x280290
jmp 0x2802cb
call fcn.002a55ba
sub eax, dword [ebp - 0x4c]
cmp eax, 0x1388
jle 0x2802c6
mov eax, dword [ebp - 0x2ac]
push eax
mov ecx, dword [ebp - 0x354]
call fcn.0027fcf3
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x28052e
jmp 0x280217
mov dword [ebp - 0x300], 0
mov edx, dword [ebp + 0x10]
mov dword [ebp - 4], edx
mov dword [ebp - 0x2bc], 0
jmp 0x2802f6
mov eax, dword [ebp - 0x2bc]
add eax, 1
mov dword [ebp - 0x2bc], eax
mov ecx, dword [ebp - 0x2bc]
cmp ecx, dword [ebp - 0x2b4]
jae 0x280471
mov edx, dword [ebp - 0x298]
and edx, 0xffff
cmp dword [ebp - 4], edx
jae 0x280369
mov ecx, dword [ebp - 0x30c]
and ecx, 0xffff
xor eax, eax
lea edi, [ebp - 0x250]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0x14]
add ecx, dword [ebp - 0x300]
push ecx
lea edx, [ebp - 0x24f]
push edx
call fcn.002a27c0
add esp, 0xc
mov eax, dword [ebp - 0x300]
add eax, dword [ebp - 4]
mov dword [ebp - 0x300], eax
jmp 0x2803c3
mov byte [ebp - 0x250], 0
mov ecx, dword [ebp - 0x298]
and ecx, 0xffff
push ecx
mov edx, dword [ebp + 0x14]
add edx, dword [ebp - 0x300]
push edx
lea eax, [ebp - 0x24f]
push eax
call fcn.002a27c0
add esp, 0xc
mov ecx, dword [ebp - 0x298]
and ecx, 0xffff
mov edx, dword [ebp - 4]
sub edx, ecx
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x298]
and eax, 0xffff
mov ecx, dword [ebp - 0x300]
add ecx, eax
mov dword [ebp - 0x300], ecx
push 0
lea edx, [ebp - 0x2a8]
push edx
mov eax, dword [ebp - 0x30c]
and eax, 0xffff
push eax
lea ecx, [ebp - 0x250]
push ecx
mov edx, dword [ebp - 0x2ac]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x280429
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x29c], eax
mov eax, dword [ebp - 0x29c]
push eax
push 6
mov ecx, dword [ebp - 0x2ac]
push ecx
mov ecx, dword [ebp - 0x354]
call fcn.0027fd2a
mov edx, dword [ebp - 0x2ac]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x27feeb
mov eax, dword [ebp - 0x30c]
and eax, 0xffff
cmp dword [ebp - 0x2a8], eax
je 0x28046c
push 0x7ffffffb
push 7
mov ecx, dword [ebp - 0x2ac]
push ecx
mov ecx, dword [ebp - 0x354]
call fcn.0027fd2a
mov edx, dword [ebp - 0x2ac]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffb
jmp 0x28052e
jmp 0x2802e7
push 0
lea eax, [ebp - 0x2a8]
push eax
mov ecx, dword [ebp - 0x2a4]
and ecx, 0xffff
push ecx
lea edx, [ebp - 0x250]
push edx
mov eax, dword [ebp - 0x2ac]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x2804ca
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x64
mov ecx, dword [ebp - 0x354]
add ecx, 0x814
call fcn.00264f2a
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
jmp 0x28052e
mov edx, dword [ebp - 0x2a4]
and edx, 0xffff
cmp dword [ebp - 0x2a8], edx
je 0x28050b
push 0x7ffffffa
push 9
mov eax, dword [ebp - 0x2ac]
push eax
mov ecx, dword [ebp - 0x354]
call fcn.0027fd2a
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7ffffffa
jmp 0x28052e
mov edx, dword [ebp - 0x2ac]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x249]
and eax, 0xff
test eax, eax
je 0x28052c
or eax, 0xffffffff
jmp 0x28052e
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret 0x10