Function at 0x412b4f
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x53c
push ebx
push edi
push 0x18c
xor ebx, ebx
push ebx
push esi
call fcn.0041e8b4
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x412b7d
xor al, al
jmp 0x412db4
push ebx
lea eax, [ebp - 0x7c]
push eax
push 0x84889911
call fcn.0041ca6e
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.USER32.dll_RegisterWindowMessageW]
mov dword [esi + 8], eax
cmp eax, ebx
je 0x412b76
push 1
lea eax, [ebp - 0x7c]
push eax
push 0x84889912
call fcn.0041ca6e
lea eax, [ebp - 0x7c]
push eax
push ebx
push 1
mov edi, 0x42acb0
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0xc], eax
cmp eax, ebx
je 0x412b76
push 1
lea eax, [ebp - 0x7c]
push eax
push 0x18782822
call fcn.0041ca6e
lea eax, [ebp - 0x7c]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 0x14], eax
cmp eax, ebx
je 0x412b76
push 1
lea eax, [ebp - 0x7c]
push eax
push 0x9878a222
call fcn.0041ca6e
lea eax, [ebp - 0x7c]
push eax
push 0x3d09128
push ebx
push 4
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi], eax
cmp eax, ebx
je 0x412b76
push ebx
push ebx
push ebx
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
je 0x412b76
mov dword [esi + 0x10], eax
add eax, 0x128
push ebx
mov dword [esi + 0x18], eax
mov byte [ebp - 5], bl
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0xc], eax
cmp eax, ebx
je 0x412db1
mov edi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 8
push eax
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
call edi
push 0xa
push dword [ebp - 0xc]
mov dword [esi + 0x2c], eax
call edi
mov ecx, dword [esi + 0x2c]
mov edi, dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
push ecx
push dword [ebp - 0xc]
mov dword [esi + 0x30], eax
call edi
cmp eax, ebx
je 0x412c93
push eax
push ebx
push ebx
lea eax, [esi + 0x20]
push eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0xc]
call fcn.004253f3
jmp 0x412c95
xor eax, eax
push dword [ebp - 0xc]
mov dword [esi + 0x1c], eax
push ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
cmp dword [esi + 0x1c], ebx
je 0x412db1
mov ecx, dword [ebp - 0x10]
mov ax, word [ecx + 0xe]
shr ax, 3
mov byte [esi + 0x38], al
movzx eax, al
imul eax, dword [esi + 0x2c]
mov dword [esi + 0x34], eax
test al, 3
je 0x412ccd
and eax, 0xfffffffc
add eax, 4
push ecx
mov dword [esi + 0x34], eax
call fcn.0041e801
cmp byte [ebp + 8], 1
mov byte [ebp - 5], 1
jne 0x412db1
lea eax, [ebp - 0x53c]
mov byte [ebp - 5], bl
call fcn.0041cdd3
lea eax, [ebp - 0x264]
push eax
call fcn.0041ce00
push 0x10
push 0x42aef0
lea eax, [esi + 0x3c]
push eax
call fcn.0041e83d
mov eax, dword [ebp - 0x86]
mov dword [esi + 0x4c], eax
push 0x102
lea eax, [ebp - 0x46e]
push eax
lea eax, [esi + 0x50]
push eax
call fcn.0041e83d
push 1
lea eax, [ebp - 0x7c]
push eax
push 0x1898b122
call fcn.0041ca6e
lea eax, [ebp - 0x7c]
push eax
push ebx
push 0x42acb0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 0x160], eax
cmp eax, ebx
je 0x412b76
push ebx
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp + 8], eax
cmp eax, ebx
je 0x412db1
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov dword [esi + 0x154], eax
cmp eax, ebx
je 0x412da7
push 1
push 1
push dword [ebp + 8]
call edi
mov dword [esi + 0x15c], eax
cmp eax, ebx
je 0x412da7
push eax
push dword [esi + 0x154]
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esi + 0x158], eax
cmp eax, ebx
je 0x412da7
mov byte [ebp - 5], 1
push dword [ebp + 8]
push ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov al, byte [ebp - 5]
pop edi
pop ebx
leave
ret 4