joyce8/EMBER2024-capa huggingface dataset:
Function at 0x6601049b
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x6610ed60], 1
push ebx
push esi
push edi
mov ebx, 0x6610ece8
jne 0x660104b3
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edi, edi
cmp dword [0x6610ee98], 0xffffffff
jne 0x660104e1
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x6610ee98], eax
je 0x66042ca9
call fcn.660105b1
mov esi, eax
cmp esi, edi
jne 0x66042c3c
cmp dword [0x6610ed60], edi
je 0x66042c66
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, edi
jne 0x6601054a
cmp dword [0x6610ed60], edi
je 0x66042c77
push 0xa8
call fcn.6601071f
mov esi, eax
cmp esi, edi
je 0x66042ca9
push esi
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp dword [0x6610ee9c], edi
jne 0x66042c8b
cmp dword [0x6610eea0], edi
jne 0x66042c8b
mov dword [0x6610eea0], esi
cmp dword [esi + 0x1c], edi
jne 0x6601055f
call fcn.66010763
cmp eax, edi
mov dword [esi + 0x1c], eax
je 0x66042ca0
cmp dword [esi + 0x20], edi
jne 0x66010574
call fcn.6601079a
cmp eax, edi
mov dword [esi + 0x20], eax
je 0x66042ca0
mov eax, dword [esp + 0x10]
add eax, 0x8000
cmp eax, dword [esi + 0x70]
jbe 0x66010585
mov dword [esi + 0x70], eax
call fcn.660fd000
mov ax, word [esp + 0x14]
and word [esi + 0x76], 0xff7f
or word [esi + 0x30], ax
cmp dword [0x6610ed60], 1
jne 0x660105a9
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebx
ret 8
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsFree]
or dword [0x6610ee98], 0xffffffff
cmp dword [0x6610ed60], 1
jne 0x66042c5f
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x660105ab
cmp dword [0x6610eea0], edi
je 0x660104ff
jmp 0x660104ed
cmp dword [0x6610eea0], edi
je 0x6601050b
push 7
pop eax
jmp 0x660105ab
mov dword [0x6610ee9c], 1
mov dword [0x6610eea0], edi
jmp 0x6601054a
push dword [esp + 0x14]
call fcn.660186ee
cmp dword [0x6610ed60], 1
jne 0x66042c83
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x66042c83

Function at 0x660107b1
Capabilities:
Get thread local storage value

Disassembly:
push esi
mov esi, ecx
push dword [0x6610ee98]
and dword [esi + 0x10], 0
and dword [esi + 0x14], 0
mov dword [esi + 4], 0x66019fa8
mov dword [esi + 8], 0x66019fd0
mov dword [esi + 0xc], 0x66019fb8
mov dword [esi], 0x6601a018
mov dword [esi + 4], 0x6601a008
mov dword [esi + 8], 0x66019ff8
mov dword [esi + 0xc], 0x66019fe0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
mov dword [esi + 0x18], eax
call fcn.66010805
mov eax, esi
pop esi
ret
Function at 0x660132d4
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax + 0x18]
mov ecx, dword [esp + 4]
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], ecx
mov dword [ecx], edx
ret 4

Function at 0x660137c9
Capabilities:
Get thread local storage value

Disassembly:
call fcn.660137e6
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax + 0x18]
mov ecx, dword [eax + 0x14]
mov ecx, dword [ecx]
mov dword [eax + 0x14], ecx
ret

Function at 0x660137fa
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax + 0x18]
mov eax, dword [eax + 0x14]
ret

Function at 0x66013b27
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push 0x1c
call fcn.6600fd50
mov ebx, eax
test ebx, ebx
je 0x660456f1
push edi
push esi
mov esi, dword [esp + 0x14]
mov edi, ebx
movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x18]
movsd dword es:[edi], dword [esi]
mov ecx, dword [eax]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebx + 0x10], eax
call dword [ecx + 4]
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
pop esi
pop edi
mov ecx, dword [esp + 8]
mov dword [ebx + 0x14], ecx
mov ecx, dword [eax + 0x48]
mov dword [eax + 0x48], ebx
mov dword [ebx + 0x18], ecx
xor eax, eax
pop ebx
ret 0xc
mov eax, 0x8007000e
jmp 0x66013b72

