Function at 0x496560
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x78], eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x30]
push ebx
mov ebx, dword [ebp + 0x1c]
xorps xmm0, xmm0
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x24]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x20]
push ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
movq qword [esp + 0x40], xmm0
mov dword [esp + 0x48], 0
call fcn.00412680
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x20]
xorps xmm0, xmm0
mov dword [esp + 0x28], 0
push ebx
movq qword [esp + 0x24], xmm0
mov dword [eax], 0
mov dword [esi], 0
call fcn.00412680
lea ecx, [esp + 0x48]
call fcn.00417b20
mov ebx, dword [esp + 0x20]
lea ecx, [esp + 0x48]
push ebx
call fcn.00419180
test al, al
je 0x4967c5
mov eax, dword [esp + 0x68]
shr eax, 4
cmp dword [ebp + 0x10], 0
je 0x496648
test al, 1
jne 0x49663b
lea eax, [esp + 0x20]
push eax
push str.can_not_replace_file_with_folder_with_same_name
lea ecx, [edi - 0xc]
call fcn.00494d40
test eax, eax
mov esi, 0x80004004
cmovne esi, eax
jmp 0x4967e7
mov dword [esi], 0
xor esi, esi
jmp 0x4967e7
test al, 1
je 0x496673
lea eax, [esp + 0x20]
push eax
push str.can_not_replace_folder_with_file_with_same_name
lea ecx, [edi - 0xc]
call fcn.00494d40
mov esi, eax
test esi, esi
jne 0x4967e7
mov eax, dword [esp + 0xc]
mov dword [eax], esi
jmp 0x4967e7
mov eax, dword [edi + 0x88]
sub eax, 0
je 0x49668e
sub eax, 2
jne 0x49677b
xor esi, esi
jmp 0x4967e7
push dword [esp + 0x2c]
xorps xmm0, xmm0
mov dword [esp + 0x3c], 0
lea ecx, [esp + 0x34]
movq qword [esp + 0x34], xmm0
call fcn.00412680
lea ecx, [esp + 0x30]
call fcn.00412d20
inc eax
cmp eax, dword [esp + 0x34]
jae 0x4966ca
mov ecx, dword [esp + 0x30]
xor edx, edx
mov dword [esp + 0x34], eax
mov word [ecx + eax*2], dx
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x34]
call fcn.00412bd0
mov ecx, dword [edi - 0xc]
lea edx, [esp + 0x2c]
push edx
push dword [esp + 0x1c]
lea edx, [esp + 0x50]
push dword [esp + 0x1c]
lea eax, [edi - 0xc]
push dword [esp + 0x28]
push edx
lea edx, [esp + 0x74]
push edx
push dword [esp + 0x48]
push eax
call dword [ecx + 0x14]
mov esi, eax
test esi, esi
jne 0x496866
mov eax, dword [esp + 0x2c]
cmp eax, 5
ja case.default.0x496718
jmp dword [eax*4 + 0x496878]
mov eax, dword [esp + 0x30]
mov esi, 0x80004004
push eax
call fcn.004df97b
add esp, 4
jmp 0x4967e7
mov dword [edi + 0x88], 2
mov eax, dword [esp + 0x30]
xor esi, esi
push eax
call fcn.004df97b
add esp, 4
jmp 0x4967e7
mov dword [edi + 0x88], 1
jmp case.0x496718.0
mov dword [edi + 0x88], 3
mov eax, dword [esp + 0x30]
push eax
call fcn.004df97b
mov esi, dword [esp + 0x10]
add esp, 4
cmp dword [edi + 0x88], 3
jne 0x496821
lea ecx, [esp + 0x20]
call fcn.0043d860
test al, al
lea eax, [esp + 0x20]
push eax
jne 0x4967b8
push str.can_not_create_name_for_file
lea ecx, [edi - 0xc]
call fcn.00494d40
mov ebx, dword [esp + 0x20]
mov esi, eax
test esi, esi
jne 0x4967e7
mov esi, 0x80004004
jmp 0x4967e7
lea ecx, [esp + 0x40]
call fcn.004128e0
mov ebx, dword [esp + 0x20]
push dword [esp + 0x3c]
mov dword [esi], 1
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov ecx, dword [esp + 0x10]
mov esi, 0x8007000e
mov dword [ecx], eax
xor ecx, ecx
test eax, eax
cmovne esi, ecx
push dword [esp + 0x70]
call fcn.004df97b
add esp, 4
push ebx
call fcn.004df97b
add esp, 4
push dword [esp + 0x3c]
call fcn.004df97b
mov ecx, dword [esp + 0x88]
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004df96c
mov esp, ebp
pop ebp
ret 0x20
mov ecx, ebx
call fcn.004198a0
test al, al
je 0x4967c5
mov ecx, ebx
call fcn.00417de0
test al, al
jne 0x4967c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4967c5
lea eax, [esp + 0x20]
push eax
push str.can_not_delete_output_file
lea ecx, [edi - 0xc]
call fcn.00494d40
mov esi, eax
test esi, esi
jne 0x4967e7
mov esi, 0x80004004
jmp 0x4967e7
mov esi, 0x80004005
mov eax, dword [esp + 0x30]
push eax
call fcn.004df97b
add esp, 4
jmp 0x4967e7