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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xec
cmp dword [ebp + 8], 0
je 0x4f2a4a
mov eax, dword [ebp + 0x2c]
shr eax, 9
mov dword [ebp - 0x2c], eax
mov dword [ebp - 8], 0x3e8
push 0x1f
push 0
lea ecx, [ebp - 0x28]
push ecx
call fcn.0054bf90
add esp, 0xc
push 0xd
push 0
lea edx, [ebp - 0x54]
push edx
call fcn.0054bf90
add esp, 0xc
mov byte [ebp - 0x28], 0x55
mov byte [ebp - 0x27], 0x53
mov byte [ebp - 0x26], 0x42
mov byte [ebp - 0x25], 0x43
mov eax, dword [ebp + 0x2c]
and eax, 0xff
mov byte [ebp - 0x20], al
mov ecx, dword [ebp + 0x2c]
shr ecx, 8
and ecx, 0xff
mov byte [ebp - 0x1f], cl
mov edx, dword [ebp + 0x2c]
shr edx, 0x10
and edx, 0xff
mov byte [ebp - 0x1e], dl
mov eax, dword [ebp + 0x2c]
shr eax, 0x18
and eax, 0xff
mov byte [ebp - 0x1d], al
mov byte [ebp - 0x1c], 0x80
mov cl, byte [ebp + 0x34]
mov byte [ebp - 0x1b], cl
mov byte [ebp - 0x1a], 0xa
mov dl, byte [ebp + 0x30]
mov byte [ebp - 0x19], dl
mov eax, dword [ebp + 0x24]
shr eax, 0x18
mov byte [ebp - 0x17], al
mov ecx, dword [ebp + 0x24]
shr ecx, 0x10
mov byte [ebp - 0x16], cl
mov edx, dword [ebp + 0x24]
shr edx, 8
mov byte [ebp - 0x15], dl
mov eax, dword [ebp + 0x24]
and eax, 0xff
mov byte [ebp - 0x14], al
mov ecx, dword [ebp - 0x2c]
shr ecx, 8
mov byte [ebp - 0x12], cl
mov edx, dword [ebp - 0x2c]
and edx, 0xff
mov byte [ebp - 0x11], dl
push 0x14
push 0
lea eax, [ebp - 0x68]
push eax
call fcn.0054bf90
add esp, 0xc
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
lea ecx, [ebp - 0x68]
push ecx
lea edx, [ebp - 4]
push edx
push 0x1f
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x6c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0x3e5
jne 0x4f28a7
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x88], eax
cmp dword [ebp - 0x88], 0
je 0x4f28a0
mov ecx, dword [ebp - 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4f2ba3
mov dword [ebp - 0x6c], 1
mov eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x6c], 0
jne 0x4f28be
xor eax, eax
jmp 0x4f2ba3
push 0x14
push 0
lea ecx, [ebp - 0x40]
push ecx
call fcn.0054bf90
add esp, 0xc
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
lea edx, [ebp - 0x40]
push edx
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp + 0x2c]
push ecx
mov edx, dword [ebp + 0x28]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x6c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0x3e5
jne 0x4f295f
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x8c], eax
cmp dword [ebp - 0x8c], 0
je 0x4f2958
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4f2ba3
mov dword [ebp - 0x6c], 1
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x6c], 0
jne 0x4f2976
xor eax, eax
jmp 0x4f2ba3
push 0x14
push 0
lea eax, [ebp - 0x80]
push eax
call fcn.0054bf90
add esp, 0xc
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0
lea ecx, [ebp - 0x80]
push ecx
lea edx, [ebp - 4]
push edx
push 0xd
lea eax, [ebp - 0x54]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x6c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0x3e5
jne 0x4f2a15
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0
je 0x4f2a0e
mov ecx, dword [ebp - 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4f2ba3
mov dword [ebp - 0x6c], 1
mov eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x6c], 0
jne 0x4f2a2c
xor eax, eax
jmp 0x4f2ba3
mov ecx, dword [ebp - 0x48]
and ecx, 0xff
test ecx, ecx
je 0x4f2a40
xor eax, eax
jmp 0x4f2ba3
mov eax, 1
jmp 0x4f2ba3
push 0x50
push 0
lea edx, [ebp - 0xe0]
push edx
call fcn.0054bf90
add esp, 0xc
mov word [ebp - 0xe0], 0x2c
mov byte [ebp - 0xdd], 0
mov byte [ebp - 0xdc], 1
mov al, byte [ebp + 0x34]
mov byte [ebp - 0xdb], al
mov byte [ebp - 0xda], 0x10
mov byte [ebp - 0xd9], 0
mov byte [ebp - 0xd8], 1
mov ecx, dword [ebp + 0x2c]
mov dword [ebp - 0xd4], ecx
mov dword [ebp - 0xd0], 0x12c
mov edx, dword [ebp + 0x28]
mov dword [ebp - 0xcc], edx
mov dword [ebp - 0xc8], 0x30
mov al, byte [ebp + 0x30]
mov byte [ebp - 0xc4], al
mov ecx, dword [ebp + 0x24]
shr ecx, 0x10
and ecx, 0xffff
shr ecx, 8
mov byte [ebp - 0xc2], cl
mov edx, dword [ebp + 0x24]
shr edx, 0x10
and edx, 0xffff
and edx, 0xff
mov byte [ebp - 0xc1], dl
mov eax, dword [ebp + 0x24]
and eax, 0xffff
and eax, 0xffff
shr eax, 8
mov byte [ebp - 0xc0], al
mov ecx, dword [ebp + 0x24]
and ecx, 0xffff
and ecx, 0xffff
and ecx, 0xff
mov byte [ebp - 0xbf], cl
mov edx, dword [ebp + 0x2c]
shr edx, 9
shr edx, 8
mov byte [ebp - 0xbd], dl
mov eax, dword [ebp + 0x2c]
shr eax, 9
and eax, 0xff
mov byte [ebp - 0xbc], al
mov dword [ebp - 0xe8], 0x50
mov dword [ebp - 0xe4], 0
cmp dword [ebp + 0x20], 0xffffffff
je 0x4f2b9d
push 0
lea ecx, [ebp - 0xe4]
push ecx
mov edx, dword [ebp - 0xe8]
push edx
lea eax, [ebp - 0xe0]
push eax
mov ecx, dword [ebp - 0xe8]
push ecx
lea edx, [ebp - 0xe0]
push edx
push 0x4d014
mov eax, dword [ebp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0xec], eax
mov ecx, dword [ebp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [ebp - 0xec]
mov esp, ebp
pop ebp
ret