Function at 0x6601440f
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x24], 0
jne 0x6604601b
push eax
call fcn.66014435
mov al, byte [eax + 0x28]
shr eax, 2
and eax, 1
ret
xor eax, eax
ret

Function at 0x66014618
Capabilities:
Get thread local storage value

Disassembly:
push esi
push edi
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov edi, dword [esp + 0xc]
push edi
call fcn.660fd9ff
mov eax, dword [edi + 0x20]
pop edi
mov dword [esi + 0x14], eax
pop esi
ret 4
Function at 0x660147c5
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x6610e474]
push ebx
xor ebx, ebx
push esi
cmp eax, 0xffffffff
push edi
je 0x66037da1
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
xor ecx, ecx
cmp dword [eax + 0x2c], 2
sete cl
movzx ecx, cl
cmp ecx, ebx
mov dword [ebp - 8], ecx
jne 0x66037dab
mov esi, dword [ebp + 0xc]
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
jmp 0x6601484a
mov eax, dword [esi]
push 0xffffffffffffffff
push esi
call dword [eax + 0x28]
cmp dword [ebp + 8], 2
je 0x6601488d
cmp eax, ebx
jne 0x6601483f
mov eax, dword [esi]
push esi
call dword [eax + 0x2c]
push ebx
push ebx
push ebx
lea eax, [ebp - 0x28]
push ebx
push eax
call edi
test eax, eax
jne 0x6601483f
cmp dword [ebp - 8], ebx
jne 0x66037db6
call dword [sym.imp.USER32.dll_WaitMessage]
mov eax, dword [esi]
push ebx
push esi
call dword [eax + 0x30]
test eax, eax
je 0x6601488d
push 1
push ebx
push ebx
lea eax, [ebp - 0x28]
push ebx
push eax
call edi
test eax, eax
je 0x6601480a
cmp dword [ebp - 0x24], 0x12
je 0x66014883
mov eax, dword [esi]
lea ecx, [ebp - 0x28]
push ecx
push esi
call dword [eax + 0x14]
test eax, eax
jne 0x6601483f
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x6601483f
cmp dword [ebp + 8], 0xffffffff
jne 0x66037dfc
pop edi
pop esi
pop ebx
leave
ret 8
mov dword [ebp - 4], ebx
mov eax, ebx
jmp 0x660147e8
mov eax, dword [eax + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x660147ff
push 0xff
push 0xffffffffffffffff
lea eax, [ebp - 0xc]
push ebx
push eax
push 1
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
cmp eax, ebx
jne 0x66037df7
mov ecx, dword [ebp - 4]
mov byte [ebp + 0xc], bl
cmp dword [ecx + 0x30], 3
jne 0x66037dec
mov byte [ebp + 0xc], 1
cmp byte [ebp + 0xc], bl
je 0x6601483f
jmp 0x6601488d
lea eax, [ebp + 0xc]
push eax
call fcn.66087519
jmp 0x66037dde
cmp eax, 1
jmp 0x66037de1
push dword [ebp - 0x20]
call dword [sym.imp.USER32.dll_PostQuitMessage]
jmp 0x6601488d

Function at 0x66014c5e
Capabilities:
Get thread local storage value

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
test edi, edi
je 0x660431b6
mov esi, dword [esp + 0x10]
test esi, esi
je 0x660431b6
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x3c]
mov eax, dword [eax + 0x40]
dec eax
mov dword [esi], ecx
mov dword [edi], eax
xor eax, eax
pop edi
pop esi
ret 8
push 5
pop eax
jmp 0x66014c91

Function at 0x66014ef8
Capabilities:
Get thread local storage value

