joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4276c0
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x43c
mov eax, dword [0x55e0a0]
xor eax, esp
mov dword [esp + 0x438], eax
push ebx
mov ebx, ecx
push esi
push edi
lea edi, [ebx + 8]
push edi
call fcn.00428690
add esp, 4
lea eax, [esp + 0x10]
lea esi, [ebx + 0xc]
mov ecx, esi
push eax
call fcn.00407f50
mov eax, dword [0x5624e4]
test eax, eax
je 0x427729
lea ecx, [esp + 0x10]
push ecx
push dword [ebx + 0xa0]
push dword [ebx + 0xa8]
push dword [ebx + 0xa4]
push dword [ebx]
call eax
add esp, 0x14
test al, al
jne 0x4278ab
test byte [0x55f664], 2
je 0x427749
cmp dword [esp + 0x24], 0x10
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x42774e
cmp dword [ebx], 2
jl 0x427789
cmp dword [esp + 0x24], 0x10
lea edi, [esp + 0x10]
mov esi, dword [esp + 0x20]
cmovae edi, dword [esp + 0x10]
call fcn.004e624f
add eax, 0x40
push eax
push 1
push esi
push edi
call fcn.004e4de8
call fcn.004e624f
add eax, 0x40
push eax
call fcn.004e4b52
lea edi, [ebx + 8]
add esp, 0x14
lea esi, [ebx + 0xc]
test byte [0x55f664], 1
je 0x427828
xor edx, edx
xor ecx, ecx
call fcn.00426dd0
cmp dword [0x5624bc], 0
jne 0x4277b8
push 0xffffffffffffffff
push dword [0x5624c4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4277c4
push dword [0x5624e0]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.00426fb0
test al, al
je 0x427805
push 2
push 0
push 0
push dword [0x5624e8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esp + 0x24], 0x10
lea ecx, [esp + 0xc]
push 0
push ecx
push dword [esp + 0x28]
lea eax, [esp + 0x1c]
cmovae eax, dword [esp + 0x1c]
push eax
push dword [0x5624e8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x5624bc], 0
jne 0x42781c
push dword [0x5624c4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x427828
push dword [0x5624e0]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebx], 3
jne 0x4278ab
mov ecx, 0x400
lea eax, [esp + 0x10]
cmp dword [esp + 0x20], ecx
cmovb ecx, dword [esp + 0x20]
cmp dword [esp + 0x24], 0x10
cmovae eax, dword [esp + 0x10]
test ecx, ecx
je 0x42785c
push ecx
push eax
lea eax, [esp + 0x48]
push eax
call fcn.004dcd00
add esp, 0xc
lea eax, [esp + 0x40]
push eax
call fcn.0043bec0
add esp, 4
cmp dword [0x5624dc], 0
je 0x4278a1
lea eax, [esp + 0x28]
mov ecx, esi
push eax
call fcn.00407f50
lea eax, [esp + 0x28]
push eax
call dword [0x5624dc]
add esp, 4
cmp dword [esp + 0x3c], 0x10
jb 0x4278ab
push dword [esp + 0x28]
call fcn.004daf7e
add esp, 4
jmp 0x4278ab
cmp byte [0x5635f4], 0
jne 0x4278f8
int3
cmp dword [esp + 0x24], 0x10
jb 0x4278be
push dword [esp + 0x10]
call fcn.004daf7e
add esp, 4
push dword [ebx + 0xac]
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea esi, [edi + 0x50]
mov ecx, esi
call fcn.00404440
push esi
mov dword [esi], vtable.std::ios_base.0
call fcn.00511ca1
mov ecx, dword [esp + 0x448]
add esp, 4
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004dbbe3
mov esp, ebp
pop ebp
ret
push 1
call fcn.004e80dd
int3
Function at 0x428ce0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov dword [ebp - 4], 0
cmp dword [ebp + 0xc], 0
push edi
mov edi, ecx
jne 0x428d05
cmp byte [0x5635f4], 0
jne 0x428e28
int3
cmp dword [edi + 0x10], 0
lea ebx, [edi + 0x10]
jne 0x428de0
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [edi + 0x18]
call fcn.00429010
push eax
lea ecx, [ebp - 8]
call fcn.004290f0
mov ecx, eax
add esp, 8
mov dword [ebp + 0xc], ecx
mov edx, dword [ecx]
test edx, edx
je 0x428d42
mov ecx, 1
lock xadd dword [edx], ecx
mov ecx, dword [edi + 4]
push esi
or esi, 0xffffffff
mov dword [edi + 4], edx
test ecx, ecx
je 0x428d67
mov eax, esi
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x428d67
mov eax, dword [ecx + 4]
push ecx
call eax
add esp, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
mov eax, dword [eax + 4]
mov dword [edi + 8], eax
test ecx, ecx
je 0x428d8e
mov eax, esi
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x428d8e
mov eax, dword [ecx + 4]
push ecx
call eax
add esp, 4
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x428dae
lock xadd dword [ecx], esi
dec esi
setne al
test al, al
jne 0x428dae
test ecx, ecx
je 0x428dae
push ecx
call fcn.004daf7e
add esp, 4
mov esi, dword [ebp + 8]
mov dword [edi + 0xc], esi
call fcn.00440690
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0xc
push 0xffffffffffffffff
push edi
push 0x428f10
push esi
push ebx
mov dword [edi + 0x14], eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
pop esi
test eax, eax
jne 0x428dea
mov dword [edi + 0xc], eax
mov dword [ebx], eax
pop edi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
call fcn.00440690
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp + 0xc], edi
mov edx, dword [eax + 0x5c]
lea ecx, [eax + 0x58]
mov eax, dword [ecx]
cmp eax, edx
je 0x428e15
cmp dword [eax], edi
je 0x428e11
add eax, 4
cmp eax, edx
jne 0x428e06
cmp eax, edx
jne 0x428e1e
lea eax, [ebp + 0xc]
push eax
call fcn.00442780
pop edi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 8
push 1
call fcn.004e80dd
int3

