Function at 0x401bb0
Capabilities:
Access peb ldr_data
Delete file
Get process heap flags
Get process heap force flags
Schedule task via itaskservice
Write file on windows

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x40]
push ebx
sub esp, 0x88
mov dword [esp + 8], eax
mov dword [esp + 4], 8
mov dword [esp], 0xffffffff
call dword [sym.imp.advapi32.dll_OpenProcessToken]
sub esp, 0xc
test eax, eax
jne 0x402328
call fcn.004010d0
test eax, eax
je 0x402380
mov dword [esp], 0
call dword [sym.imp.ole32.dll_CoInitialize]
sub esp, 4
mov dword [esp + 0x10], 0x419004
mov dword [esp + 0xc], 0x4067e0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], 0x406680
call dword [sym.imp.ole32.dll_CoCreateInstance]
sub esp, 0x14
mov ebx, eax
test eax, eax
jne 0x4022d0
xor ecx, ecx
xor esi, esi
mov eax, dword [0x419004]
xor edx, edx
mov word [ebp - 0x30], cx
xor ebx, ebx
mov word [ebp - 0x50], si
mov ecx, dword [ebp - 0x50]
mov word [ebp - 0x40], bx
mov word [ebp - 0x20], dx
mov edx, dword [eax]
mov dword [esp + 0x34], ecx
mov ecx, dword [ebp - 0x4c]
mov dword [esp + 0x38], ecx
mov ecx, dword [ebp - 0x48]
mov dword [esp + 0x3c], ecx
mov ecx, dword [ebp - 0x44]
mov dword [esp + 0x40], ecx
mov ecx, dword [ebp - 0x40]
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 0x28], ecx
mov ecx, dword [ebp - 0x38]
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp - 0x30]
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp - 0x28]
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp - 0x24]
mov dword [esp + 0x20], ecx
mov ecx, dword [ebp - 0x20]
mov dword [esp + 4], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x18]
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x14]
mov dword [esp], eax
mov dword [esp + 0x10], ecx
call dword [edx + 0x28]
sub esp, 0x44
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xc5
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Connect_failed:__08lx_n
call fcn.004016f0
mov eax, dword [0x419004]
mov edx, dword [eax]
mov dword [esp + 8], 0x419000
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 0xc
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xc8
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.GetFolder_error__08lx_n
call fcn.004016f0
mov edx, 0x406248
mov eax, 0xde
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xdf
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.r___lu_n
call fcn.004016f0
mov edx, str.winetest
mov eax, 0xe1
call fcn.00401710
mov edx, str.schtasks__change__tn_winetest__enable
mov eax, 0xe3
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xe4
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.r___lu_n
call fcn.004016f0
mov eax, str.winetest
call fcn.00401020
mov ebx, eax
mov eax, dword [0x419000]
mov edx, dword [eax]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [edx + 0x3c]
sub esp, 0xc
mov esi, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xe6
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.DeleteTask_failed:__08lx_n
mov esi, dword fs:[0x18]
call fcn.004016f0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov edx, str.schtasks__change__tn_winetest__enable
mov eax, 0xe8
sub esp, 0xc
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xe9
xor eax, eax
cmp ebx, 1
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.r___lu_n
call fcn.004016f0
mov edx, str.wine_testwinetest
mov eax, 0xeb
call fcn.00401710
mov edx, str.schtasks__CHANGE__tn_wine_testwinetest__enable
mov eax, 0xed
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xee
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.r___lu_n
call fcn.004016f0
mov edx, str.schtasks__delete__f__tn_wine_testwinetest
mov eax, 0xf0
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xf1
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.r___lu_n
call fcn.004016f0
mov edx, str.schtasks__Change__tn_wine_testwinetest__enable
mov eax, 0xf3
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xf4
xor eax, eax
cmp ebx, 1
sete al
mov dword [esp + 8], ebx
mov dword [esp + 4], str.r___lu_n
mov dword [esp], eax
call fcn.004016f0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], str.test.xml
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xad
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov dword [esp + 4], str.CreateFile_failed_n
mov dword [esp], eax
call fcn.004016f0
cmp ebx, 0xffffffff
je 0x40203e
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x15d
mov dword [esp + 4], str.__xml_version_1.0____n_Task_xmlns_http:__schemas.microsoft.com_windows_2004_02_mit_task___n___RegistrationInfo__n_____Description__Task1___Description__n____RegistrationInfo__n___Settings__n_____Enabled_false__Enabled__n_____Hidden_false__Hidden__n____Settings__n___Actions__n_____Exec__n_______Command__task1.exe___Command__n______Exec__n____Actions__n__Task__n
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov edi, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xb2
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.WriteFile_failed:__lu_n
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.004016f0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov edx, str.schtasks__create__xml_test.xml__tn_winewinetest
mov eax, 0xf8
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xf9
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.r___lu_n
call fcn.004016f0
mov edx, str.schtasks__change__tn_winewinetest__enable
mov eax, 0xfb
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xfc
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.r___lu_n
call fcn.004016f0
mov edx, str.schtasks__create__xml_test.xml__f__tn_winewinetest
mov eax, 0xfe
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xff
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.r___lu_n
call fcn.004016f0
mov edx, str.schtasks__create__xml_test.xml__tn_winewinetest
mov eax, 0x101
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0x102
xor eax, eax
cmp ebx, 1
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.r___lu_n
call fcn.004016f0
mov edx, str.schtasks__create__tn_winewinetest
mov eax, 0x104
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0x105
xor eax, eax
cmp ebx, 0x80004005
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.r___lx_n
call fcn.004016f0
mov edx, str.schtasks__Delete__f__tn_winewinetest
mov eax, 0x107
call fcn.00401880
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0x108
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp + 4], str.r___lu_n
mov dword [esp], eax
call fcn.004016f0
mov dword [esp], str.test.xml
call dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0x10b
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.DeleteFileA_failed:__lu_n
mov dword [esp + 8], eax
call fcn.004016f0
mov eax, dword [0x419000]
mov edx, dword [eax]
mov dword [esp + 8], 0
mov dword [esp + 4], str.wine_test
mov dword [esp], eax
call dword [edx + 0x30]
sub esp, 0xc
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0x10e
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.DeleteFolder_wine_test__failed:__lx_n
call fcn.004016f0
mov eax, dword [0x419000]
mov edx, dword [eax]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x404000
mov dword [esp], eax
call dword [edx + 0x30]
sub esp, 0xc
mov ebx, eax
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0x110
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.DeleteFolder_wine__failed:__lx_n
call fcn.004016f0
mov eax, dword [0x419000]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, dword [0x419004]
sub esp, 4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
jmp dword [sym.imp.ole32.dll_CoUninitialize]
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xbe
xor eax, eax
cmp ebx, 0x80040154
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Could_not_create_task_service:__08lx_n
call fcn.004016f0
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xbf
mov dword [esp], str.Task_service_not_available_n
call fcn.00401a70
jmp 0x4022b6
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], 4
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x30]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x12
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_GetTokenInformation]
mov ebx, eax
mov eax, dword [ebp - 0x40]
sub esp, 0x14
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
test ebx, ebx
je 0x401bee
cmp dword [ebp - 0x30], 2
jne 0x401bee
jmp 0x401bfb
call fcn.00402450
mov dword [eax], 0x40610f
mov dword [eax + 4], 0xd4
mov dword [esp], str.Deleting_the_test_folders_requires_elevated_privileges_on_Windows___8_n
call fcn.00401a70
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret