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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xac
mov eax, dword [ebp + 8]
cmp dword [eax + 0x4f40], 0
je 0x4c3078
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x4fac], 0xffffffff
je 0x4c2d98
mov edx, dword [ebp + 8]
cmp dword [edx + 0x4fb0], 0xffffffff
jne 0x4c2db7
cmp dword [ebp + 0x14], 0
je 0x4c2db0
mov eax, dword [ebp + 0x14]
push eax
push 0
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0054bf90
add esp, 0xc
xor eax, eax
jmp 0x4c329c
mov eax, dword [ebp + 0x14]
cdq
and edx, 0x1ff
add eax, edx
sar eax, 9
mov word [ebp - 0x2c], ax
push 0x1f
push 0
lea edx, [ebp - 0x24]
push edx
call fcn.0054bf90
add esp, 0xc
push 0xd
push 0
lea eax, [ebp - 0x3c]
push eax
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 ecx, dword [ebp + 0x14]
and ecx, 0xff
mov byte [ebp - 0x1c], cl
mov edx, dword [ebp + 0x14]
sar edx, 8
and edx, 0xff
mov byte [ebp - 0x1b], dl
mov eax, dword [ebp + 0x14]
sar eax, 0x10
and eax, 0xff
mov byte [ebp - 0x1a], al
mov ecx, dword [ebp + 0x14]
sar ecx, 0x18
and ecx, 0xff
mov byte [ebp - 0x19], cl
mov byte [ebp - 0x18], 0x80
mov edx, dword [ebp + 8]
mov al, byte [edx + 0x6cc4]
mov byte [ebp - 0x17], al
mov byte [ebp - 0x16], 0x10
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
test edx, edx
jne 0x4c2e59
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x16], 6
mov dword [ebp - 0x28], 0
jmp 0x4c2e6b
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0x10
jge 0x4c2e82
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x28]
mov al, byte [ecx]
mov byte [ebp + edx - 0x15], al
jmp 0x4c2e62
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x6cb8], 0xa
jle 0x4c2e9f
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x6cb8]
mov dword [ebp - 0xa4], eax
jmp 0x4c2ea9
mov dword [ebp - 0xa4], 0xa
mov ecx, dword [ebp - 0xa4]
sar ecx, 8
and ecx, 0xff
mov byte [ebp - 0x1e], cl
mov edx, dword [ebp + 8]
cmp dword [edx + 0x6cb8], 0xa
jle 0x4c2ed8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x6cb8]
mov dword [ebp - 0xa8], ecx
jmp 0x4c2ee2
mov dword [ebp - 0xa8], 0xa
mov edx, dword [ebp - 0xa8]
and edx, 0xff
mov byte [ebp - 0x1d], dl
push 0
lea eax, [ebp - 4]
push eax
push 0x1f
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4fb0]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4c2f1d
xor eax, eax
jmp 0x4c329c
cmp dword [ebp + 0x14], 0
je 0x4c2f51
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x4fac]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4c2f51
xor eax, eax
jmp 0x4c329c
push 0
lea eax, [ebp - 4]
push eax
push 0xd
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4fac]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4c2f7d
xor eax, eax
jmp 0x4c329c
mov ecx, dword [ebp - 0x30]
and ecx, 0xff
test ecx, ecx
je 0x4c2f91
xor eax, eax
jmp 0x4c329c
mov edx, dword [ebp + 0xc]
xor eax, eax
mov al, byte [edx]
cmp eax, 0xd3
jne 0x4c2fc7
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x5974], 0x100
jne 0x4c2fc7
push 2
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 0
call fcn.004c32a0
add esp, 0x10
jmp 0x4c306e
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
cmp edx, 0xd3
jne 0x4c2ffb
mov eax, dword [ebp + 8]
cmp dword [eax + 0x5974], 0x200
jne 0x4c2ffb
push 3
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0
call fcn.004c32a0
add esp, 0x10
jmp 0x4c306e
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0xd3
jne 0x4c303c
mov edx, dword [ebp + 8]
cmp dword [edx + 0x5974], 0x3ff
jl 0x4c303c
mov eax, dword [ebp + 8]
cmp dword [eax + 0x5974], 0x421
jg 0x4c303c
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0
call fcn.004c3589
add esp, 0xc
jmp 0x4c306e
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0xd3
jne 0x4c306e
mov edx, dword [ebp + 8]
cmp dword [edx + 0x5974], 0x800
jne 0x4c306e
push 5
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 0
call fcn.004c32a0
add esp, 0x10
mov eax, 1
jmp 0x4c329c
mov dword [ebp - 0x94], 0
mov dword [ebp - 0xa0], 0
push 0x50
push 0
lea edx, [ebp - 0x90]
push edx
call fcn.0054bf90
add esp, 0xc
mov word [ebp - 0x90], 0x2c
mov byte [ebp - 0x8d], 0
mov byte [ebp - 0x8c], 1
mov byte [ebp - 0x8b], 0
mov byte [ebp - 0x8a], 0x10
mov byte [ebp - 0x89], 0
mov byte [ebp - 0x88], 1
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x6cb8], 0x1e
jle 0x4c30f8
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x6cb8]
mov dword [ebp - 0xac], eax
jmp 0x4c3102
mov dword [ebp - 0xac], 0x1e
mov ecx, dword [ebp - 0xac]
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x7c], edx
mov dword [ebp - 0x78], 0x30
mov dword [ebp - 0x9c], 0
jmp 0x4c3133
mov eax, dword [ebp - 0x9c]
add eax, 1
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x9c], 0x10
jge 0x4c3153
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x9c]
mov edx, dword [ebp - 0x9c]
mov al, byte [ecx]
mov byte [ebp + edx - 0x74], al
jmp 0x4c3124
mov dword [ebp - 0x98], 0x50
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x4fbc], 0xffffffff
je 0x4c31b9
push 0
lea edx, [ebp - 0x94]
push edx
mov eax, dword [ebp - 0x98]
push eax
lea ecx, [ebp - 0x90]
push ecx
mov edx, dword [ebp - 0x98]
push edx
lea eax, [ebp - 0x90]
push eax
push 0x4d014
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x4fbc]
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4fbc]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov edx, dword [ebp + 0xc]
xor eax, eax
mov al, byte [edx]
cmp eax, 0xd3
jne 0x4c31ef
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x5974], 0x100
jne 0x4c31ef
push 2
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 0
call fcn.004c32a0
add esp, 0x10
jmp 0x4c3296
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
cmp edx, 0xd3
jne 0x4c3223
mov eax, dword [ebp + 8]
cmp dword [eax + 0x5974], 0x200
jne 0x4c3223
push 3
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0
call fcn.004c32a0
add esp, 0x10
jmp 0x4c3296
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0xd3
jne 0x4c3264
mov edx, dword [ebp + 8]
cmp dword [edx + 0x5974], 0x3ff
jl 0x4c3264
mov eax, dword [ebp + 8]
cmp dword [eax + 0x5974], 0x421
jg 0x4c3264
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0
call fcn.004c3589
add esp, 0xc
jmp 0x4c3296
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0xd3
jne 0x4c3296
mov edx, dword [ebp + 8]
cmp dword [edx + 0x5974], 0x800
jne 0x4c3296
push 5
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 0
call fcn.004c32a0
add esp, 0x10
mov eax, dword [ebp - 0xa0]
mov esp, ebp
pop ebp
ret