Function at 0x428e60
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push esi
mov esi, ecx
mov dword [esp + 4], 0
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x428e80
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_UnregisterWaitEx]
test eax, eax
je 0x428e79
mov eax, dword [esi + 0x18]
test eax, eax
je 0x428ebe
mov byte [eax + 5], 0
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x18], 0
test ecx, ecx
je 0x428ebe
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x428ebe
push ecx
call fcn.004daf7e
add esp, 4
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call fcn.00440690
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
lea ecx, [eax + 0x54]
call fcn.00441ab0
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x433400
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov dword [ebp - 8], 0
mov esi, ecx
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 4], esi
test ebx, ebx
jns 0x433426
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x563598]
push edi
xor edi, edi
test ecx, ecx
je 0x43346a
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
test al, al
je 0x43346a
mov ecx, dword [0x563598]
lea edi, [esi + 0x1c]
mov eax, ebx
mov dword [ebp + 0x14], str.File::Read
cdq
push edx
mov esi, dword [ecx]
push eax
mov eax, dword [ebp - 4]
add eax, 4
push eax
push edi
push str.File::Read
call dword [esi + 0x10]
mov esi, dword [ebp - 4]
jmp 0x433470
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0x14], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
movdqu xmmword [ebp - 0x18], xmm0
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0x1c], 0
push eax
push ebx
push dword [ebp + 0x10]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4334a8
mov esi, dword [ebp - 8]
jmp 0x4334ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
jne 0x4334b7
xor esi, esi
jmp 0x4334ba
or esi, 0xffffffff
test edi, edi
je 0x4334d1
mov ecx, dword [0x563598]
test ecx, ecx
je 0x4334d1
mov edx, dword [ecx]
push edi
push dword [ebp + 0x14]
call dword [edx + 0x14]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4341b0
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
push ecx
xor eax, eax
mov dword [ebp - 4], 0
push ebx
mov ebx, dword [ebp + 0xc]
test bl, 1
push esi
mov esi, ecx
mov ecx, 3
cmovne eax, ecx
test bl, 2
mov ecx, 1
cmovne eax, ecx
mov ecx, ebx
and ecx, 4
mov dword [ebp - 4], ecx
mov ecx, 4
cmovne eax, ecx
test bl, 8
mov ecx, 2
cmovne eax, ecx
mov dword [ebp + 0xc], eax
test bl, 0x10
je 0x434206
mov dword [ebp + 0xc], 5
jmp 0x43420e
test eax, eax
je 0x43436b
xor edx, edx
mov eax, 4
test bl, 0x40
push edi
mov edi, 0x40000000
cmovne edx, edi
test bl, 0x80
cmovne edx, eax
test bl, 0x20
je 0x434232
or edx, 0x80000000
test ebx, 0x4000
je 0x434240
or edx, 0x100
test ebx, 0x40000
je 0x43424e
or edx, 0x20000000
mov ecx, ebx
shr ecx, 8
not ecx
and ecx, 1
test ebx, 0x200
jne 0x434263
or ecx, 2
test ebx, 0x8000
je 0x43426d
or ecx, eax
xor eax, eax
test ebx, 0x400
cmovne eax, edi
test ebx, 0x800
je 0x434285
or eax, 0x100
test ebx, 0x1000
je 0x434290
or eax, 2
test ebx, 0x2000
je 0x43429d
or eax, 0x4000000
test ebx, 0x20000
je 0x4342aa
or eax, 0x2000000
mov edi, dword [ebp + 8]
cmp dword [edi + 0x14], 8
jb 0x4342b5
mov edi, dword [edi]
push 0
push eax
push dword [ebp + 0xc]
push 0
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp dword [esi], edi
je 0x43430e
mov ecx, esi
call fcn.00405a50
test edi, edi
je 0x43430e
cmp edi, 0xffffffff
je 0x43430e
mov dword [esi], edi
call fcn.00416a40
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 4]
mov ecx, dword [0x562498]
mov dword [ebp + 8], eax
test ecx, ecx
jne 0x434301
call fcn.004249c0
mov ecx, dword [0x562498]
push dword [ebp + 0xc]
mov eax, dword [ecx]
push dword [ebp + 8]
push esi
push edi
call dword [eax + 4]
mov eax, dword [esi]
pop edi
test eax, eax
je 0x43435b
cmp eax, 0xffffffff
je 0x43435b
mov eax, ebx
mov dword [esi + 0x20], 0
shr eax, 0xa
and al, 1
cmp dword [ebp - 4], 0
mov byte [esi + 0x25], al
je 0x43434a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
setne al
mov byte [esi + 0x24], al
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
test bl, 0xa
je 0x43436b
mov byte [esi + 0x24], 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00433ec0
mov dword [esi + 0x20], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x434520
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc4
push ebx
xor ebx, ebx
push esi
mov dword [ebp - 4], ebx
push edi
mov dword [ebp - 4], 0xffffffff
jmp 0x434540
mov edi, 8
lea eax, [ebp - 0x14]
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], eax
mov edi, edi
lea ecx, [ebp - 8]
cmp edi, 0xffffffff
lea esi, [ebp - 4]
cmovbe esi, ecx
mov esi, dword [esi]
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_SystemFunction036]
test al, al
jne 0x434573
cmp byte [0x5635f4], al
jne 0x4345b7
int3
test bl, 1
je 0x434586
lea ecx, [ebp - 0xc4]
and ebx, 0xfffffffe
call fcn.004276c0
mov eax, dword [ebp - 0xc]
sub edi, esi
add eax, esi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], eax
test edi, edi
jne 0x434550
cmp dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 0x14]
jb 0x4345a9
ja 0x434540
cmp eax, 0xffff7fff
ja 0x434540
pop edi
pop esi
and eax, 0x7fff
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret
push 1
call fcn.004e80dd
int3

Function at 0x436b90
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 4], 0
push edi
mov edi, edx
test ebx, ebx
je 0x436bfa
cmp dword [0x563780], 0
jne 0x436be7
push 0x44
call fcn.004dbda6
add esp, 4
test eax, eax
je 0x436bc8
mov ecx, eax
call fcn.004242f0
mov edx, eax
jmp 0x436bca
xor edx, edx
mov ecx, edx
mov esi, 0x563780
xor eax, eax
lock cmpxchg dword [esi], ecx
test eax, eax
je 0x436be7
test edx, edx
je 0x436be7
push ecx
mov ecx, edx
call fcn.004242b0
mov eax, dword [0x563780]
cmp dword [eax], 1
jl 0x436bfa
mov dword [ebp - 4], 0x10000
jmp 0x436bfc
xor ebx, ebx
push 0xc
call fcn.004dbda6
add esp, 4
mov esi, eax
push 0
push dword [ebp - 4]
mov dword [esi], edi
mov edi, dword [ebp + 8]
test edi, edi
push esi
push 0x436a90
setne cl
push ebx
mov byte [esi + 4], cl
mov ecx, dword [ebp + 0xc]
push 0
mov dword [esi + 8], ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x436c45
push esi
call fcn.004daf7e
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x436c54
mov dword [edi], eax
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x43b150
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
mov edi, ecx
cmp dword [edi + 0x14], 8
jb 0x43b162
mov edi, dword [edi]
lea eax, [ebp - 8]
push eax
push edi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov ebx, eax
test ebx, ebx
jne 0x43b179
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push 1
push ebx
call fcn.004dcb8a
mov esi, eax
add esp, 8
test esi, esi
je 0x43b1f2
push esi
push ebx
push dword [ebp - 8]
push edi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x43b1e9
lea eax, [ebp - 0xc]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 4]
push eax
push str.VarFileInfoTranslation
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x43b1e9
cmp dword [ebp - 4], 0
je 0x43b1e9
push 0x10
call fcn.004dbda6
add esp, 4
test eax, eax
je 0x43b1f2
mov edx, dword [ebp - 4]
movzx ecx, word [edx + 2]
push ecx
movzx ecx, word [edx]
push ecx
push esi
mov ecx, eax
call fcn.0043af70
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.004dcbca
add esp, 4
pop esi
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x43bb30
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x55e0a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
push edi
mov edi, ecx
mov dword [ebp - 0x224], eax
movzx eax, word [edi + 8]
mov word [ebp - 0x14], ax
movzx eax, word [edi + 0xa]
mov word [ebp - 0x12], ax
call esi
mov word [ebp - 0x10], ax
movzx eax, word [edi + 0xa]
mov word [ebp - 0xe], ax
movzx eax, word [edi + 8]
mov word [ebp - 0xc], ax
mov eax, 0x4e4
mov word [ebp - 0xa], ax
call esi
mov word [ebp - 8], ax
xor esi, esi
mov eax, 0x4e4
mov word [ebp - 6], ax
lea ebx, [ebx]
movzx eax, word [ebp + esi*2 - 0x12]
movzx ecx, word [ebp + esi*2 - 0x14]
add esi, 2
push ebx
push eax
push ecx
push 0x54bdb0
push 0x104
lea eax, [ebp - 0x21c]
push 0x104
push eax
call fcn.004dee57
add esp, 0x1c
mov dword [ebp - 0x220], 0
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x21c]
push eax
push dword [edi + 4]
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x43bc04
mov edx, dword [ebp - 0x220]
test edx, edx
jne 0x43bc1e
cmp esi, 8
jb 0x43bba0
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dbbe3
mov esp, ebp
pop ebp
ret 8
cmp word [edx], 0
jne 0x43bc48
mov ecx, dword [ebp - 0x224]
xor eax, eax
push eax
push edx
call fcn.004063e0
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dbbe3
mov esp, ebp
pop ebp
ret 8
mov eax, edx
lea esi, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x43bc50
mov ecx, dword [ebp - 0x224]
sub eax, esi
sar eax, 1
push eax
push edx
call fcn.004063e0
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004dbbe3
mov esp, ebp
pop ebp
ret 8
Function at 0x43ead0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], 0
mov dword [ebp - 8], edi
lea ecx, [ebp - 4]
cmp dword [edi + 0x70], 0
je 0x43eb27
push dword [edi + 0x70]
mov eax, dword [edi + 0x74]
push ecx
call eax
add esp, 8
mov esi, dword [eax]
mov dword [eax], 0
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x43eb0e
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [edi + 4]
mov dword [edi + 4], 0
test ecx, ecx
je 0x43eb22
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [edi + 4], esi
jmp 0x43eb5b
mov edx, dword [edi + 8]
call fcn.0043e290
mov esi, dword [eax]
mov dword [eax], 0
mov ecx, dword [edi + 4]
mov dword [edi + 4], 0
test ecx, ecx
je 0x43eb4b
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [ebp - 4]
mov dword [edi + 4], esi
test ecx, ecx
je 0x43eb5b
mov eax, dword [ecx]
push 1
call dword [eax]
call fcn.00440690
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x43eb72
call fcn.00461320
push ebx
mov ebx, dword [edi + 0xb4]
lea esi, [ebx + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebx + 0x34], 0
mov byte [ebx + 0x42], 1
je 0x43eb9c
mov eax, dword [ebx + 0x38]
mov ecx, dword [eax + 4]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov byte [ebx + 0x40], 1
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
call ebx
mov edi, dword [edi + 0xb8]
lea esi, [edi + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push esi
mov dword [edi + 0xc], eax
call ebx
mov esi, dword [ebp - 8]
pop ebx
mov ecx, dword [esi + 0xb8]
mov dword [esi + 0xb8], 0
test ecx, ecx
je 0x43ec0c
add ecx, 4
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x43ec0c
test ecx, ecx
je 0x43ec05
mov eax, dword [ecx - 4]
add ecx, 0xfffffffc
call dword [eax + 0xc]
mov ecx, esi
call fcn.0043ecb0
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor ecx, ecx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, esi
call fcn.0043ecb0
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x43ecb0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov dword [ebp - 4], 0
push edi
mov ecx, dword [esi + 0xc0]
mov dword [esi + 0xc0], 0
test ecx, ecx
je 0x43ecd9
push ecx
call fcn.00440d40
push 4
mov dword [esi + 0xc0], 0
call fcn.004dbda6
mov edi, eax
add esp, 4
test edi, edi
je 0x43ed24
mov eax, dword [esi + 0xbc]
mov dword [edi], eax
test eax, eax
je 0x43ed0b
mov ecx, 1
add eax, 4
lock xadd dword [eax], ecx
call fcn.004604f0
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x43ed26
call fcn.00461320
jmp 0x43ed26
xor edi, edi
mov ecx, dword [esi + 0xc0]
mov dword [esi + 0xc0], 0
test ecx, ecx
je 0x43ed40
push ecx
call fcn.00440d40
mov dword [esi + 0xc0], edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x440d40
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, ecx
mov dword [ebp - 4], 0
call fcn.004604f0
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x440d68
call fcn.00461320
mov ecx, dword [esi]
test ecx, ecx
je 0x440d90
add ecx, 4
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x440d90
test ecx, ecx
je 0x440d89
add ecx, 0xfffffffc
jmp 0x440d8b
xor ecx, ecx
mov eax, dword [ecx]
call dword [eax + 0xc]
push esi
call fcn.004daf7e
add esp, 4
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x451200
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xbc
push ebx
push esi
mov esi, edx
mov dword [ebp - 4], ecx
xor ebx, ebx
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], ebx
test esi, esi
je 0x45126c
mov dword [ebp - 8], 0xffffffff
push edi
lea edx, [ebp - 0xc]
cmp esi, 0xffffffff
lea eax, [ebp - 8]
cmovbe eax, edx
mov edi, dword [eax]
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_SystemFunction036]
test al, al
jne 0x451247
cmp byte [0x5635f4], al
jne 0x451272
int3
test bl, 1
je 0x45125a
lea ecx, [ebp - 0xbc]
and ebx, 0xfffffffe
call fcn.004276c0
mov ecx, dword [ebp - 4]
sub esi, edi
add ecx, edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], ecx
test esi, esi
jne 0x451224
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
call fcn.004e80dd
int3

