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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x3c
mov esi, dword [0x49c308]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp], esi
mov dword [esp + 0x1c], eax
call edi
sub esp, 4
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
mov dword [esp], edx
call eax
mov eax, dword [esi]
sub esp, 4
test eax, eax
je 0x4098a2
mov ecx, ebx
call eax
test al, al
je 0x409990
mov eax, dword [0x498478]
test eax, eax
je 0x4098b7
mov ecx, ebx
call eax
test al, al
je 0x409990
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4099a0
mov ecx, dword [0x49c308]
mov dword [esp + 0x20], ecx
call ebp
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x24], eax
mov dword [esp], ecx
call edi
sub esp, 4
mov edx, dword [esp + 0x24]
mov dword [esp + 0x20], eax
mov dword [esp], edx
mov edx, dword [esp + 0x1c]
call edx
sub esp, 4
mov eax, dword [esp + 0x20]
mov edx, dword [eax + 0x14]
test edx, edx
je 0x409901
add dword [edx - 8], 8
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x409960
lea ecx, [eax - 8]
mov dword [esp + 0x24], ecx
mov ecx, dword [eax - 8]
sub ecx, 8
mov dword [eax - 8], ecx
cmp ecx, 7
ja 0x409960
mov ecx, dword [0x49c308]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], ecx
call ebp
mov ecx, dword [esp + 0x28]
mov ebp, eax
mov dword [esp], ecx
call edi
sub esp, 4
mov edi, eax
mov dword [esp], ebp
mov eax, dword [esp + 0x1c]
add edi, 0x2c
call eax
sub esp, 4
mov ecx, dword [esp + 0x24]
mov dword [esp], edi
mov dword [esp + 4], ecx
call fcn.00405190
mov edx, dword [esp + 0x2c]
mov dword [ebx + 0x14], edx
mov ecx, dword [esp + 0x20]
mov edx, ebx
add ecx, 0x14
call fcn.00406e10
mov dword [esp + 4], 1
mov eax, dword [esi + 0x10]
add eax, 8
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_longjmp]
lea esi, [esi]
nop
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x498470]
test eax, eax
je 0x4099ad
mov ecx, ebx
call eax
mov ecx, ebx
call fcn.00409510
mov dword [esp], 1
call sub.msvcrt.dll_exit
Function at 0x4099c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x2c
mov ecx, dword [ecx + 8]
mov edi, dword [esp + 0x40]
test ecx, ecx
jne 0x4099d7
mov dword [ebx + 8], edx
test edi, edi
je 0x409a83
mov eax, dword [esp + 0x44]
test eax, eax
je 0x409a83
mov ecx, dword [ebx + 0x10]
mov edx, 0x49c860
call fcn.00409d00
mov esi, eax
test eax, eax
je 0x409a02
add dword [eax - 8], 8
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x409a5f
lea ecx, [eax - 8]
mov dword [esp + 0x18], ecx
mov ecx, dword [eax - 8]
lea edx, [ecx - 8]
mov dword [eax - 8], edx
cmp edx, 7
ja 0x409a5f
mov ebp, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x1c], eax
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebp, eax
mov edx, dword [esp + 0x1c]
add ebp, 0x2c
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov ecx, dword [esp + 0x18]
mov dword [esp], ebp
mov dword [esp + 4], ecx
call fcn.00405190
mov dword [ebx + 0x10], esi
mov eax, dword [esi]
lea edx, [eax + 1]
mov dword [esi], edx
lea edx, [eax + eax*2]
mov eax, dword [ebx + 0x10]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x48]
mov dword [eax + 8], edi
mov edi, dword [esp + 0x44]
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edi
mov ecx, ebx
call fcn.00409850
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret 0xc

