Function at 0x1040215
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x50c
mov eax, dword [0x1076530]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
push 1
mov dword [ebp - 0x4ec], eax
mov eax, dword [ebp + 0x18]
push 0x220
push 0x10077b4
lea ecx, [ebp - 0x4d8]
mov dword [ebp - 0x4f4], eax
call fcn.01055826
xor ebx, ebx
xor eax, eax
mov byte [ebp - 0x50c], bl
lea edi, [ebp - 0x50b]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x4ac
stosb byte es:[edi], al
lea eax, [ebp - 0x4b0]
push ebx
push eax
mov dword [ebp - 0x4e0], ebx
mov dword [ebp - 0x4e4], ebx
mov dword [ebp - 0x4e8], ebx
mov dword [ebp - 0x4dc], ebx
mov dword [ebp - 0x4b4], ebx
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, 0x230
cmp esi, ebx
jne 0x10402c3
mov dword [ebp - 0x4d8], 0x80070057
mov word [ebp - 0x4d2], ax
jmp 0x1040761
mov word [ebp - 0x4d4], ax
mov eax, 0x231
cmp word [esi], bx
je 0x10402ad
mov dword [ebp - 0x4d8], ebx
mov word [ebp - 0x4d4], ax
cmp dword [0x10776cc], ebx
jne 0x1040317
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x10776cc], eax
cmp eax, 0xffffffff
mov eax, 0x236
jne 0x104030a
mov dword [ebp - 0x4d8], 0x8007000e
jmp 0x10402b7
mov dword [ebp - 0x4d8], ebx
mov word [ebp - 0x4d4], ax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4b0], eax
mov eax, dword [ebp - 0x4ec]
mov dword [ebp - 0x4ac], eax
mov eax, dword [ebp - 0x4f4]
mov eax, dword [eax]
mov dword [ebp - 0x4a4], eax
mov eax, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x1c], eax
push 0x104
lea eax, [ebp - 0x494]
push eax
mov dword [ebp - 0x4b4], 0x4b0
call fcn.01017627
mov dword [ebp - 0x4d8], eax
cmp eax, ebx
mov eax, 0x23f
jl 0x10402b7
push 0x10077a0
mov word [ebp - 0x4d4], ax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x4e0], eax
cmp eax, ebx
jne 0x10403a0
call fcn.0105d3b8
mov dword [ebp - 0x4d8], eax
mov eax, 0x243
jmp 0x10402b7
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x1007794
mov ecx, 0x243
push eax
mov dword [ebp - 0x4d8], ebx
mov word [ebp - 0x4d4], cx
call edi
cmp eax, ebx
jne 0x10403d9
call fcn.0105d3b8
mov dword [ebp - 0x4d8], eax
mov eax, 0x246
jmp 0x10402b7
push 0x100777c
push dword [ebp - 0x4e0]
mov ecx, 0x246
mov dword [ebp - 0x4d8], ebx
mov word [ebp - 0x4d4], cx
mov dword [ebp - 0x498], eax
call edi
mov dword [ebp - 0x4f0], eax
cmp eax, ebx
jne 0x104041d
call fcn.0105d3b8
mov dword [ebp - 0x4d8], eax
mov eax, 0x24b
jmp 0x10402b7
mov eax, 0x24b
mov dword [ebp - 0x504], esi
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
mov dword [ebp - 0x4d8], ebx
mov word [ebp - 0x4d4], ax
mov byte [ebp - 0x50c], 1
call esi
lea eax, [ebp - 0x4dc]
push eax
push ebx
lea eax, [ebp - 0x50c]
push eax
call dword [ebp - 0x4f0]
movzx edi, al
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x1040707
cmp edi, ebx
jne 0x1040714
mov eax, dword [ebp - 0x4dc]
imul eax, eax, 0xc8
push eax
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov edi, eax
mov dword [ebp - 0x4e8], edi
mov eax, 0x26c
cmp edi, ebx
je 0x10402fe
push ebx
mov dword [ebp - 0x4d8], ebx
mov word [ebp - 0x4d4], ax
call esi
lea eax, [ebp - 0x4dc]
push eax
push edi
lea eax, [ebp - 0x50c]
push eax
call dword [ebp - 0x4f0]
test al, al
jne 0x1040511
call fcn.0105d3b8
mov dword [ebp - 8], eax
cmp eax, 0xc0003005
jne 0x10404dd
mov dword [ebp - 8], 0x800706f9
lea eax, [ebp - 0x4b4]
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], 0x883
call fcn.0103fc2f
cmp eax, ebx
mov dword [ebp - 0x4d8], eax
jge 0x1040507
mov eax, 0x27d
jmp 0x10402b7
mov eax, 0x27e
jmp 0x1040750
push 0x104
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x494]
xor esi, esi
push eax
inc esi
push esi
call fcn.01061be2
mov dword [ebp - 0x4d8], eax
cmp eax, ebx
mov eax, 0x281
jl 0x10402b7
mov word [ebp - 0x4d4], ax
xor eax, eax
mov byte [ebp - 0x248], 2
cmp dword [ebp - 0x4dc], ebx
jbe 0x104056e
mov ecx, edi
test byte [ecx], 1
jne 0x10405a3
inc eax
add ecx, 0xc8
cmp eax, dword [ebp - 0x4dc]
jb 0x104055a
lea eax, [ebp - 0x4b4]
mov dword [ebp - 8], 0x800706f9
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], 0x883
call fcn.0103fc2f
cmp eax, ebx
mov dword [ebp - 0x4d8], eax
jge 0x1040647
mov eax, 0x2a0
jmp 0x10402b7
imul eax, eax, 0xc8
add eax, edi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x244], 5
mov ecx, dword [eax + 4]
mov dword [ebp - 0x23c], ecx
mov cx, word [eax + 2]
add eax, 0x88
push eax
mov word [ebp - 0x238], cx
push 0x20
lea eax, [ebp - 0x28a]
lea ecx, [ebp - 0x4b4]
push eax
mov dword [ebp - 0x234], ecx
mov dword [ebp - 0x240], 0x10032d4
call fcn.01017627
mov dword [ebp - 0x4d8], eax
cmp eax, ebx
mov eax, 0x290
jl 0x10402b7
mov edi, dword [ebp - 0x4f4]
mov word [ebp - 0x4d4], ax
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], ebx
cmp dword [edi], ebx
je 0x1040684
lea eax, [ebp - 0x4e4]
push eax
lea eax, [ebp - 0x4b4]
push eax
call fcn.0104006f
cmp eax, ebx
mov dword [ebp - 0x4d8], eax
jge 0x1040657
mov eax, 0x2ab
jmp 0x10402b7
mov dword [ebp - 0x4d8], esi
mov eax, 0x2a1
jmp 0x104075a
mov ecx, 0x2ab
mov word [ebp - 0x4d4], cx
xor ecx, ecx
cmp dword [ebp - 0x4e4], ebx
sete cl
mov dword [edi], ecx
cmp eax, esi
jne 0x1040684
mov dword [ebp - 0x4d8], esi
mov eax, 0x2b0
jmp 0x104075a
lea eax, [ebp - 0x4b4]
push eax
call fcn.0103fe89
cmp eax, ebx
mov dword [ebp - 0x4d8], eax
jge 0x10406a4
mov eax, 0x2b5
jmp 0x10402b7
mov ecx, 0x2b5
mov word [ebp - 0x4d4], cx
cmp eax, esi
jne 0x10406c2
mov dword [ebp - 0x4d8], esi
lea eax, [ecx + 4]
jmp 0x104075a
cmp dword [ebp + 0x10], ebx
je 0x10406d2
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x1040761
lea eax, [ebp - 0x4b4]
push eax
call fcn.0103fc2f
cmp eax, ebx
mov dword [ebp - 0x4d8], eax
jge 0x10406f2
mov eax, 0x2bf
jmp 0x10402b7
mov eax, dword [ebp - 0x14]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x4d8], eax
mov eax, 0x2c0
jmp 0x104075a
cmp eax, ebx
jne 0x1040712
mov eax, 0x6f9
cmp eax, ebx
jle 0x104071e
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 8], eax
lea eax, [ebp - 0x4b4]
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], 0x883
call fcn.0103fc2f
cmp eax, ebx
mov dword [ebp - 0x4d8], eax
jge 0x104074b
mov eax, 0x265
jmp 0x10402b7
mov eax, 0x266
mov dword [ebp - 0x4d8], 1
mov word [ebp - 0x4d4], ax
cmp dword [ebp - 0x4a8], ebx
je 0x1040789
push 0xffffffffffffffff
push dword [ebp - 0x4a8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x4a8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x4a8], ebx
push dword [ebp - 0x4d8]
push 0x884
push dword [ebp - 0x4ec]
call fcn.0102f5a0
push dword [ebp - 0x4e8]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [ebp - 0x4dc], ebx
cmp dword [ebp - 0x4e0], ebx
je 0x10407c5
push dword [ebp - 0x4e0]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, dword [ebp - 0x4d8]
lea ecx, [ebp - 0x4d8]
call fcn.01055a3c
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.01054fa7
leave
ret 0x14