Disassembly:
push esi
push edi
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
push dword [esp + 0xc]
mov eax, dword [esi + 0xa0]
mov edi, eax
or al, 1
shl edi, 0x1f
push esi
mov dword [esi + 0xa0], eax
sar edi, 0x1f
call fcn.66014f47
mov ecx, dword [esi + 0xa0]
xor edx, edx
test edi, edi
setne dl
xor edx, ecx
pop edi
and edx, 1
xor edx, ecx
mov dword [esi + 0xa0], edx
pop esi
ret 4
Function at 0x660151a8
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
push ebx
push esi
cmp eax, 0xffffffff
push edi
jne 0x66046c3c
mov eax, dword [ebp + 8]
xor edi, edi
mov ax, word [eax + 0x2a]
cmp ax, di
je 0x66046c2d
movzx eax, ax
dec eax
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], eax
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], edi
cmp ecx, dword [ebp - 8]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], ecx
ja 0x66015236
lea ecx, [ecx + ecx*2]
shl ecx, 4
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp + 8]
mov eax, ecx
add eax, dword [edx + 0x30]
mov eax, dword [eax]
mov esi, eax
inc esi
neg esi
sbb esi, esi
and esi, eax
cmp esi, edi
je 0x66015222
mov eax, dword [esi + 0x18]
test byte [eax + 0x28], 2
jne 0x6601524b
inc dword [ebp - 0x14]
add ecx, 0x30
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], ecx
cmp eax, dword [ebp - 8]
jbe 0x66015202
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 0x18], edi
jne 0x660151ee
cmp dword [ebp - 0x10], edi
jl 0x66046cac
pop edi
pop esi
pop ebx
leave
ret 8
mov eax, dword [eax + 0x28]
shr eax, 0xf
and eax, 3
cmp al, 2
jl 0x66015222
cmp dword [0x6610ee9c], edi
jne 0x66046c49
mov eax, dword [esi + 0x1c]
mov ebx, dword [eax]
cmp ebx, edi
je 0x66015244
mov ecx, ebx
call fcn.6602e78f
mov edi, dword [ebx]
test edi, edi
jne 0x6601528c
mov esi, dword [ebx + 4]
test esi, esi
jne 0x66046c9d
mov ecx, dword [ebp - 0x1c]
xor edi, edi
jmp 0x66015222
mov eax, dword [edi + 0x2c]
test ah, 4
jne 0x66015324
test al, 0x10
jne 0x66015324
mov ecx, dword [edi + 0x1c]
lea eax, [edi + 0x1c]
push eax
call dword [ecx + 4]
mov eax, dword [ebp - 4]
test byte [eax + 0xa0], 1
je 0x66015308
push 0
push edi
mov ecx, ebx
call fcn.6601d0c0
mov edx, 0x800a9c68
cmp eax, edx
je 0x66046c55
mov ecx, dword [ebp - 4]
test byte [ecx + 0xa0], 1
je 0x66046c7c
test eax, eax
jl 0x66046c8b
cmp word [esi + 0x58], 0
je 0x66015308
test byte [edi + 0x2c], 8
je 0x66015308
mov eax, dword [ebp - 4]
test byte [eax + 0x76], 2
jne 0x66015308
cmp dword [ebp + 0xc], 0xffffffff
jne 0x66015308
mov dword [ebp - 0x18], 1
mov eax, dword [edi + 0x2c]
and al, 0xf7
or al, 0x10
mov dword [edi + 0x2c], eax
mov eax, dword [esi + 0x18]
test byte [eax + 0x29], 2
jne 0x66015324
push 0
push edi
call dword [sym.imp.ole32.dll_CoDisconnectObject]
mov edi, dword [edi + 4]
jmp 0x66015276
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], edi
jmp 0x660151d9
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
xor edi, edi
jmp 0x660151d9
mov ecx, esi
call fcn.660dcbb6
jmp 0x66015267
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0xa0]
test cl, 1
je 0x660152cd
mov eax, dword [ebp - 4]
and ecx, 0xfffffffe
and dword [ebp - 0x18], 0
mov dword [eax + 0xa0], ecx
jmp 0x660152e5
or dword [edi + 0x2c], 0x10
push edx
call fcn.660dd7bf
jmp 0x660152e5
cmp dword [ebp - 0x10], 0
jl 0x660152e5
mov dword [ebp - 0x10], eax
jmp 0x660152e5
mov ecx, esi
call fcn.660d40ef
mov esi, dword [esi + 4]
jmp 0x6601527d
push dword [ebp - 0x10]
call fcn.660dd7bf
jmp 0x66015244
Function at 0x660157f6
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
xor edi, edi
push dword [0x6610ee98]
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [eax + 0x18]
cmp ebx, edi
je 0x66015846
cmp word [ebp + 0xc], di
jl 0x660436d5
cmp word [ebp + 0xc], 0x200
jg 0x660436d5
movsx eax, word [ebp + 0xc]
mov dword [ebp - 8], eax

