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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
cmp dword [ebp + 8], 0
je 0x4bef4a
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 cl, byte [ebp + 0x34]
mov byte [ebp - 0x17], cl
mov byte [ebp - 0x16], 0xa
mov dl, byte [ebp + 0x30]
mov byte [ebp - 0x15], dl
mov eax, dword [ebp + 0x24]
shr eax, 0x18
mov byte [ebp - 0x13], al
mov ecx, dword [ebp + 0x24]
shr ecx, 0x10
mov byte [ebp - 0x12], cl
mov edx, dword [ebp + 0x24]
shr edx, 8
mov byte [ebp - 0x11], dl
mov eax, dword [ebp + 0x24]
and eax, 0xff
mov byte [ebp - 0x10], al
mov ecx, dword [ebp - 0x28]
shr ecx, 8
mov byte [ebp - 0xe], cl
mov edx, dword [ebp - 0x28]
and edx, 0xff
mov byte [ebp - 0xd], dl
mov byte [ebp - 0x1e], 0
mov byte [ebp - 0x1d], 2
push 0
lea eax, [ebp - 4]
push eax
push 0x1f
lea ecx, [ebp - 0x24]
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 0x4beede
xor eax, eax
jmp 0x4bf07f
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp + 0x2c]
push ecx
mov edx, dword [ebp + 0x28]
push edx
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x4bef06
xor eax, eax
jmp 0x4bf07f
push 0
lea ecx, [ebp - 4]
push ecx
push 0xd
lea edx, [ebp - 0x38]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x4bef2c
xor eax, eax
jmp 0x4bf07f
mov ecx, dword [ebp - 0x2c]
and ecx, 0xff
test ecx, ecx
je 0x4bef40
xor eax, eax
jmp 0x4bf07f
mov eax, 1
jmp 0x4bf07f
push 0x50
push 0
lea edx, [ebp - 0x8c]
push edx
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 eax, dword [ebp + 0x2c]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], 0x14
mov ecx, dword [ebp + 0x28]
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x74], 0x30
mov dl, byte [ebp + 0x30]
mov byte [ebp - 0x70], dl
mov eax, dword [ebp + 0x24]
shr eax, 0x10
and eax, 0xffff
shr eax, 8
mov byte [ebp - 0x6e], al
mov ecx, dword [ebp + 0x24]
shr ecx, 0x10
and ecx, 0xffff
and ecx, 0xff
mov byte [ebp - 0x6d], cl
mov edx, dword [ebp + 0x24]
and edx, 0xffff
and edx, 0xffff
shr edx, 8
mov byte [ebp - 0x6c], dl
mov eax, dword [ebp + 0x24]
and eax, 0xffff
and eax, 0xffff
and eax, 0xff
mov byte [ebp - 0x6b], al
mov ecx, dword [ebp + 0x2c]
shr ecx, 9
shr ecx, 8
mov byte [ebp - 0x69], cl
mov edx, dword [ebp + 0x2c]
shr edx, 9
and edx, 0xff
mov byte [ebp - 0x68], dl
mov dword [ebp - 0x94], 0x50
mov dword [ebp - 0x90], 0
cmp dword [ebp + 0x20], 0xffffffff
je 0x4bf079
push 0
lea eax, [ebp - 0x90]
push eax
mov ecx, dword [ebp - 0x94]
push ecx
lea edx, [ebp - 0x8c]
push edx
mov eax, dword [ebp - 0x94]
push eax
lea ecx, [ebp - 0x8c]
push ecx
push 0x4d014
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [ebp - 0x98]
mov esp, ebp
pop ebp
ret