Function at 0x4017b0
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag
Get process heap flags
Get process heap force flags
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x220]
sub esp, 0x29c
mov dword [ebp - 0x27c], eax
mov dword [esp], str.msi.dll
call sub.kernel32.dll_GetModuleHandleA
xor edx, edx
sub esp, 4
mov word [ebp - 0x220], dx
mov esi, eax
mov dword [esp + 8], 0x104
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.kernel32.dll_GetModuleFileNameW
sub esp, 0xc
test eax, eax
jne 0x40180a
test byte [section..data], 2
jne 0x401a00
xor eax, eax
lea edi, [ebp - 0x270]
mov dword [esp], ebx
mov word [ebp - 0x270], ax
lea eax, [ebp - 0x274]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [ebp - 0x274], 0x28
call sub.msi.dll_MsiGetFileVersionW
sub esp, 0x14
test eax, eax
je 0x40185d
test byte [section..data], 2
jne 0x4019d3
lea eax, [ebp - 0x278]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0xa
mov dword [esp], esi
mov ebx, dword fs:[0x18]
call sub.user32.dll_LoadStringW
sub esp, 0x10
mov dword [ebp - 0x274], eax
lea eax, [eax + eax + 2]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sub.kernel32.dll_HeapAlloc
mov dword [ebp - 0x278], eax
mov eax, dword [ebp - 0x274]
sub esp, 0xc
mov dword [esp + 4], 0
lea eax, [eax + eax + 0x52]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sub.kernel32.dll_HeapAlloc
mov ebx, eax
sub esp, 0xc
mov eax, dword [ebp - 0x278]
test ebx, ebx
je 0x401984
test eax, eax
je 0x401984
mov word [eax], 0
mov eax, dword [ebp - 0x274]
mov dword [esp + 4], 0xa
add eax, 1
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x278]
mov dword [esp + 8], eax
call sub.user32.dll_LoadStringW
mov eax, dword [ebp - 0x278]
sub esp, 0x10
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x274]
mov dword [esp + 0xc], edi
add eax, 0x29
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00401380
call sub.kernel32.dll_GetUserDefaultLangID
mov dword [esp + 0x14], 0
movzx eax, ax
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0
call sub.msi.dll_MsiMessageBoxW
mov eax, dword [ebp - 0x278]
sub esp, 0x18
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sub.kernel32.dll_HeapFree
sub esp, 0xc
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 sub.kernel32.dll_HeapFree
mov eax, dword [ebp - 0x27c]
sub esp, 0xc
mov dword [esp], eax
call sub.kernel32.dll_ExitProcess
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.MsiGetFileVersion_failed_with__d_n
mov dword [esp + 8], str.ShowUsage
mov dword [esp + 4], 0x407000
mov dword [esp], 1
call fcn.00401720
jmp 0x40185d
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.GetModuleFileName_failed:__d_n
mov dword [esp + 8], str.ShowUsage
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x407000
mov dword [esp], 1
call fcn.00401720
jmp 0x40180a