Function at 0x1017712
Capabilities:
Delete file

Disassembly:
push 0x154
push 0x1002150
call fcn.01032098
mov eax, dword [reloc.msvcrt.dll___p__fmode]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov edi, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
mov eax, dword [edi + 4]
cmp eax, esi
je 0x10176c2
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov eax, 0x1001818
jmp 0x10176cd
mov eax, 0x1001818
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov ecx, dword [edi + 8]
cmp ecx, esi
mov dword [ebp - reloc.OLEAUT32.dll_VariantTimeToDosDateTime], ecx
jne 0x10176e0
mov dword [ebp - reloc.OLEAUT32.dll_VariantTimeToDosDateTime], eax
mov ecx, dword [edi + 0xc]
cmp ecx, esi
mov dword [ebp - reloc.msvcrt.dll___p__fmode], ecx
jne 0x10176f3
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
cmp dword [ebp - reloc.msvcrt.dll___p__fmode], esi
je 0x1017710
push dword [ebp - 0x114]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
jmp 0x1017716
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
cmp dword [ebp - reloc.msvcrt.dll___p__fmode], esi
je 0x1017733
push dword [ebp - 0x118]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov dword [ebp - reloc.RPCRT4.dll_RpcServerUseProtseqEpW], eax
jmp 0x1017739
mov dword [ebp - reloc.RPCRT4.dll_RpcServerUseProtseqEpW], esi
lea ebx, [edi + 0x10]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], ebx
push esi
push esi
push ebx
push esi
mov edi, 0x800
push edi
call fcn.01035d2f
mov dword [ebp - reloc.MSVCP60.dll___0__basic_string_DU__char_traits_D_std__V__allocator_D_2__std__QAE_PBDABV__allocator_D_1__Z], eax
cmp eax, esi
je 0x1017a00
add eax, eax
push eax
call fcn.01035a36
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
cmp eax, esi
je 0x1017a00
push dword [ebp - reloc.MSVCP60.dll___0__basic_string_DU__char_traits_D_std__V__allocator_D_2__std__QAE_PBDABV__allocator_D_1__Z]
push eax
push ebx
push esi
push edi
call fcn.01035d2f
test eax, eax
je 0x1017a00
push esi
push esi
push esi
push ebx
push 2
push edi
call fcn.01037951
mov ebx, eax
cmp ebx, esi
je 0x1017a00
lea eax, [ebx + ebx]
push eax
call fcn.01035a36
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
cmp eax, esi
je 0x1017a00
push ebx
push eax
push esi
push dword [ebp - 0x164]
push 2
push edi
call fcn.01037951
test eax, eax
je 0x1017a00
mov eax, dword [ebp - reloc.MSVCP60.dll___0__basic_string_DU__char_traits_D_std__V__allocator_D_2__std__QAE_PBDABV__allocator_D_1__Z]
add ebx, eax
lea eax, [ebx + ebx + 0xc]
push eax
call fcn.01035a36
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
cmp eax, esi
je 0x1017a00
push dword [ebp - 0x124]
push dword [ebp - 0x120]
mov ebx, 0x1002144
push ebx
push eax
mov edi, dword [sym.imp.msvcrt.dll_swprintf]
call edi
add esp, 0x10
cmp dword [ebp - reloc.msvcrt.dll___p__fmode], esi
je 0x1017853
mov eax, dword [ebp - reloc.RPCRT4.dll_RpcServerUseProtseqEpW]
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
add eax, ecx
lea eax, [eax + eax + 0xc]
push eax
call fcn.01035a36
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
cmp eax, esi
je 0x1017a00
push dword [ebp - 0x118]
push dword [ebp - 0x114]
push ebx
push eax
call edi
add esp, 0x10
jmp 0x1017882
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
lea eax, [eax + eax + 2]
push eax
call fcn.01035a36
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
cmp eax, esi
je 0x1017a00
push dword [ebp - 0x114]
push 0x100213c
push eax
call edi
add esp, 0xc
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov eax, dword [ebp - reloc.OLEAUT32.dll_VariantTimeToDosDateTime]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
lea eax, reloc.msvcrt.dll___p__fmode
push eax
push esi
lea eax, reloc.msvcrt.dll___p__fmode
push eax
push esi
push 0x40001011
push esi
mov ebx, 0x2900
push ebx
mov edi, dword [sym.imp.KERNEL32.dll_FormatMessageW]
call edi
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
cmp eax, esi
je 0x1017a00
push esi
push reloc.KERNEL32.dll_GetStartupInfoW
lea eax, reloc.msvcrt.dll___p__fmode
push eax
push esi
push 0x40001013
push esi
push 0x800
call edi
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
cmp eax, esi
je 0x1017a00
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
lea eax, [eax + ecx + 8]
cmp eax, 0x73
jbe 0x1017a0e
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
push dword [ebp - 0x10c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
lea eax, reloc.msvcrt.dll___p__fmode
push eax
push esi
lea eax, reloc.msvcrt.dll___p__fmode
push eax
push esi
push 0x40001012
push esi
push ebx
call edi
cmp eax, esi
je 0x1017a00
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
add eax, ecx
lea ecx, [eax + 8]
cmp ecx, 0x73
jbe 0x1017a0e
add eax, 0xffffff95
mov dword [ebp - reloc.MSVCP60.dll__append___basic_string_GU__char_traits_G_std__V__allocator_G_2__std__QAEAAV12_PBG_Z], eax
push dword [ebp - 0x110]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
cmp eax, dword [ebp - reloc.MSVCP60.dll__append___basic_string_GU__char_traits_G_std__V__allocator_G_2__std__QAEAAV12_PBG_Z]
ja 0x10179a9
mov dword [ebp - reloc.msvcrt.dll___p__fmode], reloc.ADVAPI32.dll_RegRestoreKeyW
jmp 0x1017a67
sub eax, dword [ebp - reloc.MSVCP60.dll__append___basic_string_GU__char_traits_G_std__V__allocator_G_2__std__QAEAAV12_PBG_Z]
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov word [ecx + eax*2], si
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov dword [ebp - reloc.msvcrt.dll___p__fmode], ecx
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
push dword [ebp - 0x10c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
lea eax, reloc.msvcrt.dll___p__fmode
push eax
push esi
lea eax, reloc.msvcrt.dll___p__fmode
push eax
push esi
push 0x40001012
push esi
push ebx
call edi
cmp eax, esi
jne 0x1017a0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
jmp 0x1017a67
mov dword [ebp - 4], esi
push 0x16
lea eax, reloc.msvcrt.dll___p__fmode
push eax
push dword [ebp - 0x10c]
push dword [ebp - 0x160]
call fcn.01034e02
test eax, eax
jne 0x1017a3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
or dword [ebp - 4], reloc.msvcrt.dll___p__fmode
jmp 0x1017a67
cmp dword [ebp - reloc.msvcrt.dll___p__fmode], esi
je 0x1017a81
push dword [ebp - 0x10c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
push dword [ebp - 0x120]
call fcn.01035abf
push dword [ebp - 0x124]
call fcn.01035abf
push dword [ebp - 0x11c]
call fcn.01035abf
push dword [ebp - 0x110]
call fcn.01035abf
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov ecx, dword [ebp - 0x1c]
call fcn.01031d91
call fcn.010320d3
ret 8