Function at 0x4c7ec7
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59498a
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x64c194]
xor eax, ebp
mov dword [ebp - 0x20], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x130], ecx
or dword [ebp - 0x44], 0xffffffff
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp + 8]
neg eax
sbb eax, eax
inc eax
movzx eax, al
test eax, eax
je 0x4c7f3d
cmp dword [ebp + 8], 0xffffffff
je 0x4c7f1f
mov eax, dword [ebp + 8]
mov dword [ebp - 0x134], eax
jmp 0x4c7f2d
or eax, 0xffffffff
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x134]
jmp 0x4c8309
mov eax, dword [ebp - 0x130]
mov eax, dword [eax + 0x24]
mov eax, dword [eax]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0
je 0x4c7fe1
mov eax, dword [ebp - 0x130]
mov eax, dword [eax + 0x24]
mov eax, dword [eax]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x130]
mov eax, dword [eax + 0x34]
mov ecx, dword [ebp - 0x130]
mov ecx, dword [ecx + 0x24]
mov ecx, dword [ecx]
add ecx, dword [eax]
cmp dword [ebp - 0x80], ecx
jae 0x4c7fe1
mov al, byte [ebp + 8]
mov byte [ebp - 0x81], al
mov eax, dword [ebp - 0x130]
mov eax, dword [eax + 0x34]
mov eax, dword [eax]
dec eax
mov ecx, dword [ebp - 0x130]
mov ecx, dword [ecx + 0x34]
mov dword [ecx], eax
mov eax, dword [ebp - 0x130]
mov eax, dword [eax + 0x24]
mov eax, dword [eax]
mov dword [ebp - 0x138], eax
mov eax, dword [ebp - 0x130]
mov eax, dword [eax + 0x24]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 0x130]
mov ecx, dword [ecx + 0x24]
mov dword [ecx], eax
mov eax, dword [ebp - 0x138]
mov cl, byte [ebp - 0x81]
mov byte [eax], cl
mov eax, dword [ebp + 8]
jmp 0x4c8309
mov eax, dword [ebp - 0x130]
cmp dword [eax + 0x4c], 0
jne 0x4c7ffa
or eax, 0xffffffff
jmp 0x4c8309
mov eax, dword [ebp - 0x130]
cmp dword [eax + 0x3c], 0
jne 0x4c8064
mov al, byte [ebp + 8]
mov byte [ebp - 0x82], al
mov eax, dword [ebp - 0x130]
mov eax, dword [eax + 0x4c]
mov dword [ebp - 0x88], eax
push dword [ebp - 0x88]
movsx eax, byte [ebp - 0x82]
push eax
call fcn.0052fed9
pop ecx
pop ecx
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
movzx eax, cl
test eax, eax
je 0x4c804d
mov eax, dword [ebp + 8]
mov dword [ebp - 0x13c], eax
jmp 0x4c8054
or dword [ebp - 0x13c], 0xffffffff
mov eax, dword [ebp - 0x13c]
jmp 0x4c8309
mov dword [ebp - 0x10], 8
mov al, byte [ebp + 8]
mov byte [ebp - 0x15], al
lea eax, [ebp - 0x91]
mov dword [ebp - 0x90], eax
push 0
push 0
lea ecx, [ebp - 0x3c]
call fcn.0040eb93
push 0
push 8
lea ecx, [ebp - 0x3c]
call fcn.00471316
and dword [ebp - 4], 0
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00459130
mov dword [ebp - 0x9c], eax
mov ecx, dword [ebp - 0x9c]
call fcn.004c58e3
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0xa4], eax
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00459130
mov dword [ebp - 0xac], eax
mov ecx, dword [ebp - 0xac]
call fcn.004c58e3
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp - 0x130]
mov eax, dword [eax + 0x3c]
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0xa0]
add eax, dword [ebp - 0xa4]
push eax
push dword [ebp - 0xb0]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x15]
push eax
mov eax, dword [ebp - 0x130]
add eax, 0x44
push eax
mov eax, dword [ebp - 0xb4]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xb4]
call dword [eax + 0x14]
mov dword [ebp - 0x140], eax
cmp dword [ebp - 0x140], 0
jl 0x4c82db
cmp dword [ebp - 0x140], 1
jle 0x4c8163
cmp dword [ebp - 0x140], 3
je 0x4c826f
jmp 0x4c82db
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00459130
mov dword [ebp - 0xbc], eax
mov ecx, dword [ebp - 0xbc]
call fcn.004c58e3
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0xc0]
mov dword [ebp - 0x40], eax
je 0x4c81f4
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00459130
mov dword [ebp - 0xc8], eax
mov ecx, dword [ebp - 0xc8]
call fcn.004c58e3
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0x130]
push dword [eax + 0x4c]
push dword [ebp - 0x40]
push 1
push dword [ebp - 0xcc]
call fcn.0052fe57
add esp, 0x10
cmp dword [ebp - 0x40], eax
je 0x4c81f4
or dword [ebp - 0x68], 0xffffffff
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040eb93
mov eax, dword [ebp - 0x68]
jmp 0x4c8309
mov eax, dword [ebp - 0x130]
mov byte [eax + 0x41], 1
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x15]
cmp eax, ecx
je 0x4c8226
mov eax, dword [ebp + 8]
mov dword [ebp - 0x6c], eax
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040eb93
mov eax, dword [ebp - 0x6c]
jmp 0x4c8309
cmp dword [ebp - 0x40], 0
jbe 0x4c822e
jmp 0x4c826a
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 0x20
jae 0x4c824e
push 0
push 8
lea ecx, [ebp - 0x3c]
call fcn.0042398d
jmp 0x4c826a
or dword [ebp - 0x70], 0xffffffff
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040eb93
mov eax, dword [ebp - 0x70]
jmp 0x4c8309
jmp 0x4c82f4
mov eax, dword [ebp - 0x130]
mov eax, dword [eax + 0x4c]
mov dword [ebp - 0xf0], eax
mov al, byte [ebp - 0x15]
mov byte [ebp - 0xe9], al
push dword [ebp - 0xf0]
movsx eax, byte [ebp - 0xe9]
push eax
call fcn.0052fed9
pop ecx
pop ecx
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
movzx eax, cl
test eax, eax
je 0x4c82b6
mov eax, dword [ebp + 8]
mov dword [ebp - 0x144], eax
jmp 0x4c82bd
or dword [ebp - 0x144], 0xffffffff
mov eax, dword [ebp - 0x144]
mov dword [ebp - 0x74], eax
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040eb93
mov eax, dword [ebp - 0x74]
jmp 0x4c8309
or dword [ebp - 0x78], 0xffffffff
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040eb93
mov eax, dword [ebp - 0x78]
jmp 0x4c8309
jmp 0x4c8099
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.0052a758
leave
ret 4