Function at 0x660158cc
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor esi, esi
cmp edi, esi
mov dword [ebp - 4], esi
je 0x660158eb
cmp edi, 0x100
jge 0x66043786

Function at 0x66016070
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
test eax, eax
je 0x660161c3
cmp byte [eax], 0
je 0x660161c3
mov ebx, dword [ebp + 8]
push eax
mov ecx, ebx
call fcn.6600eb25
test eax, eax
je 0x6603337e
mov ecx, ebx
call fcn.660161ca
test eax, eax
je 0x660160be
mov ecx, ebx
call fcn.6601627d
cmp byte [eax], 0
jne 0x66033377
push 1
xor edi, edi
pop esi
push esi
push ebx
call fcn.660162fb
test eax, eax
je 0x66033377
xor eax, eax
test esi, esi
sete al
inc edi
mov esi, eax
cmp edi, 2
jl 0x660160c3
push 0x6610e450
mov ecx, ebx
call fcn.6601649e
test eax, eax
je 0x6603337e
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.6601652c
test eax, eax
je 0x6603337e
mov ecx, ebx
call fcn.66016418
push eax
call fcn.66016600
test eax, eax
jne 0x66033377
mov al, byte [0x6601a430]
push 0x40
mov byte [ebp - 0x104], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x103]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x104]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x105], 0x5c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x66016174
lea eax, [ebp - 0x104]
push 0x6601af96
push eax
call esi
lea eax, [ebp - 0x104]
push 0x6601af90
push eax
call esi
lea eax, [ebp - 0x104]
mov ecx, ebx
push eax
call fcn.660164cc
test eax, eax
je 0x6603337e
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.6601652c
test eax, eax
je 0x6603337e
mov ecx, ebx
call fcn.66016418
push eax
call fcn.66016600
neg eax
sbb eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 8
mov eax, 0x80004005
jmp 0x660161bc
xor eax, eax
jmp 0x660161bc
mov eax, 0x8007000e
jmp 0x660161bc
Function at 0x660162fb
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
xor esi, esi
push 0x105
push esi
push dword [0x6610e6c0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.66016418
push eax
call fcn.66016449
cmp dword [ebp - 4], esi
mov dword [ebp - 8], eax
je 0x6603334b
cmp eax, esi
je 0x6603334b
lea eax, [ebp - 0x10]
mov edi, 0x20019
push eax
push edi
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 0x6601afa4
push reloc.OLEAUT32.dll_SysReAllocString
call esi
mov ebx, eax
test ebx, ebx
jne 0x660163ba
cmp dword [ebp + 0xc], eax
mov eax, 0x6601af98
jne 0x6601636f
mov eax, 0x6601af90
lea ecx, [ebp - 0xc]
push ecx
push edi
push 0
push eax
push dword [ebp - 0x10]
call esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, eax
test ebx, ebx
jne 0x660163ad
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x104
push eax
push dword [ebp - 4]
push 0
push 0
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0xc]
mov ebx, eax
call esi
push dword [ebp - 0x10]
call esi
test ebx, ebx
je 0x6603333c
push 0x6601afc8
push 0x104
push dword [ebp - 4]
push 0x66004fa0
push dword [ebp - 8]
push 0x6601afc0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x6603333c
push 1
pop esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
cmp dword [ebp - 4], ebx
je 0x660163fe
push dword [ebp - 4]
push ebx
push dword [0x6610e6c0]
call edi
cmp dword [ebp - 8], ebx
je 0x6601640f
push dword [ebp - 8]
push ebx
push dword [0x6610e6c0]
call edi
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 8
push dword [ebp - 4]
mov ecx, dword [ebp + 8]
call fcn.660164cc
test eax, eax
jne 0x66033355
mov esi, 0x8007000e
jmp 0x660163e5
push dword [ebp - 8]
mov ecx, dword [ebp + 8]
call fcn.6601652c
mov esi, eax
neg esi
sbb esi, esi
and esi, 0x7ff8fff2
add esi, 0x8007000e
jmp 0x660163e5

Function at 0x66016649
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x66047a0d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.66016670
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x66047a32
test byte [esp + 8], 2
je 0x66047a32
call fcn.660166dc
mov dword [eax], 0xd
call fcn.660166a7
mov dword [eax], 5
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x660166b0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x6610c050]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x660488a7
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x74
push 1
call fcn.66001e61
mov esi, eax
add esp, 8
test esi, esi
je 0x660488ef
mov ecx, dword [0x6610c050]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x660488ef
push esi
call fcn.66002051
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.660ee101
add esp, 4
jmp 0x660166d0

Function at 0x660174a5
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
lea eax, [ebp - 0x268]
push esi
push eax
lea eax, [ebp - 0x68]
push eax
push 0x20
call fcn.6601327c
xor esi, esi
push esi
push eax
call fcn.660132f2
pop ecx
cmp eax, esi
pop ecx
jne 0x66046805
push edi
mov edi, dword [ebp + 8]
push ebx
push 1
push edi
call fcn.66015130
push esi
push edi
call fcn.66015130
mov eax, dword [edi + 4]
push dword [0x6610ee98]
mov dword [ebp - 4], esi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
mov esi, dword [ebx + 0x48]
test esi, esi
je 0x66017540
mov eax, dword [ebp - 8]
cmp dword [esi + 0x14], eax
jne 0x660175a2
mov eax, dword [ebp - 4]
test eax, eax
jne 0x6604680f
mov eax, dword [esi + 0x18]
mov dword [ebx + 0x48], eax
mov eax, dword [esi + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call fcn.660175eb
mov esi, dword [ebp - 4]
test esi, esi
jne 0x660175a2
mov esi, dword [ebx + 0x48]
test esi, esi
jne 0x660175a2
cmp dword [0x6610ee9c], 0
jne 0x6604681a
mov eax, dword [edi + 0x14]
cmp dword [eax + 0xc], 0
je 0x66017572
push 0
push edi
call fcn.66017604
cmp dword [0x6610ee9c], 0
jne 0x66046826
mov eax, dword [edi + 0x14]
and dword [eax + 0xc], 0
xor esi, esi
cmp word [edi + 0x2a], si
jbe 0x66017596
push esi
mov ecx, edi
call fcn.6601765b
test eax, eax
je 0x6601758d
push esi
push edi
call fcn.66017685
movzx eax, word [edi + 0x2a]
inc esi
cmp esi, eax
jb 0x6601757a
call fcn.660137c9
pop ebx
pop edi
pop esi
leave
ret 4
mov dword [ebp - 4], esi
mov esi, dword [esi + 0x18]
jmp 0x66017502
call fcn.660137c9
jmp 0x6601759d
mov ecx, dword [esi + 0x18]
mov dword [eax + 0x18], ecx
jmp 0x66017523
mov ecx, edi
call fcn.660dcbd4
jmp 0x66017550
mov ecx, edi
call fcn.660dcbd4
jmp 0x6601756e
Function at 0x66017748
Capabilities:
Get thread local storage value

Disassembly:
push esi
push edi
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x18]
xor edx, edx
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x66017789
mov esi, dword [eax + 0xc]
mov edi, dword [esp + 0xc]
cmp edi, dword [esi + 8]
jne 0x6604454b
test eax, eax
je 0x66017789
test edx, edx
jne 0x66044554
mov edx, dword [eax]
mov dword [ecx + 0x10], edx
push eax
call fcn.6601778e
pop edi
pop esi
ret 4
mov edx, eax
mov eax, dword [eax]
jmp 0x6601775e
mov ecx, dword [eax]
mov dword [edx], ecx
jmp 0x66017783

