Function at 0x50d1e0
Capabilities:
Access peb ldr_data
Delete file
Get number of processors
Get process heap flags
Get process heap force flags
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x4c
mov ebx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
call ebx
mov edi, eax
sub esp, 0x18
lea edx, [edi + edi]
mov dword [esp + 4], 0
mov dword [esp + 8], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov dword [ebp - 0x30], eax
test eax, eax
je 0x50d86f
mov dword [esp + 0x14], edi
mov edi, eax
mov dword [esp + 8], esi
mov esi, 0xa1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call ebx
lea eax, [ebp - 0x24]
sub esp, 0x18
mov dword [esp], edi
mov edi, str.Directory_tDirectory_Parent_tDefaultDir_ns72_tS72_tl255_nDirectory_tDirectory_nMSITESTDIR_tProgramFilesFolder_tmsitest_nProgramFilesFolder_tTARGETDIR_t._nTARGETDIR_t_tSourceDir
mov dword [esp + 8], eax
mov dword [esp + 4], 3
call sub.msi.dll_MsiOpenDatabaseW
sub esp, 0xc
mov ebx, eax
mov dword [esp + 4], 0x148
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.expected_ERROR_SUCCESS__got__u_n
mov ebx, 0x5870c0
mov dword [esp], eax
call fcn.0052b0e0
mov eax, str.directory.idt
mov dword [ebp - 0x2c], edi
jmp 0x50d2ee
mov eax, dword [ebx + 4]
mov esi, dword [ebx + 8]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebx]
mov dword [esp + 0x18], 0
sub esi, 1
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], eax
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov edi, eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], esi
mov dword [esp + 0x10], 0
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebx]
sub esp, 4
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 0x58bc60
mov dword [esp], eax
call sub.msi.dll_MsiDatabaseImportA
sub esp, 0xc
mov esi, eax
mov dword [esp + 4], 0x152
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.expected_ERROR_SUCCESS__got__u_n
add ebx, 0xc
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebx - 0xc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
cmp ebx, 0x58712c
jne 0x50d2e3
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.msi.dll_MsiDatabaseCommit
sub esp, 4
mov ebx, eax
mov dword [esp + 4], 0x158
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.expected_ERROR_SUCCESS__got__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.msi.dll_MsiCloseHandle
mov edi, dword [ebp - 0x30]
lea eax, [ebp - 0x1c]
sub esp, 4
mov dword [esp + 8], eax
mov dword [esp + 4], 2
mov dword [esp], edi
call sub.msi.dll_MsiOpenDatabaseW
sub esp, 0xc
mov ebx, eax
mov dword [esp + 4], 0x118
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_open_database__u_n
mov dword [esp], eax
call fcn.0052b0e0
lea eax, [ebp - 0x20]
mov dword [esp + 8], 7
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msi.dll_MsiGetSummaryInformationA
sub esp, 0x10
mov ebx, eax
mov dword [esp + 4], 0x11b
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_open_summaryinfo__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x14], 0x585b07
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1e
mov dword [esp + 4], 2
mov dword [esp], eax
call sub.msi.dll_MsiSummaryInfoSetPropertyA
sub esp, 0x18
mov ebx, eax
mov dword [esp + 4], 0x11e
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_set_summary_info__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x14], 0x585b07
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1e
mov dword [esp + 4], 3
mov dword [esp], eax
call sub.msi.dll_MsiSummaryInfoSetPropertyA
sub esp, 0x18
mov ebx, eax
mov dword [esp + 4], 0x121
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_set_summary_info__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x14], 0x585b3f
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1e
mov dword [esp + 4], 4
mov dword [esp], eax
call sub.msi.dll_MsiSummaryInfoSetPropertyA
sub esp, 0x18
mov ebx, eax
mov dword [esp + 4], 0x124
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_set_summary_info__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x14], 0x585b46
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1e
mov dword [esp + 4], 7
mov dword [esp], eax
call sub.msi.dll_MsiSummaryInfoSetPropertyA
sub esp, 0x18
mov ebx, eax
mov dword [esp + 4], 0x127
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_set_summary_info__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x14], str.E528DDD6_4801_4BEC_BBB6_C5EE0FD097E9
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1e
mov dword [esp + 4], 9
mov dword [esp], eax
call sub.msi.dll_MsiSummaryInfoSetPropertyA
sub esp, 0x18
mov ebx, eax
mov dword [esp + 4], 0x12a
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_set_summary_info__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x64
mov dword [esp + 8], 3
mov dword [esp + 4], 0xe
mov dword [esp], eax
call sub.msi.dll_MsiSummaryInfoSetPropertyA
sub esp, 0x18
mov ebx, eax
mov dword [esp + 4], 0x12d
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_set_summary_info__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0xf
mov dword [esp], eax
call sub.msi.dll_MsiSummaryInfoSetPropertyA
sub esp, 0x18
mov ebx, eax
mov dword [esp + 4], 0x130
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_set_summary_info__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msi.dll_MsiSummaryInfoPersist
sub esp, 4
mov ebx, eax
mov dword [esp + 4], 0x133
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_persist_suminfo__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msi.dll_MsiCloseHandle
sub esp, 4
mov ebx, eax
mov dword [esp + 4], 0x136
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_close_suminfo__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msi.dll_MsiCloseHandle
sub esp, 4
mov ebx, eax
mov dword [esp + 4], 0x139
mov dword [esp], str..._wine_dlls_msi_tests_patch.c
call fcn.0052ae70
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.failed_to_close_database__u_n
mov dword [esp], eax
call fcn.0052b0e0
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret