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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
cmp dword [ebp + 8], 0
je 0x4beca7
mov eax, dword [ebp + 0x2c]
shr eax, 9
mov dword [ebp - 0x28], eax
push 0x1f
push 0
lea ecx, [ebp - 0x24]
push ecx
call fcn.0054bf90
add esp, 0xc
push 0xd
push 0
lea edx, [ebp - 0x38]
push edx
call fcn.0054bf90
add esp, 0xc
mov byte [ebp - 0x24], 0x55
mov byte [ebp - 0x23], 0x53
mov byte [ebp - 0x22], 0x42
mov byte [ebp - 0x21], 0x43
mov eax, dword [ebp + 0x2c]
and eax, 0xff
mov byte [ebp - 0x1c], al
mov ecx, dword [ebp + 0x2c]
shr ecx, 8
and ecx, 0xff
mov byte [ebp - 0x1b], cl
mov edx, dword [ebp + 0x2c]
shr edx, 0x10
and edx, 0xff
mov byte [ebp - 0x1a], dl
mov eax, dword [ebp + 0x2c]
shr eax, 0x18
and eax, 0xff
mov byte [ebp - 0x19], al
mov byte [ebp - 0x17], 0
mov byte [ebp - 0x16], 0xa
mov cl, byte [ebp + 0x30]
mov byte [ebp - 0x15], cl
mov edx, dword [ebp + 0x24]
shr edx, 0x18
mov byte [ebp - 0x13], dl
mov eax, dword [ebp + 0x24]
shr eax, 0x10
mov byte [ebp - 0x12], al
mov ecx, dword [ebp + 0x24]
shr ecx, 8
mov byte [ebp - 0x11], cl
mov edx, dword [ebp + 0x24]
and edx, 0xff
mov byte [ebp - 0x10], dl
mov eax, dword [ebp - 0x28]
shr eax, 8
mov byte [ebp - 0xe], al
mov ecx, dword [ebp - 0x28]
and ecx, 0xff
mov byte [ebp - 0xd], cl
mov byte [ebp - 0x1e], 0
mov byte [ebp - 0x1d], 2
push 0
lea edx, [ebp - 4]
push edx
push 0x1f
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x4bec3c
xor eax, eax
jmp 0x4bedde
push 0
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp + 0x2c]
push eax
mov ecx, dword [ebp + 0x28]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x4bec64
xor eax, eax
jmp 0x4bedde
push 0
lea eax, [ebp - 4]
push eax
push 0xd
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x4bec8a
xor eax, eax
jmp 0x4bedde
mov eax, dword [ebp - 0x2c]
and eax, 0xff
test eax, eax
je 0x4bec9d
xor eax, eax
jmp 0x4bedde
mov eax, 1
jmp 0x4bedde
push 0x50
push 0
lea ecx, [ebp - 0x8c]
push ecx
call fcn.0054bf90
add esp, 0xc
mov word [ebp - 0x8c], 0x2c
mov byte [ebp - 0x89], 0
mov byte [ebp - 0x88], 1
mov byte [ebp - 0x87], 0
mov byte [ebp - 0x86], 0x10
mov byte [ebp - 0x85], 0
mov byte [ebp - 0x84], 0
mov edx, dword [ebp + 0x2c]
mov dword [ebp - 0x80], edx
mov dword [ebp - 0x7c], 0x14
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], 0x30
mov cl, byte [ebp + 0x30]
mov byte [ebp - 0x70], cl
mov edx, dword [ebp + 0x24]
shr edx, 0x10
and edx, 0xffff
shr edx, 8
mov byte [ebp - 0x6e], dl
mov eax, dword [ebp + 0x24]
shr eax, 0x10
and eax, 0xffff
and eax, 0xff
mov byte [ebp - 0x6d], al
mov ecx, dword [ebp + 0x24]
and ecx, 0xffff
and ecx, 0xffff
shr ecx, 8
mov byte [ebp - 0x6c], cl
mov edx, dword [ebp + 0x24]
and edx, 0xffff
and edx, 0xffff
and edx, 0xff
mov byte [ebp - 0x6b], dl
mov eax, dword [ebp + 0x2c]
shr eax, 0xb
shr eax, 8
mov byte [ebp - 0x69], al
mov ecx, dword [ebp + 0x2c]
shr ecx, 0xb
and ecx, 0xff
mov byte [ebp - 0x68], cl
mov dword [ebp - 0x94], 0x50
mov dword [ebp - 0x90], 0
cmp dword [ebp + 0x20], 0xffffffff
je 0x4bedd8
push 0
lea edx, [ebp - 0x90]
push edx
mov eax, dword [ebp - 0x94]
push eax
lea ecx, [ebp - 0x8c]
push ecx
mov edx, dword [ebp - 0x94]
push edx
lea eax, [ebp - 0x8c]
push eax
push 0x4d014
mov ecx, dword [ebp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x98], eax
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [ebp - 0x98]
mov esp, ebp
pop ebp
ret