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

Disassembly:
sub esp, 0x10c
mov eax, dword [0x541f38]
xor eax, esp
mov dword [esp + 0x108], eax
mov eax, dword [esp + 0x110]
push ebp
mov ebp, dword [esp + 0x118]
push esi
push 0xff
mov esi, ecx
lea ecx, [esp + 0x15]
push 0
push ecx
mov dword [esp + 0x18], eax
mov byte [esp + 0x1c], 0
call fcn.004d86e0
mov edx, dword [esi + 4]
add esp, 0xc
cmp edx, dword [esi + 8]
jb 0x4cf572
xor eax, eax
jmp 0x4cf841
cmp dword [esi + 0x2d4], 0
je 0x4cf56b
push ebx
lea eax, [esi + 0xc]
push 0x521160
push eax
call fcn.004dcab6
mov ebx, eax
add esp, 8
mov dword [esp + 0xc], ebx
test ebx, ebx
je 0x4cf840
mov ecx, dword [esi + 0x2cc]
push edi
mov edi, dword [esi + 0x2d4]
add edi, ecx
mov dword [esi + 0x2d0], ecx
cmp dword [edi], 0x2014b50
jne 0x4cf62c
movzx edx, word [edi + 0x1c]
push edx
lea eax, [edi + 0x2e]
push eax
push ebp
call fcn.004dd0f0
movzx ecx, word [edi + 0x1c]
mov byte [ecx + ebp], 0
movzx edx, word [edi + 0x1c]
add esp, 0xc
cmp byte [edx + ebp - 1], 0x2f
je 0x4cf5e8
movzx eax, word [edi + 0x1c]
cmp byte [eax + ebp - 1], 0x5c
jne 0x4cf63c
add dword [esi + 0x2cc], 0x2e
movzx ecx, word [edi + 0x1e]
mov eax, dword [esi + 0x2cc]
add eax, ecx
mov dword [esi + 0x2cc], eax
movzx edx, word [edi + 0x1c]
add eax, edx
mov dword [esi + 0x2cc], eax
movzx ecx, word [edi + 0x20]
inc dword [esi + 4]
add ecx, eax
mov dword [esi + 0x2cc], ecx
mov edi, dword [esi + 0x2d4]
add edi, ecx
cmp dword [edi], 0x2014b50
je 0x4cf5b8
push ebx
call fcn.004d9c64
add esp, 4
xor eax, eax
jmp 0x4cf83f
mov edx, dword [edi + 0x2a]
push 0
push edx
push ebx
call fcn.004da24f
mov eax, dword [esp + 0x1c]
push eax
push 1
lea ebx, [esi + 0x264]
push 0x1e
push ebx
call fcn.004d9f9d
add esp, 0x1c
cmp dword [ebx], 0x4034b50
je 0x4cf67c
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004d9c64
add esp, 4
xor eax, eax
jmp 0x4cf83f
movzx edx, word [esi + 0x280]
movzx eax, word [esi + 0x27e]
mov ecx, dword [edi + 0x2a]
add edx, eax
cmp dword [esp + 0x128], 0
lea ebx, [edx + ecx + 0x1e]
je 0x4cf6e5
push 0x2f
push ebp
call fcn.004dc890
add esp, 8
test eax, eax
je 0x4cf6c2
lea esp, [esp]
push 0x2f
push ebp
mov byte [eax], 0x5c
call fcn.004dc890
add esp, 8
test eax, eax
jne 0x4cf6b0
mov edx, dword [esp + 0x14]
push ebp
push edx
mov ecx, esi
call fcn.004cef60
lea eax, [esi + 0x138]
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.004dd4e4
add esp, 8
jmp 0x4cf72f
push ebp
lea edx, [esi + 0x138]
push 0x521be8
push edx
call fcn.004dd4e4
push 0x2f
push ebp
call fcn.004dc890
add esp, 0x14
test eax, eax
jne 0x4cf708
mov eax, ebp
push 0x2e
push eax
call fcn.004dc890
add esp, 8
test eax, eax
je 0x4cf72f
push eax
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
push str._s_s
push ecx
call fcn.004dd4e4
add esp, 0x10
cmp word [esi + 0x26c], 0
jne 0x4cf7e4
push 0
push ebx
mov ebx, dword [esp + 0x18]
push ebx
call fcn.004da24f
lea edx, [esp + 0x24]
push 0x521bec
push edx
call fcn.004dcab6
add esp, 0x14
mov dword [esp + 0x14], eax
test eax, eax
je 0x4cf62c
push 0xa000
xor ebx, ebx
call fcn.004d45ee
add esp, 4
mov ebp, eax
cmp dword [esi + 0x276], ebx
jbe 0x4cf7c5
mov eax, dword [esi + 0x276]
sub eax, ebx
cmp eax, 0xa000
jbe 0x4cf795
mov eax, 0xa000
mov ecx, dword [esp + 0x10]
push ecx
push eax
push 1
push ebp
call fcn.004d9f9d
add esp, 0x10
test eax, eax
je 0x4cf7c5
mov edx, dword [esp + 0x14]
push edx
push 1
push eax
push ebp
add ebx, eax
call fcn.004dc2b5
add esp, 0x10
cmp ebx, dword [esi + 0x276]
jb 0x4cf781
mov eax, dword [esp + 0x14]
push eax
call fcn.004d9c64
mov ecx, dword [esp + 0x14]
push ecx
call fcn.004d9c64
push ebp
call fcn.004d7e25
add esp, 0xc
jmp 0x4cf806
mov ecx, dword [esi + 0x276]
lea eax, [esp + 0x18]
push eax
push ecx
push ebx
mov ebx, dword [esp + 0x1c]
push ebx
mov ecx, esi
call fcn.004cf250
push ebx
call fcn.004d9c64
add esp, 4
add dword [esi + 0x2cc], 0x2e
movzx edx, word [edi + 0x1e]
mov eax, dword [esi + 0x2cc]
add eax, edx
mov dword [esi + 0x2cc], eax
movzx ecx, word [edi + 0x1c]
add eax, ecx
mov dword [esi + 0x2cc], eax
movzx edx, word [edi + 0x20]
add edx, eax
mov eax, 1
add dword [esi + 4], eax
mov dword [esi + 0x2cc], edx
pop edi
pop ebx
mov ecx, dword [esp + 0x110]
pop esi
pop ebp
xor ecx, esp
call fcn.004d7eb0
add esp, 0x10c
ret 0xc