joyce8/EMBER2024-capa huggingface dataset:
Function at 0x423510
Capabilities:
Delete directory
Get common file path
Read file on windows
Set console window title

Disassembly:
mov eax, 0x1464
call fcn.0040e6d0
cmp dword [0x7ae3b8], 0x37
jne 0x423602
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
push 0x4046a8
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp]
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_FreeUserPhysicalPages]
push 0
lea edx, [esp + 0x868]
push edx
push 0x4046e0
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
push 0
lea eax, [esp + 0xc68]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea ecx, [esp + 4]
push ecx
push 0
lea edx, [esp + 0x14]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputA]
push 0x404714
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomW]
lea eax, [esp + 8]
push eax
push 0x404720
call dword [sym.imp.KERNEL32.dll_GetCompressedFileSizeA]
push 0x404748
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
push 0
lea ecx, [esp + 0x68]
push ecx
push 0
push 0x404790
push 0
call dword [sym.imp.KERNEL32.dll_FoldStringA]
lea edx, [esp + 0x464]
push edx
push 0
push 0x4047f0
push 0x404808
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0
push 0
push 0
push 0
push 0x40480c
push 0x404840
call dword [sym.imp.KERNEL32.dll_ReplaceFileW]
mov eax, dword [0x7ae3bc]
mov dword [esp], eax
mov eax, 0x5d1
add dword [esp], eax
mov ecx, dword [esp]
mov dl, byte [ecx + esi]
mov eax, dword [0x42e41c]
mov byte [eax + esi], dl
add esp, 0x1464
ret
Function at 0x4237c0
Capabilities:
Enumerate files on windows
Manipulate console buffer
Move file

Disassembly:
mov eax, dword [0x7ae3b8]
sub esp, 0x1d4
push ebx
push ebp
push esi
mov esi, dword [0x42e41c]
shr eax, 3
push edi
test eax, eax
je 0x423975
mov dword [esp + 0x38], 0x9e3779b9
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], eax
jmp 0x4237f6
mov esi, dword [esp + 0x1c]
cmp dword [0x7ae3b8], 0x1c
jne 0x423813
lea eax, [esp + 0x3c]
push eax
push 0
lea ecx, [esp + 0x4c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
mov edx, dword [0x428310]
mov ecx, dword [0x428314]
mov eax, dword [esi]
mov edi, dword [esi + 4]
mov dword [esp + 0x2c], edx
mov edx, dword [0x428318]
mov dword [esp + 0x30], ecx
mov ecx, dword [0x42831c]
mov dword [esp + 0x14], eax
mov ebx, 0xc6ef3720
mov dword [esp + 0x28], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], 0x20
jmp 0x423857
mov eax, dword [esp + 0x14]
mov edx, eax
mov ecx, eax
shr edx, 5
add edx, dword [esp + 0x34]
shl ecx, 4
add ecx, dword [esp + 0x28]
add eax, ebx
xor edx, ecx
xor edx, eax
sub edi, edx
mov ecx, edi
shl ecx, 4
mov dword [0x7ad33c], 0
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x2c]
add dword [esp + 0x10], eax
cmp dword [0x7ae3b8], 0x1be
lea ebp, [ebx + edi]
jne 0x4238ac
lea edx, [esp + 0x40]
push edx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputA]
mov esi, edi
shr esi, 5
add esi, dword [esp + 0x30]
cmp dword [0x7ae3b8], 0x979
mov dword [0x7ad340], 0xff6b3619
mov dword [0x7ad344], 0xffffffff
jne 0x4238e5
lea eax, [esp + 0xa0]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
xor esi, ebp
xor dword [esp + 0x10], esi
mov eax, dword [esp + 0x10]
sub dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x38]
add dword [esp + 0x18], eax
sub ebx, dword [esp + 0x18]
dec dword [esp + 0x20]
jne 0x423853
cmp dword [0x7ae3b8], 0x8d4
jne 0x423928
lea ecx, [esp + 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov dword [esi], edx
mov dword [esi + 4], edi
cmp dword [0x7ae3b8], 0x17
jne 0x423964
push 0
push 0
push 0
push 0x404568
push 0x4045e0
call dword [sym.imp.KERNEL32.dll_MoveFileWithProgressW]
lea eax, [esp + 0xa0]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
add esi, 8
dec dword [esp + 0x24]
mov dword [esp + 0x1c], esi
jne 0x4237f2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d4
ret
Function at 0x4071a3
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x461124], 0
jne 0x4071e1
xor ecx, ecx
push esi
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
movzx edx, dl
neg edx
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x4071b7
mov dword [ecx*4 + 0x461120], eax
inc ecx
cmp ecx, 0x100
jl 0x4071b2
pop esi
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 8]
not eax
jbe 0x40720e
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
dec dword [ebp + 0x10]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x461120]
inc ecx
cmp dword [ebp + 0x10], 0
ja 0x4071ef
not eax
pop ebp
ret 0xc

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x17c3700
Capabilities:
Decompress data using aplib

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
cld
mov dl, 0x80
xor ebx, ebx
movsb byte es:[edi], byte [esi]
mov bl, 2
call fcn.017c378f
jae 0x17c370e
xor ecx, ecx
call fcn.017c378f
jae 0x17c373d
xor eax, eax
call fcn.017c378f
jae 0x17c374d
mov bl, 2
inc ecx
mov al, 0x10
call fcn.017c378f
adc al, al
jae 0x17c372f
jne 0x17c3779
stosb byte es:[edi], al
jmp 0x17c3711
call fcn.017c379b
sub ecx, ebx
jne 0x17c3756
call fcn.017c3799
jmp 0x17c3775
lodsb al, byte [esi]
shr eax, 1
je 0x17c3783
adc ecx, ecx
jmp 0x17c3772
xchg ecx, eax
dec eax
shl eax, 8
lodsb al, byte [esi]
call fcn.017c3799
cmp eax, 0x7d00
jae 0x17c3772
cmp ah, 5
jae 0x17c3773
cmp eax, 0x7f
ja 0x17c3774
inc ecx
inc ecx
xchg ebp, eax
mov eax, ebp
mov bl, 1
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x17c3711
sub edi, dword [esp + 0x28]
mov dword [esp + 0x1c], edi
popal
ret 8
Function at 0x402740
Capabilities:
Get thread local storage value
Terminate thread

