Function at 0x402c70
Capabilities:
Allocate thread local storage
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x2c
call fcn.00402ba0
call dword [sym.imp.kernel32.dll_TlsAlloc]
mov dword [0x41b060], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.C:UsersPublicDocumentswinetest_winrt_okfile
call dword [sym.imp.kernel32.dll_CreateFileW]
or edx, 0xffffffff
mov dword [0x41b068], eax
sub esp, 0x1c
test eax, eax
je 0x4030c6
mov dword [esp + 8], str.winetest_winrt_event
mov dword [esp + 4], 0
mov dword [esp], 0x1f0003
call dword [sym.imp.kernel32.dll_OpenEventW]
sub esp, 0xc
mov dword [0x41b064], eax
mov eax, 0xb8
call fcn.00401360
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.OpenEventW_failed__error__lu_n
mov dword [esp + 8], eax
mov ebx, dword [0x41b064]
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.004018f0
mov dword [esp + 8], str.winetest_winrt_section
mov dword [esp + 4], 0
mov dword [esp], 0xf001f
call dword [sym.imp.kernel32.dll_OpenFileMappingW]
sub esp, 0xc
mov dword [0x41b06c], eax
mov eax, 0xb8
call fcn.00401360
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.OpenFileMappingW_failed__error__lu_n
mov dword [esp + 8], eax
mov edx, dword [0x41b06c]
xor eax, eax
test edx, edx
setne al
mov dword [esp], eax
call fcn.004018f0
mov dword [esp + 0x10], 0x400
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 6
mov eax, dword [0x41b06c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_MapViewOfFile]
sub esp, 0x14
mov ebx, eax
mov eax, 0xb8
call fcn.00401360
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.MapViewOfFile_failed__error__lu_n
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.004018f0
mov eax, dword [ebx]
mov edx, str.wine
test eax, eax
mov dword [0x40b018], eax
mov eax, str.windows
cmovne eax, edx
mov dword [0x40b01c], eax
mov eax, dword [ebx + 8]
mov dword [0x40b014], eax
mov eax, dword [ebx + 4]
mov dword [0x40b010], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_UnmapViewOfFile]
sub esp, 4
mov dword [esp], 1
call sub.combase.dll_RoInitialize
sub esp, 4
mov ebx, eax
mov eax, 0xbb
call fcn.00401360
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.RoInitialize_failed__hr__lx_n
mov dword [esp], eax
call fcn.004018f0
mov dword [esp], 0x4063a4
call dword [sym.imp.msvcrt.dll_wcslen]
lea edx, [ebp - 0xc]
mov dword [esp], 0x4063a4
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call sub.combase.dll_WindowsCreateString
sub esp, 0xc
mov ebx, eax
mov eax, 0x45
call fcn.00401360
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.got_hr__lx._n
mov dword [esp], eax
call fcn.004018f0
lea eax, [ebp - 0x10]
mov dword [esp + 4], 0x4075d4
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.combase.dll_RoGetActivationFactory
mov ebx, eax
mov eax, dword [ebp - 0xc]
sub esp, 0xc
mov dword [esp], eax
call sub.combase.dll_WindowsDeleteString
mov eax, 0x49
sub esp, 4
call fcn.00401360
test ebx, ebx
jne 0x4030cf
xor edx, edx
mov dword [esp + 4], str.got_hr__lx._n
mov dword [esp + 8], edx
mov dword [esp], 1
call fcn.004018f0
mov edx, dword [ebp - 0x10]
mov ecx, 0x407df4
mov eax, 0x50
call fcn.00401910
mov edx, dword [ebp - 0x10]
mov ecx, 0x4075e4
mov eax, 0x51
call fcn.00401910
mov edx, dword [ebp - 0x10]
mov ecx, 0x407dc4
mov eax, 0x52
call fcn.00401910
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x18]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x406f44
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
mov ebx, eax
mov eax, 0x55
call fcn.00401360
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.got_hr__lx._n
mov dword [esp], eax
call fcn.004018f0
mov eax, dword [ebp - 0x18]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 8
mov ebx, eax
mov eax, 0x58
call fcn.00401360
xor eax, eax
cmp ebx, 0x80070057
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.got_hr__lx._n
mov dword [esp], eax
call fcn.004018f0
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 8
mov ebx, eax
mov eax, 0x5a
call fcn.00401360
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.got_hr__lx._n
mov dword [esp], eax
call fcn.004018f0
mov eax, 0x5b
call fcn.00401360
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], str.got_NULL_application_data__p._n
test eax, eax
mov dword [esp + 8], eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.004018f0
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov ebx, eax
mov eax, 0x5e
call fcn.00401360
xor eax, eax
cmp ebx, 1
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.got_ref__ld._n
mov dword [esp], eax
call fcn.004018f0
mov eax, dword [ebp - 0x18]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov ebx, eax
mov eax, 0x60
call fcn.00401360
xor eax, eax
cmp ebx, 2
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.got_ref__ld._n
mov dword [esp], eax
call fcn.004018f0
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov ebx, eax
mov eax, 0x62
call fcn.00401360
xor eax, eax
cmp ebx, 1
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.got_ref__ld._n
mov dword [esp], eax
call fcn.004018f0
call fcn.00401970
call sub.combase.dll_RoUninitialize
call fcn.00401ff0
xor edx, edx
lea esp, [ebp - 8]
mov eax, edx
pop ebx
pop esi
pop ebp
ret
cmp dword [0x40b018], 0
jne 0x403125
cmp ebx, 0x80040154
jne 0x403148
mov dword [esp + 8], 0x80040154
mov dword [esp + 4], str.got_hr__lx._n
mov dword [esp], 1
call fcn.004018f0
mov eax, 0x4c
call fcn.00401360
or edx, 0xffffffff
mov eax, 0x4063a4
call fcn.00401260
mov dword [esp], str._s_runtimeclass_not_registered__skipping_tests._n
mov dword [esp + 4], eax
call fcn.00401850
jmp 0x4030b5
xor eax, eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str.got_hr__lx._n
mov dword [esp], eax
call fcn.004018f0
cmp ebx, 0x80040154
je 0x4030fc
jmp 0x402ef4
xor ecx, ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], str.got_hr__lx._n
mov dword [esp], ecx
call fcn.004018f0
jmp 0x402ef4