Function at 0x451d00
Capabilities:
Get thread local storage value

Disassembly:
push esi
mov esi, ecx
call fcn.00452fe0
mov eax, dword [0x55f814]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
test edx, edx
jne 0x451d21
call fcn.004894c0
mov edx, eax
mov eax, dword [0x5635d8]
cmp dword [edx + eax*4], 0
jne 0x451d69
push 0x70
call fcn.004dbda6
add esp, 4
test eax, eax
je 0x451d46
push esi
mov ecx, eax
call fcn.004519f0
mov esi, eax
jmp 0x451d48
xor esi, esi
mov eax, dword [0x55f814]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
test ecx, ecx
jne 0x451d61
call fcn.004894c0
mov ecx, eax
mov eax, dword [0x5635d8]
mov dword [ecx + eax*4], esi
pop esi
ret
Function at 0x451d70
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x5635d4]
push ebx
push esi
push edi
test eax, eax
jne 0x451d80
pop edi
pop esi
pop ebx
ret
mov eax, dword [0x55f814]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
test ecx, ecx
jne 0x451d99
call fcn.004894c0
mov ecx, eax
mov eax, dword [0x5635d8]
mov eax, dword [ecx + eax*4]
test eax, eax
jne 0x451e30
mov ecx, 0x5635b0
xor edi, edi
xor ebx, ebx
call fcn.00431e10
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x5635ac]
test ecx, ecx
je 0x451dd9
mov eax, dword [ecx + 4]
mov edi, ecx
mov dword [0x5635ac], eax
mov dword [ecx + 4], ebx
jmp 0x451de6
mov ebx, dword [0x5635e4]
inc ebx
mov dword [0x5635e4], ebx
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
jne 0x451e0d
push 0x70
call fcn.004dbda6
add esp, 4
test eax, eax
je 0x451e0b
push ebx
mov ecx, eax
call fcn.00451af0
mov edi, eax
jmp 0x451e0d
xor edi, edi
mov eax, dword [0x55f814]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
test ecx, ecx
jne 0x451e26
call fcn.004894c0
mov ecx, eax
mov eax, dword [0x5635d8]
mov dword [ecx + eax*4], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret

Function at 0x45fb00
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov dword [ebp - 4], 0
mov eax, dword [edx]
push edi
mov dword [esi], eax
mov eax, dword [edx + 4]
mov dword [esi + 4], eax
mov eax, dword [edx + 8]
mov dword [esi + 8], eax
mov eax, dword [edx + 0xc]
mov dword [esi + 0xc], eax
call fcn.004604f0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, 1
mov eax, dword [eax]
mov dword [esi + 0x10], eax
test eax, eax
je 0x45fb4d
mov ecx, ebx
add eax, 4
lock xadd dword [eax], ecx
mov edx, dword [ebp + 0xc]
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov edx, dword [edx]
test edx, edx
je 0x45fb78
mov eax, ebx
lock xadd dword [edx], eax
mov ecx, dword [esi + 0x1c]
or edi, 0xffffffff
mov dword [esi + 0x1c], edx
test ecx, ecx
je 0x45fb9c
mov eax, edi
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x45fb9c
mov eax, dword [ecx + 4]
push ecx
call eax
add esp, 4
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
mov dword [esi + 0x20], eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
test eax, eax
je 0x45fbb2
lock xadd dword [eax], ebx
mov ecx, dword [esi + 0x14]
mov dword [esi + 0x14], eax
test ecx, ecx
je 0x45fbd1
lock xadd dword [ecx], edi
dec edi
setne al
test al, al
jne 0x45fbd1
mov eax, dword [ecx + 4]
push ecx
call eax
add esp, 4
mov eax, dword [ebp + 0x10]
pop edi
mov eax, dword [eax + 4]
mov dword [esi + 0x18], eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc