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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
cmp dword [ebp + 8], 0
je 0x4d0576
mov eax, dword [ebp + 0x2c]
shr eax, 0xb
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 - 0x18], 0x80
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], 1
mov byte [ebp - 0x1d], 0x2c
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 0x4d050a
xor eax, eax
jmp 0x4d06ae
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 + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x4d0532
xor eax, eax
jmp 0x4d06ae
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 0x4d0558
xor eax, eax
jmp 0x4d06ae
mov ecx, dword [ebp - 0x2c]
and ecx, 0xff
test ecx, ecx
je 0x4d056c
xor eax, eax
jmp 0x4d06ae
mov eax, 1
jmp 0x4d06ae
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 al, byte [ebp + 0x34]
mov byte [ebp - 0x87], al
mov byte [ebp - 0x86], 0x10
mov byte [ebp - 0x85], 0
mov byte [ebp - 0x84], 1
mov ecx, dword [ebp + 0x2c]
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x7c], 0x12c
mov edx, dword [ebp + 0x28]
mov dword [ebp - 0x78], edx
mov dword [ebp - 0x74], 0x30
mov al, byte [ebp + 0x30]
mov byte [ebp - 0x70], al
mov ecx, dword [ebp + 0x24]
shr ecx, 0x10
and ecx, 0xffff
shr ecx, 8
mov byte [ebp - 0x6e], cl
mov edx, dword [ebp + 0x24]
shr edx, 0x10
and edx, 0xffff
and edx, 0xff
mov byte [ebp - 0x6d], dl
mov eax, dword [ebp + 0x24]
and eax, 0xffff
and eax, 0xffff
shr eax, 8
mov byte [ebp - 0x6c], al
mov ecx, dword [ebp + 0x24]
and ecx, 0xffff
and ecx, 0xffff
and ecx, 0xff
mov byte [ebp - 0x6b], cl
mov edx, dword [ebp + 0x2c]
shr edx, 0xb
shr edx, 8
mov byte [ebp - 0x69], dl
mov eax, dword [ebp + 0x2c]
shr eax, 0xb
and eax, 0xff
mov byte [ebp - 0x68], al
mov dword [ebp - 0x94], 0x50
mov dword [ebp - 0x90], 0
cmp dword [ebp + 0x20], 0xffffffff
je 0x4d06a8
push 0
lea ecx, [ebp - 0x90]
push ecx
mov edx, dword [ebp - 0x94]
push edx
lea eax, [ebp - 0x8c]
push eax
mov ecx, dword [ebp - 0x94]
push ecx
lea edx, [ebp - 0x8c]
push edx
push 0x4d014
mov eax, dword [ebp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x98], eax
mov ecx, dword [ebp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [ebp - 0x98]
mov esp, ebp
pop ebp
ret