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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0xd4
jne 0x4c39ba
mov edx, dword [ebp + 8]
cmp dword [edx + 0x5974], 0x100
jne 0x4c39ba
push 2
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 1
call fcn.004c32a0
add esp, 0x10
jmp 0x4c3a60
mov edx, dword [ebp + 0xc]
xor eax, eax
mov al, byte [edx]
cmp eax, 0xd4
jne 0x4c39ed
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x5974], 0x200
jne 0x4c39ed
push 3
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 1
call fcn.004c32a0
add esp, 0x10
jmp 0x4c3a60
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
cmp edx, 0xd4
jne 0x4c3a2e
mov eax, dword [ebp + 8]
cmp dword [eax + 0x5974], 0x3ff
jl 0x4c3a2e
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x5974], 0x421
jg 0x4c3a2e
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 1
call fcn.004c3589
add esp, 0xc
jmp 0x4c3a60
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
cmp edx, 0xd4
jne 0x4c3a60
mov eax, dword [ebp + 8]
cmp dword [eax + 0x5974], 0x800
jne 0x4c3a60
push 5
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 1
call fcn.004c32a0
add esp, 0x10
mov eax, dword [ebp + 8]
cmp dword [eax + 0x4f40], 0
je 0x4c3c39
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x4fac], 0xffffffff
je 0x4c3a88
mov edx, dword [ebp + 8]
cmp dword [edx + 0x4fb0], 0xffffffff
jne 0x4c3aa7
cmp dword [ebp + 0x14], 0
je 0x4c3aa0
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 0x4c3d5c
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 edx, dword [ebp + 0xc]
xor eax, eax
mov al, byte [edx]
cmp eax, 0xd4
jne 0x4c3b3c
mov ecx, dword [ebp + 8]
mov dl, byte [ecx + 0x6cc4]
mov byte [ebp - 0x17], dl
mov byte [ebp - 0x16], 0x10
mov dword [ebp - 0x28], 0
jmp 0x4c3b52
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0x10
jge 0x4c3b69
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 0x4c3b49
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x6cb8]
sar edx, 8
and edx, 0xff
mov byte [ebp - 0x1e], dl
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x6cb8]
and ecx, 0xff
mov byte [ebp - 0x1d], cl
push 0
lea edx, [ebp - 4]
push edx
push 0x1f
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x4fb0]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4c3bbc
xor eax, eax
jmp 0x4c3d5c
cmp dword [ebp + 0x14], 0
je 0x4c3bf0
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4fb0]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4c3bf0
xor eax, eax
jmp 0x4c3d5c
push 0
lea edx, [ebp - 4]
push edx
push 0xd
lea eax, [ebp - 0x3c]
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 0x4c3c1c
xor eax, eax
jmp 0x4c3d5c
mov eax, dword [ebp - 0x30]
and eax, 0xff
test eax, eax
je 0x4c3c2f
xor eax, eax
jmp 0x4c3d5c
mov eax, 1
jmp 0x4c3d5c
mov dword [ebp - 0x94], 0
mov dword [ebp - 0xa0], 0
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 byte [ebp - 0x8b], 0
mov byte [ebp - 0x8a], 0x10
mov byte [ebp - 0x89], 0
mov byte [ebp - 0x88], 0
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0x84], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x6cb8]
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 0x4c3cd0
mov eax, dword [ebp - 0x9c]
add eax, 1
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x9c], 0x10
jge 0x4c3cf0
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 0x4c3cc1
mov dword [ebp - 0x98], 0x50
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x4fbc], 0xffffffff
je 0x4c3d56
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 eax, dword [ebp - 0xa0]
mov esp, ebp
pop ebp
ret