Function at 0x660186ee
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
push esi
push edi
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [0x6610ed60], 1
mov esi, eax
mov ebx, 0x6610ece8
jne 0x66018714
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edi, edi
cmp esi, edi
je 0x66018788
mov eax, dword [esp + 0x10]
not eax
and word [esi + 0x30], ax
cmp word [esi + 0x30], di
jne 0x66018788
mov eax, dword [esi + 0x20]
cmp eax, edi
je 0x6601873a
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [esi + 0x20], edi
mov eax, dword [esi + 0x1c]
cmp eax, edi
je 0x6601874a
push eax
call fcn.660187ea
mov dword [esi + 0x1c], edi
mov eax, dword [0x6610ee94]
mov ecx, dword [0x6610f310]
add ecx, eax
test ecx, ecx
jne 0x66018760
call fcn.660187f6
mov ecx, esi
call fcn.6601887a
cmp dword [0x6610ee9c], edi
jne 0x66018775
mov dword [0x6610eea0], edi
push esi
call fcn.660175eb
push edi
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp dword [0x6610ed60], 1
jne 0x66018798
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
ret 4
Function at 0x66019502
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 4]
lea eax, [esi + 0x68]
push eax
call fcn.6600354f
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp byte [ebp + 0x10], bl
je 0x66019543
cmp dword [esi + 0x20], edi
je 0x6603bd67
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x28]
dec dword [esi + 8]
mov eax, dword [esi + 8]
dec dword [esi + 0x10]
cmp eax, 1
je 0x6603bd6f
cmp byte [ebp + 0xc], bl
je 0x66019584
xor eax, eax
cmp dword [edi + 0x2c], 2
sete al
test al, al
jne 0x6603bdb0
mov ecx, edi
call fcn.66019595
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, edi
jne 0x66019577
push ebx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp edi, ebx
je 0x66019584
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax + 0x20]
lea ecx, [ebp - 4]
call fcn.66003582
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0xc
mov dword [esi + 0x20], ebx
jmp 0x6601952a
cmp byte [esi], bl
jne 0x66019543
cmp dword [esi + 0xc], 0xffffffff
jne 0x66019543
xor eax, eax
cmp dword [edi + 0x2c], 1
sete al
test al, al
jne 0x66019543
mov eax, dword [esi + 0x14]
lea ecx, [esi + 0x14]
call dword [eax + 0x10]
push ebx
push ebx
push 0x1069
push dword [eax + 0x14]
call dword [sym.imp.USER32.dll_PostThreadMessageA]
jmp 0x66019543
cmp dword [edi + 0x30], 4
jne 0x66019559
mov ecx, dword [edi + 0xf8]
cmp ecx, ebx
je 0x6603bdd4
mov edx, dword [edi + 0xf4]
lea eax, [edi + 0xf4]
mov dword [ecx], edx
mov dword [eax], ebx
push dword [edi + 0xf4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x66019559

Function at 0x6601b038
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
lea eax, [ebp - 0xc]
push edi
push eax
lea eax, [ebp - 4]
and dword [ebp - 4], 0
push eax
lea eax, [ebp - 8]
push eax
push 0
push dword [ebp + 8]
call fcn.6601b07a
mov esi, eax
test esi, esi
jl 0x660472f6
cmp byte [0x6610f190], 0
jne 0x66047357
mov eax, dword [ebp - 8]
pop edi
pop esi
leave
ret 4
cmp dword [ebp - 4], 0
push esi
jne 0x66047302
call fcn.66024fdc
call fcn.6600fcf2
test eax, eax
je 0x66047353
push esi
call fcn.6600fcf2
mov edi, eax
or edi, 0x800a0000
push dword [0x6610ee98]
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call esi
add eax, 0x78
push eax
push edi
call fcn.6602503e
push dword [0x6610ee98]
call esi
mov ecx, dword [ebp - 4]
push dword [0x6610ee98]
mov dword [eax + 0x80], ecx
call esi
add eax, 0x78
push eax
call fcn.66024702
xor edi, edi
jmp 0x66047319
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.660d78ef
jmp 0x6601b071