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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
cmp dword [ebp + 8], 0
je 0x4c0fed
cmp dword [ebp + 0xc], 0xffffffff
je 0x4c0e8d
cmp dword [ebp + 0x10], 0xffffffff
jne 0x4c0eac
cmp dword [ebp + 0x28], 0
je 0x4c0ea5
mov eax, dword [ebp + 0x28]
push eax
push 0
mov ecx, dword [ebp + 0x24]
push ecx
call fcn.0054bf90
add esp, 0xc
xor eax, eax
jmp 0x4c10df
mov edx, dword [ebp + 0x28]
shr edx, 9
mov dword [ebp - 0x2c], edx
push 0x1f
push 0
lea eax, [ebp - 0x28]
push eax
call fcn.0054bf90
add esp, 0xc
push 0xd
push 0
lea ecx, [ebp - 0x3c]
push ecx
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 edx, dword [ebp + 0x28]
and edx, 0xff
mov byte [ebp - 0x20], dl
mov eax, dword [ebp + 0x28]
shr eax, 8
and eax, 0xff
mov byte [ebp - 0x1f], al
mov ecx, dword [ebp + 0x28]
shr ecx, 0x10
and ecx, 0xff
mov byte [ebp - 0x1e], cl
mov edx, dword [ebp + 0x28]
shr edx, 0x18
and edx, 0xff
mov byte [ebp - 0x1d], dl
mov al, byte [ebp + 0x30]
mov byte [ebp - 0x1b], al
mov byte [ebp - 0x1c], 0x80
mov byte [ebp - 0x1a], 0x10
mov dword [ebp - 4], 0
jmp 0x4c0f3d
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0x10
jge 0x4c0f54
mov edx, dword [ebp + 0x2c]
add edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov cl, byte [edx]
mov byte [ebp + eax - 0x19], cl
jmp 0x4c0f34
mov byte [ebp - 0x22], 0
mov byte [ebp - 0x21], 5
push 0
lea edx, [ebp - 8]
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 - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4c0f82
xor eax, eax
jmp 0x4c10df
push 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp + 0x28]
push eax
mov ecx, dword [ebp + 0x24]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4c0faa
xor eax, eax
jmp 0x4c10df
push 0
lea eax, [ebp - 8]
push eax
push 0xd
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4c0fd0
xor eax, eax
jmp 0x4c10df
mov eax, dword [ebp - 0x30]
and eax, 0xff
test eax, eax
je 0x4c0fe3
xor eax, eax
jmp 0x4c10df
mov eax, 1
jmp 0x4c10df
push 0x50
push 0
lea ecx, [ebp - 0x90]
push ecx
call fcn.0054bf90
add esp, 0xc
mov word [ebp - 0x90], 0x2c
mov byte [ebp - 0x8d], 0
mov byte [ebp - 0x8c], 1
mov dl, byte [ebp + 0x30]
mov byte [ebp - 0x8b], dl
mov byte [ebp - 0x8a], 0x10
mov byte [ebp - 0x89], 0
mov byte [ebp - 0x88], 1
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], 0x12c
mov ecx, dword [ebp + 0x24]
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x78], 0x30
mov dword [ebp - 4], 0
jmp 0x4c1064
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0x10
jge 0x4c107b
mov eax, dword [ebp + 0x2c]
add eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
mov dl, byte [eax]
mov byte [ebp + ecx - 0x74], dl
jmp 0x4c105b
mov dword [ebp - 0x98], 0x50
mov dword [ebp - 0x94], 0
cmp dword [ebp + 0x20], 0xffffffff
je 0x4c10d9
push 0
lea eax, [ebp - 0x94]
push eax
mov ecx, dword [ebp - 0x98]
push ecx
lea edx, [ebp - 0x90]
push edx
mov eax, dword [ebp - 0x98]
push eax
lea ecx, [ebp - 0x90]
push ecx
push 0x4d014
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [ebp - 0x9c]
mov esp, ebp
pop ebp
ret