Function at 0x4952d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x434c
call fcn.004e70c0
mov eax, dword [0x57f578]
xor eax, esp
mov dword [esp + 0x4348], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x10], edi
cmp ecx, 3
je 0x495310
cmp ecx, 2
je 0x495310
cmp ecx, 1
jne 0x4953f6
mov eax, dword [edi + 4]
cmp ecx, 3
jne 0x4953d9
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x495376
cmp eax, 0xffffffff
je 0x49532f
mov ecx, dword [edi]
call fcn.00494c60
mov ecx, dword [edi]
mov dword [edi + 4], 0xffffffff
cmp esi, dword [ecx + 4]
jge 0x4953f6
cmp esi, dword [ecx + 0x10]
jge 0x49534d
call fcn.004946e0
mov ecx, dword [edi]
cmp dword [ecx + 0x18], 0
je 0x495426
cmp dword [ecx + 0x10], esi
jge 0x49536e
nop dword [eax]
mov ecx, dword [edi]
call fcn.00494720
mov ecx, dword [edi]
cmp dword [ecx + 0x10], esi
jl 0x495360
call fcn.00494970
mov dword [edi + 4], esi
push dword [ebp + 0x10]
mov ecx, dword [edi]
mov edx, ebx
call fcn.00494aa0
mov esi, eax
add esp, 4
test esi, esi
jle 0x4953a7
mov eax, 0x600
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004e679a
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [edi]
call fcn.00494c60
mov dword [edi + 4], 0xffffffff
test esi, esi
je 0x4956a6
mov eax, 0x5000000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004e679a
mov esp, ebp
pop ebp
ret 0x10
cmp eax, 0xffffffff
je 0x4953e5
mov ecx, dword [edi]
call fcn.00494c60
mov eax, dword [edi]
mov esi, dword [ebp + 8]
mov dword [edi + 4], 0xffffffff
cmp esi, dword [eax + 4]
jl 0x495412
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004e679a
mov esp, ebp
pop ebp
ret 0x10
cmp esi, dword [eax + 0x10]
jge 0x495420
mov ecx, eax
call fcn.004946e0
mov eax, dword [edi]
cmp dword [eax + 0x18], 0
jne 0x495442
mov eax, 0x700
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004e679a
mov esp, ebp
pop ebp
ret 0x10
cmp dword [eax + 0x10], esi
jge 0x495455
mov ecx, dword [edi]
call fcn.00494720
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jl 0x495447
lea eax, [esp + 0x18]
mov ecx, edi
push eax
push esi
call fcn.00494d70
test byte [esp + 0x120], 0x10
jne 0x4956a6
cmp dword [ebp + 0x14], 1
je 0x4955b8
movzx eax, word [ebx]
mov esi, ebx
mov ecx, ebx
test ax, ax
je 0x49559b
mov edx, eax
nop dword [eax]
cmp dx, 0x2f
je 0x49549c
cmp dx, 0x5c
jne 0x49549f
lea esi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x495490
cmp esi, ebx
je 0x49559b
lea ecx, [esp + 0x148]
mov eax, ebx
mov edi, ecx
mov edx, 0x104
sub eax, edi
mov edi, eax
nop dword [eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x4954ee
movzx eax, word [edi + ecx]
test ax, ax
je 0x4954ee
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x4954d0
mov edi, dword [esp + 0x10]
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
sub esi, ebx
sar esi, 1
xor ecx, ecx
mov word [eax], cx
lea esi, [esi*2 - 2]
cmp esi, 0x208
jae 0x4956bf
xor eax, eax
mov word [esp + esi + 0x148], ax
mov ax, word [esp + 0x148]
cmp ax, 0x2f
je 0x495543
cmp ax, 0x5c
je 0x495543
cmp word [esp + 0x14a], 0x3a
mov byte [esp + 0xf], cl
jne 0x495548
mov byte [esp + 0xf], 1
lea eax, [esp + 0x148]
push 0x556e98
push eax
call fcn.004e8154
mov esi, eax
lea eax, [esp + 0x150]
push 0x556ec4
push eax
call fcn.004e8154
movzx ecx, byte [esp + 0x1f]
add esp, 0x10
test eax, eax
mov eax, 1
setne dl
test esi, esi
cmovne ecx, eax
or dl, cl
jne 0x49559b
lea ecx, [edi + 0x13c]
lea edx, [esp + 0x148]
call fcn.004951a0
push 0
push dword [esp + 0x124]
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4955d9
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004e679a
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [edi]
call fcn.00494970
mov ecx, dword [edi]
lea edx, [esp + 0x350]
push 0x4000
mov byte [esp + 0x13], 0
call fcn.00494aa0
add esp, 4
test eax, eax
js 0x495638
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x49563d
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
lea eax, [esp + 0x35c]
push eax
push ebx
call esi
test eax, eax
je 0x495638
mov ecx, dword [edi]
lea edx, [esp + 0x350]
push 0x4000
call fcn.00494aa0
add esp, 4
test eax, eax
jns 0x495605
mov byte [esp + 0xf], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x49566f
cmp byte [esp + 0xf], 0
jne 0x49566f
lea eax, [esp + 0x134]
push eax
lea eax, [esp + 0x128]
push eax
lea eax, [esp + 0x134]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x49567c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi]
call fcn.00494c60
cmp byte [esp + 0xf], 0
je 0x4956a6
mov eax, 0x400
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004e679a
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [esp + 0x4354]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004e679a
mov esp, ebp
pop ebp
ret 0x10
call fcn.004e6f1e
int3