Function at 0x4c0e70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x434c
call fcn.00483900
mov eax, dword [0x50ba00]
push ebx
mov ebx, dword [ebp + 0x14]
cmp ebx, 3
push esi
mov dword [esp + 0x4350], eax
push edi
mov esi, ecx
je 0x4c0ec5
cmp ebx, 2
je 0x4c0f89
cmp ebx, 1
je 0x4c0f89
mov eax, 0x10000
mov ecx, dword [esp + 0x4354]
call fcn.00482423
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 4]
mov edi, dword [ebp + 8]
cmp edi, eax
je 0x4c0f24
cmp eax, 0xffffffff
je 0x4c0edf
mov eax, dword [esi]
push eax
call fcn.004beb00
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x4c0eab
cmp edi, dword [eax + 0x10]
jge 0x4c0efb
push eax
call fcn.004be690
add esp, 4
mov ecx, dword [esi]
cmp dword [ecx + 0x10], edi
jge 0x4c0f16
mov edx, dword [esi]
push edx
call fcn.004be6e0
mov eax, dword [esi]
mov ecx, dword [eax + 0x10]
add esp, 4
cmp ecx, edi
jl 0x4c0f02
mov ecx, dword [esi]
push ecx
call fcn.004c0ab0
add esp, 4
mov dword [esi + 4], edi
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi]
push edx
push eax
push ecx
call fcn.004c0bd0
mov edi, eax
add esp, 0xc
test edi, edi
jle 0x4c0f57
mov eax, 0x600
mov ecx, dword [esp + 0x4354]
call fcn.00482423
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [esi]
push edx
call fcn.004beb00
add esp, 4
mov eax, edi
neg eax
sbb eax, eax
mov dword [esi + 4], 0xffffffff
and eax, 0x5000000
mov ecx, dword [esp + 0x4354]
call fcn.00482423
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 4]
or edi, 0xffffffff
cmp eax, edi
je 0x4c0f9e
mov eax, dword [esi]
push eax
call fcn.004beb00
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], edi
mov edi, dword [ebp + 8]
cmp edi, dword [eax + 4]
jge 0x4c0eab
cmp edi, dword [eax + 0x10]
jge 0x4c0fbd
push eax
call fcn.004be690
add esp, 4
mov ecx, dword [esi]
cmp dword [ecx + 0x10], edi
jge 0x4c0fd8
mov edx, dword [esi]
push edx
call fcn.004be6e0
mov eax, dword [esi]
mov ecx, dword [eax + 0x10]
add esp, 4
cmp ecx, edi
jl 0x4c0fc4
lea ecx, [esp + 0x18]
push ecx
push edi
mov ecx, esi
call fcn.004bec00
test byte [esp + 0x120], 0x10
je 0x4c1056
xor eax, eax
cmp ebx, 1
je 0x4c1242
mov ecx, 0x81
lea edi, [esp + 0x148]
rep stosd dword es:[edi], eax
push 0x103
lea edx, [esp + 0x14c]
push edx
push 0xffffffffffffffff
stosw word es:[edi], ax
lea eax, [esp + 0x28]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ecx, [esp + 0x148]
push ecx
add esi, 0x138
push esi
call fcn.004bf0d0
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x4354]
call fcn.00482423
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp ebx, 1
jne 0x4c1063
mov edi, dword [ebp + 0xc]
jmp 0x4c1157
mov ebx, dword [ebp + 0xc]
xor eax, eax
mov ax, word [ebx]
test ax, ax
mov edi, ebx
mov ecx, ebx
je 0x4c1139
cmp ax, 0x2f
je 0x4c1084
cmp ax, 0x5c
jne 0x4c1087
lea edi, [ecx + 2]
mov ax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x4c1078
cmp edi, ebx
je 0x4c1139
lea edx, [esp + 0x148]
push ebx
push edx
call fcn.0048266b
sub edi, ebx
sar edi, 1
xor ecx, ecx
mov word [esp + edi*2 + 0x14e], cx
mov ax, word [esp + 0x150]
add esp, 8
cmp ax, 0x2f
je 0x4c10dd
cmp ax, 0x5c
je 0x4c10dd
cmp word [esp + 0x14a], 0x3a
mov dword [esp + 0x10], ecx
jne 0x4c10e5
mov dword [esp + 0x10], 1
lea eax, [esp + 0x148]
push 0x4fec18
push eax
call fcn.0048273c
mov edi, eax
neg edi
lea ecx, [esp + 0x150]
sbb edi, edi
push 0x4fec10
push ecx
neg edi
call fcn.0048273c
add esp, 0x10
neg eax
sbb eax, eax
neg eax
or edi, eax
or edi, dword [esp + 0x10]
jne 0x4c1139
lea edx, [esp + 0x148]
push edx
lea eax, [esi + 0x138]
push eax
call fcn.004bf0d0
add esp, 8
mov ecx, dword [esp + 0x120]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4c1176
mov eax, 0x200
mov ecx, dword [esp + 0x4354]
call fcn.00482423
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [esi]
push edx
call fcn.004c0ab0
mov ecx, dword [esi]
push 0x4000
lea eax, [esp + 0x358]
push eax
push ecx
mov dword [esp + 0x20], 0
call fcn.004c0bd0
add esp, 0x10
test eax, eax
jl 0x4c11dd
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x4c11ec
push 0
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0x35c]
push eax
push edi
call ebx
test eax, eax
je 0x4c11e4
mov edx, dword [esi]
push 0x4000
lea ecx, [esp + 0x354]
push ecx
push edx
call fcn.004c0bd0
add esp, 0xc
test eax, eax
jge 0x4c11a8
mov ebx, 1
jmp 0x4c11f0
mov dword [esp + 0x10], 1
mov ebx, dword [esp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x4c121f
test ebx, ebx
jne 0x4c121f
lea eax, [esp + 0x134]
push eax
lea ecx, [esp + 0x128]
push ecx
lea edx, [esp + 0x134]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x4c122c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi]
push eax
call fcn.004beb00
add esp, 4
mov eax, ebx
neg eax
sbb eax, eax
and eax, 0x400
mov ecx, dword [esp + 0x4354]
call fcn.00482423
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10