Function at 0x409de0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov ebx, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebx + 0x14]
sub esp, 4
test ecx, ecx
je 0x409e1e
add esp, 0x14
pop ebx
pop esi
jmp fcn.00409850
mov eax, 0x49c7a0
call fcn.00408500
mov ecx, 0x473c60
mov dword [eax], 0x49c7c0
mov esi, dword [eax + 0xc]
mov ebx, eax
mov dword [eax + 8], str.ReraiseDefect
call fcn.00408260
mov dword [ebx + 0xc], eax
test esi, esi
je 0x409e63
mov eax, dword [esi - 8]
lea edx, [esi - 8]
sub eax, 8
mov dword [esi - 8], eax
cmp eax, 7
ja 0x409e63
mov eax, edx
call fcn.004052b0
mov dword [esp + 8], 0x31
mov edx, str.ReraiseDefect
mov ecx, ebx
mov dword [esp + 4], str.fatal.nim
mov dword [esp], str.sysFatal
call fcn.004099c0
sub esp, 0xc
lea esi, [esi]
Function at 0x40a180
Capabilities:
Get thread local storage value

Disassembly:
test edx, edx
je 0x40a3b0
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
movzx eax, byte [edx]
mov byte [esp + 0x1c], al
test al, al
je 0x40a3a0
lea eax, [edx + 1]
mov ebx, dword [ecx]
mov ebp, ecx
mov edi, eax
jmp 0x40a1c6
add edi, 1
mov dword [ebp], ebx
movzx eax, byte [edi - 1]
mov byte [esp + 0x1c], al
test al, al
je 0x40a3a0
test ebx, ebx
je 0x40a350
mov edx, dword [ebx + 4]
mov esi, dword [ebx]
mov eax, edx
lea ecx, [esi + 1]
and eax, 0x3fffffff
cmp eax, esi
jg 0x40a298
test eax, eax
je 0x40a380
and edx, 0x3fff0000
je 0x40a330
lea eax, [eax + eax*2]
sar eax, 1
mov dword [esp + 0x28], eax
lea edx, [eax + 9]
mov dword [esp + 0x2c], eax
mov esi, dword [0x49c308]
mov dword [esp + 0x24], edx
add ebx, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x20], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
mov ecx, dword [esp + 0x20]
add esi, 0x20
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, 0x472020
sub esp, 4
mov dword [esp], esi
mov edx, dword [esp + 0x24]
call fcn.004082e0
sub esp, 4
mov edx, eax
mov eax, dword [esp + 0x2c]
mov dword [edx], 0
mov dword [esp + 0x24], edx
mov dword [edx + 4], eax
mov esi, dword [ebx - 8]
lea eax, [edx + 8]
lea ecx, [esi + 1]
mov dword [edx], esi
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [esp + 0x20], ecx
call sub.msvcrt.dll_memcpy
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
mov dword [edx + 4], eax
mov ebx, edx
movzx eax, byte [esp + 0x1c]
mov byte [ebx + esi + 8], al
mov byte [ebx + ecx + 8], 0
mov dword [ebx], ecx
mov dword [esp], ebp
call fcn.00406db0
test al, al
jne 0x40a1b0
add dword [ebx - 8], 8
mov eax, dword [ebp]
cmp eax, 0xfff
jbe 0x40a1b0
lea ecx, [eax - 8]
mov dword [esp + 0x1c], ecx
mov ecx, dword [eax - 8]
lea edx, [ecx - 8]
mov dword [eax - 8], edx
cmp edx, 7
ja 0x40a1b0
mov esi, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x20], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
mov edx, dword [esp + 0x20]
add esi, 0x2c
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov ecx, dword [esp + 0x1c]
mov dword [esp], esi
mov dword [esp + 4], ecx
call fcn.00405190
jmp 0x40a1b0
lea esi, [eax + eax]
mov eax, 7
cmp esi, eax
mov dword [esp + 0x28], esi
cmovge eax, esi
mov dword [esp + 0x2c], eax
lea edx, [eax + 9]
jmp 0x40a209
mov ecx, 0x472020
mov edx, 0x10
xor esi, esi
call fcn.00408da0
mov ecx, 1
mov dword [eax + 4], 7
mov ebx, eax
mov dword [eax], 0
jmp 0x40a298
mov dword [esp + 0x2c], 7
mov edx, 0x10
mov dword [esp + 0x28], 4
jmp 0x40a209
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
ret
Function at 0x40a4d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x1c
test ecx, ecx
je 0x40a559
mov eax, dword [ecx + 4]
test eax, eax
js 0x40a559
mov edi, dword [ecx]
mov eax, 7
mov esi, dword [0x49c308]
cmp edi, eax
cmovl edi, eax
add ebx, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
mov dword [esp], ebp
add esi, 0x20
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea edx, [edi + 9]
mov ecx, 0x472020
sub esp, 4
mov dword [esp], esi
call fcn.004082e0
mov dword [eax + 4], edi
mov esi, eax
sub esp, 4
mov dword [eax], 0
mov eax, dword [ebx - 8]
lea edx, [esi + 8]
mov dword [esi], eax
add eax, 1
mov dword [esp + 4], ebx
mov ebx, esi
mov dword [esp + 8], eax
mov dword [esp], edx
call sub.msvcrt.dll_memcpy
add esp, 0x1c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40a790
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
mov esi, ecx
push ebx
mov ebx, edx
sub esp, 0x2c
mov edx, dword [ecx + 0xc]
mov eax, dword [edx + 4]
test eax, eax
je 0x40a7c0
sub eax, 1
jo 0x40a83e
mov ecx, eax
add ecx, 8
jo 0x40a83e
not eax
and eax, ecx
jmp 0x40a7c5
mov eax, 8
mov ecx, ebx
imul ecx, dword [edx]
jo 0x40a83e
add eax, ecx
mov edi, eax
jo 0x40a83e
test byte [edx + 9], 1
je 0x40a830
mov ebp, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x1c], eax
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebp, eax
mov edx, dword [esp + 0x1c]
add ebp, 0x20
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, edi
mov ecx, esi
sub esp, 4
mov dword [esp], ebp
call fcn.004082e0
sub esp, 4
mov dword [eax], 0
mov dword [eax + 4], ebx
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00408420
jmp 0x40a818
call fcn.00409ba0
lea esi, [esi]
lea esi, [esi]
Function at 0x40a850
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, edx
sub esp, 0x1c
movzx eax, byte [edx]
cmp al, 2
je 0x40a878
cmp al, 3
je 0x40a8b8
cmp al, 1
je 0x40a8a0
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, dword [edx + 0x10]
xor esi, esi
test ebp, ebp
jle 0x40a86a
mov eax, dword [ebx + 0x14]
mov ecx, edi
mov edx, dword [eax + esi*4]
add esi, 1
call fcn.0040a850
cmp ebp, esi
jne 0x40a881
jmp 0x40a86a
add edi, dword [ebx + 4]
mov edx, dword [edx + 8]
add esp, 0x1c
pop ebx
mov ecx, edi
pop esi
pop edi
pop ebp
jmp 0x40a8f0
call fcn.00405640
mov edx, eax
test eax, eax
je 0x40a8ca
mov ecx, edi
call fcn.0040a850
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 4]
mov edx, dword [edx]
add eax, edi
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [esp + 8], edx
call sub.msvcrt.dll_memset
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
push ebp
push edi
push esi
mov esi, ecx
push ebx
mov ebx, edx
sub esp, 0x2c
movzx eax, byte [edx + 8]
sub eax, 4
cmp al, 0x18
ja case.0x40a909.1
movzx eax, al
jmp dword [eax*4 + 0x4733e8]
add esp, 0x2c
xor edx, edx
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00406e10
mov eax, dword [ebx]
mov dword [esp + 4], 0
mov dword [esp], esi
mov dword [esp + 8], eax
call sub.msvcrt.dll_memset
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, dword [edx + 0xc]
mov eax, dword [edx]
xor edi, edi
mov ecx, dword [ebp]
cdq
idiv ecx
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x40a936
imul ecx, edi
mov edx, ebp
add edi, 1
add ecx, esi
call 0x40a8f0
cmp dword [esp + 0x1c], edi
je 0x40a936
mov ebp, dword [ebx + 0xc]
mov ecx, dword [ebp]
jmp 0x40a955
mov edx, dword [edx + 0x10]
call fcn.0040a850
mov dword [esi], 0
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [edx + 0x10]
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.0040a850
Function at 0x40be80
Capabilities:
Get thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov ebx, dword [0x49c308]
mov edi, dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebx + 0x20]
sub esp, 4
test eax, eax
je 0x40bec2
cmp eax, edi
je 0x40bec5
cmp edi, eax
cmovl edi, eax
mov dword [ebx + 0x20], edi
add esp, 0x10
pop ebx
pop esi
pop edi
ret
Function at 0x40cb20
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov dword [ebp - 0x70], ecx
mov edi, dword [0x49c308]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
mov edx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp], edi
mov ebx, eax
mov dword [ebp - 0x74], edx
call edx
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov dword [ebp - 0x6c], eax
mov dword [esp], ebx
call edi
mov ebx, dword [0x49c308]
sub esp, 4
call esi
mov edx, dword [ebp - 0x74]
mov dword [esp], ebx
mov esi, eax
call edx
mov ebx, eax
sub esp, 4
mov dword [esp], esi
call edi
mov eax, dword [ebx + 0x10]
sub esp, 4
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x60]
mov dword [ebx + 0x10], eax
lea eax, [ebp - 0x58]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll__setjmp3
mov dword [ebp - 0x5c], eax
test eax, eax
jne 0x40cc47
mov edi, dword [ebp - 0x70]
lea edx, [ebp - 0x64]
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x68], 0
mov eax, dword [edi + 0xc]
mov dword [esp], 0x4d4720
mov dword [ebp - 0x64], eax
call fcn.0040c740
mov ecx, dword [ebp - 0x68]
sub esp, 4
call dword [edi + 8]
mov ebx, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebx + 0x10]
sub esp, 4
mov eax, dword [eax]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x6c]
mov eax, dword [eax + 4]
test eax, eax
je 0x40cc38
mov ebx, dword [eax]
sub ebx, 1
jns 0x40cc25
jmp 0x40cc38
call eax
sub ebx, 1
jb 0x40cc38
mov eax, dword [ebp - 0x6c]
mov eax, dword [eax + 4]
mov ecx, dword [eax + ebx*8 + 0xc]
mov eax, dword [eax + ebx*8 + 8]
test ecx, ecx
jne 0x40cc18
call eax
sub ebx, 1
jae 0x40cc1f
mov eax, dword [ebp - 0x5c]
test eax, eax
jne 0x40cc66
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [0x49c308]
call fcn.004031f0
mov edx, dword [eax + 0x10]
mov edx, dword [edx]
mov dword [ebp - 0x5c], 0
mov dword [eax + 0x10], edx
call fcn.0040ca40
call fcn.0040a740
lea esi, [esi]
nop
push edi
mov edi, ecx
push esi
push ebx
sub esp, 0x10
mov eax, dword [ecx + 0x106c]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x40ccb1
mov ebx, dword [eax + 8]
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], eax
call esi
sub esp, 0xc
test eax, eax
je 0x40ccc6
mov eax, ebx
test eax, eax
jne 0x40cc90
mov dword [edi + 0x106c], 0
add esp, 0x10
pop ebx
pop esi
pop edi
ret
mov dword [esp], str.virtualFree_failing_
call fcn.00403130
mov dword [esp], 1
call sub.msvcrt.dll_exit
nop
Function at 0x40cdc0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov eax, ecx
push edi
add eax, 0x14b0
push esi
push ebx
sub esp, 0x2c
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
lea esi, [esi]
mov eax, dword [esp + 0x18]
xor ebp, ebp
mov edi, eax
mov eax, dword [eax + 0xf4]
mov ebx, dword [edi]
mov dword [esp + 0x18], eax
test ebx, ebx
jle 0x40cd47
lea esi, [esi]
nop
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov eax, dword [edi + ebp*8 + 4]
mov dword [esp], eax
call esi
sub esp, 0xc
test eax, eax
je 0x40cda3
add ebp, 1
cmp ebx, ebp
jne 0x40cd20
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40cd00
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [eax + 0x106c]
jmp 0x40cd89
mov ebx, dword [eax + 8]
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], eax
call esi
sub esp, 0xc
test eax, eax
je 0x40cda3
mov eax, ebx
test eax, eax
jne 0x40cd68
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x106c], 0
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.virtualFree_failing_
call fcn.00403130
mov dword [esp], 1
call sub.msvcrt.dll_exit
lea esi, [esi]
nop
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [0x49c308]
mov esi, dword [esp + 0x40]
mov edi, dword [esi]
mov dword [esp], eax
mov dword [esp + 4], edi
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
mov dword [esp], eax
call fcn.0040be80
call fcn.004044d0
mov ecx, esi
call fcn.0040cb20
mov ebx, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebx + 0x54]
sub esp, 4
call fcn.0040cce0
mov dword [esi], 0
mov dword [esi + 8], 0
mov dword [esp], 0x496e94
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea edx, [edi - 8]
mov ecx, 0x496ec0
sub esp, 4
call fcn.00404df0
mov dword [esp], 0x496e94
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
sub esp, 4
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret 4
Function at 0x40cfa0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
mov edi, edx
push esi
push ebx
mov ebx, ecx
sub esp, 0x3c
mov dword [esp], 0x496e94
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, 0x3e90
mov ecx, 0x496ec0
sub esp, 4
call fcn.00404070
lea esi, [eax + 8]
mov dword [eax + 4], 1
mov dword [esp], 0x496e94
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
mov dword [esp + 8], 0x3e88
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x50]
mov dword [ebx], esi
mov dword [ebx + 8], edi
mov dword [ebx + 0xc], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x40cdc0
mov dword [esp + 4], 0xff000
mov dword [esp], 0
call dword [0x490100]
mov dword [ebx + 4], eax
sub esp, 0x18
test eax, eax
jle 0x40d058
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov eax, 0x49c4e0
call fcn.00408500
mov dword [eax], 0x49c500
mov esi, dword [eax + 0xc]
mov ebx, eax
mov dword [eax + 8], str.ResourceExhaustedError
mov dword [esp + 4], 0x1d
mov dword [esp], 0x472020
call fcn.004081c0
mov dword [eax + 4], 0x14
mov dword [eax], 0x14
mov dword [eax + 8], 0x6e6e6163
mov dword [eax + 0xc], 0x6320746f
mov dword [eax + 0x10], 0x74616572
mov dword [eax + 0x14], 0x68742065
mov dword [eax + 0x18], 0x64616572
mov byte [eax + 0x1c], 0
mov dword [ebx + 0xc], eax
test esi, esi
je 0x40d0d8
mov eax, dword [esi - 8]
lea edi, [esi - 8]
sub eax, 8
mov dword [esi - 8], eax
cmp eax, 7
jbe 0x40d170
mov eax, dword [ebx + 4]
test eax, eax
je 0x40d0f0
mov ecx, dword [eax - 8]
lea edi, [eax - 8]
lea edx, [ecx - 8]
mov dword [eax - 8], edx
cmp edx, 7
jbe 0x40d130
mov dword [ebx + 4], 0
mov ecx, ebx
mov edx, str.ResourceExhaustedError
mov dword [esp + 8], 0x113
mov dword [esp + 4], str.threads.nim
mov dword [esp], str.createThread
call fcn.004099c0
sub esp, 0xc
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov esi, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
mov dword [esp], ebp
add esi, 0x2c
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.00405190
jmp 0x40d0f0
mov esi, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
mov dword [esp], ebp
add esi, 0x2c
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.00405190
jmp 0x40d0d8
Function at 0x40d5f0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov ebx, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [ebx + 0x24]
mov eax, dword [ebx + 0x2c]
mov dword [ebx + 0x24], 0
sub esp, 4
cmp dword [ebx + 0x28], eax
jle 0x40d639
mov edx, dword [ebx + 0x10d0]
test edx, edx
js 0x40d65a
mov eax, dword [ebx + 0x50]
test eax, eax
jne 0x40d65a
lea ecx, [ebx + 0x20]
call fcn.00407fd0
mov eax, dword [ebx + 0x2c]
mov edx, 0x1f4
add eax, eax
cmp eax, edx
cmovl eax, edx
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x24], esi
add esp, 0x14
pop ebx
pop esi
ret
Function at 0x40d670
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x4c
mov eax, dword [ecx]
mov dword [esp + 0x2c], ecx
test eax, eax
je 0x40d7cd
mov eax, dword [eax]
mov dword [esp + 0x3c], eax
sub eax, 2
mov dword [esp + 0x30], eax
jno 0x40d735
jmp 0x40d836
mov eax, dword [esi]
cmp ebx, eax
jae 0x40d83b
mov ecx, ebx
add ecx, 1
jo 0x40d836
cmp ecx, eax
jae 0x40d827
mov edi, dword [esi + ecx*4 + 8]
test edi, edi
je 0x40d6c9
add dword [edi - 8], 8
mov eax, dword [esi + ebx*4 + 8]
test eax, eax
je 0x40d72f
lea edx, [eax - 8]
mov dword [esp + 0x28], edx
mov edx, dword [eax - 8]
sub edx, 8
mov dword [eax - 8], edx
cmp edx, 7
ja 0x40d72f
mov ebp, dword [0x49c308]
mov dword [esp + 0x38], ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x34], eax
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebp, eax
mov edx, dword [esp + 0x34]
add ebp, 0x2c
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov edx, dword [esp + 0x28]
mov dword [esp], ebp
mov dword [esp + 4], edx
call fcn.00405190
mov ecx, dword [esp + 0x38]
mov dword [esi + ebx*4 + 8], edi
mov ebx, ecx
cmp ebx, dword [esp + 0x30]
jg 0x40d760
mov eax, dword [esp + 0x2c]
mov esi, dword [eax]
test esi, esi
jne 0x40d6a0
mov eax, 0xffffffff
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0040a570
lea esi, [esi]
mov eax, dword [esp + 0x3c]
sub eax, 1
jo 0x40d836
test eax, eax
js 0x40d843
mov edi, dword [esp + 0x2c]
mov dword [esp], eax
mov edx, 0x4a0920
mov ecx, dword [edi]
call fcn.0040b370
sub esp, 4
mov ebx, eax
mov dword [esp], edi
call fcn.00406db0
test al, al
jne 0x40d7bf
test ebx, ebx
je 0x40d7a1
add dword [ebx - 8], 8
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
cmp eax, 0xfff
jbe 0x40d7bf
mov esi, dword [eax - 8]
lea edi, [eax - 8]
lea edx, [esi - 8]
mov dword [eax - 8], edx
cmp edx, 7
jbe 0x40d7e2
mov eax, dword [esp + 0x2c]
mov dword [eax], ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x3c], 0
mov dword [esp + 0x30], 0xfffffffe
jmp 0x40d735
mov esi, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
mov dword [esp], ebp
add esi, 0x2c
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.00405190
mov eax, dword [esp + 0x2c]
mov dword [eax], ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
sub eax, 1
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.0040a570
call fcn.00409ba0
sub eax, 1
jmp 0x40d74e
mov dword [esp], eax
sar eax, 0x1f
mov dword [esp + 0x10], 0x7fffffff
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
call fcn.0040b690
lea esi, [esi]
lea esi, [esi]