Disassembly:
cmp dword [0x48ad00], 0
push esi
push edi
mov edi, ecx
je 0x40275c
call fcn.0043ea60
mov dword [0x48ad00], 0
mov eax, dword [0x48ae50]
mov dword [0x48ae50], 0
test eax, eax
je 0x40277a
push 4
push eax
call fcn.004511eb
add esp, 8
call fcn.00414550
push dword [0x48ae54]
call dword [sym.imp.gdiplus.dll_GdiplusShutdown]
mov esi, dword [edi + 0x48]
cmp byte [esi + 0x14], 0
je 0x4027dc
mov ecx, esi
call fcn.00403120
mov eax, dword [esi + 8]
test eax, eax
je 0x4027d6
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4027bf
mov eax, dword [esi + 8]
test eax, eax
je 0x4027d6
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov word [esi + 0x14], 0
mov ecx, dword [edi + 0x48]
mov dword [edi + 0x48], 0
pop edi
pop esi
test ecx, ecx
je 0x4027f2
mov eax, dword [ecx]
push 1
call dword [eax]
call fcn.00403430
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x402807
mov byte [eax + 4], 1
jmp fcn.00403df0

Function at 0x402e40
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x469b1e
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x48700c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [ebp - 4], 1
mov eax, dword [esi + 0x10]
mov dword [esi], vtable.nbase::FrameworkThread.1.0
mov eax, dword [eax + 4]
mov dword [eax + esi + 0x10], vtable.nbase::FrameworkThread.0
mov word [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x2c], eax
mov edx, dword [ebp + 8]
mov byte [ebp - 4], 3
mov dword [esi + 0x44], 0xf
mov dword [esi + 0x40], 0
mov byte [esi + 0x30], 0
cmp byte [edx], 0
jne 0x402ef9
xor ecx, ecx
jmp 0x402f09
mov ecx, edx
lea ebx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402f00
sub ecx, ebx
push ecx
push edx
lea ecx, [esi + 0x30]
call fcn.00402880
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x402fe0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x469b46
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x48700c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], vtable.nbase::FrameworkThread.1.0
mov eax, dword [eax + 4]
mov dword [eax + esi + 0x10], vtable.nbase::FrameworkThread.0
mov al, byte [esi + 0x14]
test al, al
je 0x40306b
call fcn.00403120
mov eax, dword [esi + 8]
test eax, eax
je 0x403065
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x403052
mov eax, dword [esi + 8]
test eax, eax
je 0x403065
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 8]
call ebx
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov word [esi + 0x14], 0
mov eax, dword [esi + 0x44]
lea edi, [esi + 0x30]
cmp eax, 0x10
jb 0x40307f
inc eax
push eax
push dword [edi]
call fcn.00401dd0
mov dword [edi + 0x14], 0xf
cmp dword [edi + 0x14], 0x10
mov dword [edi + 0x10], 0
jb 0x403095
mov edi, dword [edi]
mov byte [edi], 0
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x4030a2
push eax
call ebx
mov dword [ebp - 4], 0
mov edi, dword [esi + 0x24]
test edi, edi
je 0x4030d1
or eax, 0xffffffff
lock xadd dword [edi + 4], eax
jne 0x4030d1
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [edi + 8], eax
jne 0x4030d1
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov eax, dword [esi + 8]
mov dword [esi], vtable.nbase::Thread.0
test eax, eax
je 0x40310e
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4030fb
mov eax, dword [esi + 8]
test eax, eax
je 0x40310e
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 8]
call ebx
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403250
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x469bec
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x48700c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call fcn.00403430
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [eax]
call ebx
test eax, eax
jne 0x4032c0
push 0x14
call fcn.00450f4b
mov esi, eax
add esp, 4
mov dword [esi], edi
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0xffffffff
mov byte [esi + 4], 0
mov dword [esi + 0x10], 0
call fcn.00403430
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
call fcn.00403430
push dword [eax]
call ebx
test eax, eax
je 0x4032d1
mov byte [eax + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [edi + 4], eax
mov eax, dword [edi + 0x18]
cmp eax, 3
jne 0x4032eb
mov ecx, dword [edi + 0x20]
mov eax, dword [ecx]
call dword [eax]
jmp 0x403350
push 0xb8
cmp eax, 2
jne 0x403310
call fcn.00450f4b
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, eax
mov dword [ebp - 4], 0
call fcn.00405f90
jmp 0x403349
cmp eax, 1
jne 0x403330
call fcn.00450f4b
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, eax
mov dword [ebp - 4], 1
call fcn.00405e80
jmp 0x403349
call fcn.00450f4b
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, eax
mov dword [ebp - 4], 2
call fcn.004047c0
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0x1c], eax
mov ecx, edi
mov eax, dword [edi]
call dword [eax + 8]
push dword [edi + 0x2c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [edi + 0x28]
mov ecx, dword [edi + 0x1c]
call fcn.00404e40
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
cmp dword [edi + 0x18], 3
mov ecx, dword [edi + 0x1c]
je 0x40338a
test ecx, ecx
je 0x4033de
mov eax, dword [ecx]
push 1
call dword [eax]
jmp 0x4033de
test ecx, ecx
je 0x403394
mov eax, dword [ecx]
push 1
call dword [eax]
mov esi, dword [edi + 0x24]
mov dword [edi + 0x24], 0
mov dword [edi + 0x20], 0
mov dword [ebp - 4], 3
test esi, esi
je 0x4033d7
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x4033d1
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x4033d1
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0x1c], 0
mov dword [edi + 4], 0
call fcn.00403430
push dword [eax]
call ebx
call fcn.00403430
push dword [eax]
call ebx
mov esi, eax
test esi, esi
je 0x40341e
call fcn.00403430
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0x14
push esi
call fcn.004511eb
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403430
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x48ad54]
sub esp, 0x18
push esi
cmp eax, 2
je 0x403500
push 0
push 1
push 0x48ad54
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x4034dd
push 4
call fcn.00450f4b
mov esi, eax
add esp, 4
mov dword [ebp - 8], esi
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [esi], eax
sub esp, 0x28
mov eax, esp
mov dword [0x48ad58], esi
mov dword [ebp - 8], 0x48ad54
mov dword [ebp - 0xc], 0x4035c0
mov dword [ebp - 0x18], 0x4035c0
mov dword [eax], vtable.std::_Func_base_void___.0
mov dword [eax], vtable.std::_Func_impl_class_std::_Binder_struct_std::_Unforced__void____cdecl___void_____void_____class_std::allocator_int___void___.0
mov dword [eax + 4], 0x4035c0
mov dword [eax + 8], 0x48ad54
mov byte [ebp - 1], 0
mov dword [ebp - 0x14], 0x48ad54
mov dword [eax + 0x24], eax
call fcn.004079a0
mov eax, dword [0x48ad58]
add esp, 0x28
mov dword [0x48ad54], 2
pop esi
mov esp, ebp
pop ebp
ret
cmp eax, 2
je 0x403500
mov eax, dword [0x48ad54]
cmp eax, 2
je 0x403500
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call esi
mov eax, dword [0x48ad54]
cmp eax, 2
jne 0x4034f2
mov eax, dword [0x48ad58]
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x403ba0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x469d08
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x48700c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
test edi, edi
jns 0x403be5
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.00403430
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
je 0x403bcf
call fcn.00403a90
mov esi, eax
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov eax, dword [ebx]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], eax
call fcn.00403a90
mov edi, eax
lea eax, [ebp - 0x18]
push eax
lea ecx, [edi + 0x18]
call fcn.00404350
push eax
add eax, 0x10
push eax
push ecx
lea eax, [ebp - 0x18]
push eax
lea ecx, [edi + 0x18]
call fcn.00404380
cmp byte [ebp - 0x14], 0
jne 0x403c51
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x14]
cmp eax, dword [ebx]
je 0x403c51
xor bl, bl
jmp 0x403c5c
mov eax, dword [ebp + 8]
inc dword [ebx + 8]
mov dword [ebx + 0xc], eax
mov bl, 1
test esi, esi
je 0x403c67
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x403c80
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x469d38
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x48700c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.00403430
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
je 0x403d40
mov ecx, dword [edi + 8]
cmp ecx, 1
jl 0x403d40
add ecx, 0xffffffff
mov dword [edi + 8], ecx
jne 0x403d2d
call fcn.00403a90
mov esi, eax
push esi
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
add edi, 0xc
mov dword [ebp - 4], 0
lea eax, [ebp - 0x10]
push edi
push eax
call fcn.00403a90
lea ecx, [eax + 0x18]
call fcn.00403e80
call fcn.00403a90
lea ecx, [eax + 0x18]
mov eax, dword [ebp - 0x10]
cmp eax, dword [ecx]
je 0x403d1c
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00403a90
lea ecx, [eax + 0x18]
call fcn.00403ed0
mov dword [edi], 0xffffffff
test esi, esi
je 0x403d2d
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x406060
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x48ad5c]
sub esp, 0x18
push esi
cmp eax, 2
je 0x406130
push 0
push 1
push 0x48ad5c
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x40610d
push 4
call fcn.00450f4b
mov esi, eax
add esp, 4
mov dword [ebp - 8], esi
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [esi], eax
sub esp, 0x28
mov eax, esp
mov dword [0x48ad60], esi
mov dword [ebp - 8], 0x48ad5c
mov dword [ebp - 0xc], 0x4035c0
mov dword [ebp - 0x18], 0x4035c0
mov dword [eax], vtable.std::_Func_base_void___.0
mov dword [eax], vtable.std::_Func_impl_class_std::_Binder_struct_std::_Unforced__void____cdecl___void_____void_____class_std::allocator_int___void___.0
mov dword [eax + 4], 0x4035c0
mov dword [eax + 8], 0x48ad5c
mov byte [ebp - 1], 0
mov dword [ebp - 0x14], 0x48ad5c
mov dword [eax + 0x24], eax
call fcn.004079a0
mov eax, dword [0x48ad60]
add esp, 0x28
mov dword [0x48ad5c], 2
pop esi
mov esp, ebp
pop ebp
ret
cmp eax, 2
je 0x406130
mov eax, dword [0x48ad5c]
cmp eax, 2
je 0x406130
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call esi
mov eax, dword [0x48ad5c]
cmp eax, 2
jne 0x406122
mov eax, dword [0x48ad60]
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x407ca0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov eax, dword [esi + 8]
mov dword [esi], vtable.nbase::Thread.0
test eax, eax
je 0x407ce7
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x407cd0
mov eax, dword [esi + 8]
test eax, eax
je 0x407ce7
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0
mov dword [esi + 8], 0
test byte [ebp + 8], 1
je 0x407cf8
push 0x10
push esi
call fcn.004511eb
add esp, 8
mov eax, esi
pop esi
pop ebp
ret 4

Function at 0x407d50
Capabilities:
Create thread

Disassembly:
push esi
push edi
mov esi, ecx
lea edi, [esi + 4]
push edi
push 0
push esi
push 0x407e10
push 0
push 0
call fcn.00454c12
add esp, 0x18
mov dword [esi + 8], eax
cmp eax, 2
jae 0x407d81
mov dword [esi + 8], 0
mov dword [edi], 0
mov ecx, dword [esi + 0xc]
test ecx, ecx
jle 0x407df8
or eax, 0xffffffff
cmp ecx, 1
jne 0x407da9
mov eax, 0xfffffffe
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
cmp dword [esi + 8], 1
pop edi
seta al
pop esi
ret
cmp ecx, 2
jne 0x407dc5
or eax, 0xffffffff
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
cmp dword [esi + 8], 1
pop edi
seta al
pop esi
ret
cmp ecx, 3
jne 0x407de3
mov eax, 2
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
cmp dword [esi + 8], 1
pop edi
seta al
pop esi
ret
cmp ecx, 4
mov edx, 0xf
cmove eax, edx
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
cmp dword [esi + 8], 1
pop edi
seta al
pop esi
ret
Function at 0x408560
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push edi
mov edi, ecx
call fcn.00406060
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 1
cmp byte [eax + 0x14], 0
lea eax, [ebp - 0x1c]
je 0x4085b6
push 0xf
push 0xf
push 0
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x4085b2
push 1
push 0x113
push 0x113
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x4085b2
xor bl, bl
jmp 0x4085c8
mov bl, 1
jmp 0x4085c8
push 0
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
setne bl
push 0
lea eax, [edi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test bl, bl
jne 0x4085e0
pop edi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
lea eax, [ebp - 0x1c]
mov ecx, edi
push eax
call fcn.004084b0
pop edi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x408840
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46a5a3
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x48700c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [ebp - 4], 0
mov dword [edi], vtable.nbase::WinIOMessagePump.0
mov dword [edi + 0x18], 0xffffffff
lea esi, [edi + 0x1c]
mov byte [ebp - 4], 1
push 0
push 0
mov dword [ebp - 0x14], esi
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.00408ca0
push 1
mov dword [esi], eax
push 0
mov dword [edi + 0x28], 0
mov dword [edi + 0x24], vtable.ObserverList_class_nbase::WinIOMessagePump::IOObserver_.0
push 0
push 0xffffffffffffffff
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0
mov dword [edi + 0x34], 0
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov esi, eax
mov eax, dword [edi + 0x18]
cmp eax, 0xffffffff
je 0x408900
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov dword [edi + 0x18], esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x408ff0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46a628
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x48700c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea esi, [edi + 0xc]
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
cmp dword [edi + 0x24], 0
je 0x409048
call fcn.00406060
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, dword [edi + 0x24]
jne 0x409048
mov bl, 1
jmp 0x40904a
xor bl, bl
test esi, esi
je 0x409055
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret