Function at 0x4c5b80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6118e8
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x6c6f60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2c], ecx
call fcn.004b1830
mov word [ebp - 0x3a], ax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x3a]
push ecx
call fcn.004b17a0
add esp, 8
movzx edx, al
test edx, edx
je 0x4c5bdf
lea eax, [ebp + 8]
push eax
call fcn.004b17e0
add esp, 4
jmp 0x4c5e8e
mov ecx, dword [ebp - 0x2c]
call fcn.004927c0
test eax, eax
je 0x4c5c26
mov ecx, dword [ebp - 0x2c]
call fcn.004927c0
mov esi, eax
mov ecx, dword [ebp - 0x2c]
call fcn.004c8fa0
cmp esi, eax
jae 0x4c5c26
lea ecx, [ebp + 8]
push ecx
call fcn.004b17d0
add esp, 4
mov si, ax
mov ecx, dword [ebp - 0x2c]
call fcn.004c8e00
mov word [eax], si
mov ax, word [ebp + 8]
jmp 0x4c5e8e
mov edx, dword [ebp - 0x2c]
cmp dword [edx + 0x4c], 0
jne 0x4c5c39
call fcn.004b1830
jmp 0x4c5e8e
mov ecx, dword [ebp - 0x2c]
call fcn.004c85c0
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x38], 0
jne 0x4c5c91
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x4c]
push edx
lea eax, [ebp + 8]
push eax
call fcn.004b17d0
add esp, 4
movzx ecx, ax
push ecx
call fcn.004b2740
add esp, 8
movzx edx, al
test edx, edx
je 0x4c5c7a
mov ax, word [ebp + 8]
mov word [ebp - 0x32], ax
jmp 0x4c5c83
call fcn.004b1830
mov word [ebp - 0x32], ax
mov ax, word [ebp - 0x32]
jmp 0x4c5e8e
mov dword [ebp - 0x54], 8
lea ecx, [ebp + 8]
push ecx
call fcn.004b17d0
add esp, 4
mov word [ebp - 0x30], ax
push 0
push 8
lea ecx, [ebp - 0x28]
call fcn.0048c8d0
mov dword [ebp - 4], 0
lea edx, [ebp - 0x4c]
push edx
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
call fcn.0048c610
mov ecx, eax
call fcn.0047eca0
mov esi, eax
lea ecx, [ebp - 0x28]
call fcn.0047bfd0
add esi, eax
push esi
lea ecx, [ebp - 0x5c]
push ecx
lea ecx, [ebp - 0x28]
call fcn.0048c610
mov ecx, eax
call fcn.0047eca0
push eax
lea edx, [ebp - 0x50]
push edx
lea eax, [ebp - 0x2e]
push eax
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x2c]
add edx, 0x40
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x38]
call fcn.00490550
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
jl 0x4c5e5c
cmp dword [ebp - 0x48], 1
jle 0x4c5d33
cmp dword [ebp - 0x48], 3
je 0x4c5e11
jmp 0x4c5e5c
lea ecx, [ebp - 0x60]
push ecx
lea ecx, [ebp - 0x28]
call fcn.0048c610
mov ecx, eax
call fcn.0047eca0
mov edx, dword [ebp - 0x4c]
sub edx, eax
mov dword [ebp - 0x38], edx
je 0x4c5d9f
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x38]
push edx
push 1
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x28]
call fcn.0048c610
mov ecx, eax
call fcn.0047eca0
push eax
call fcn.005eb678
add esp, 0x10
cmp dword [ebp - 0x38], eax
je 0x4c5d9f
call fcn.004b1830
mov word [ebp - 0x3c], ax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.0047c030
mov ax, word [ebp - 0x3c]
jmp 0x4c5e8e
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 0x3e], 1
lea edx, [ebp - 0x30]
cmp dword [ebp - 0x50], edx
je 0x4c5dce
mov ax, word [ebp + 8]
mov word [ebp - 0x3e], ax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.0047c030
mov ax, word [ebp - 0x3e]
jmp 0x4c5e8e
cmp dword [ebp - 0x38], 0
jbe 0x4c5dd6
jmp 0x4c5e0f
lea ecx, [ebp - 0x28]
call fcn.0047bfd0
cmp eax, 0x20
jae 0x4c5df1
push 0
push 8
lea ecx, [ebp - 0x28]
call fcn.00491830
jmp 0x4c5e0f
call fcn.004b1830
mov word [ebp - 0x40], ax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.0047c030
mov ax, word [ebp - 0x40]
jmp 0x4c5e8e
jmp 0x4c5e7a
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x4c]
push edx
movzx eax, word [ebp - 0x30]
push eax
call fcn.004b2740
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x4c5e36
mov dx, word [ebp + 8]
mov word [ebp - 0x34], dx
jmp 0x4c5e3f
call fcn.004b1830
mov word [ebp - 0x34], ax
mov ax, word [ebp - 0x34]
mov word [ebp - 0x42], ax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.0047c030
mov ax, word [ebp - 0x42]
jmp 0x4c5e8e
call fcn.004b1830
mov word [ebp - 0x44], ax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.0047c030
mov ax, word [ebp - 0x44]
jmp 0x4c5e8e
jmp 0x4c5cbb
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005c978e
mov esp, ebp
pop ebp
ret 4