joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402cd0
Capabilities:
Accept command line arguments
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
call dword [sym.imp.kernel32.dll_GetCommandLineW]
mov ebx, eax
movzx eax, word [eax]
test ax, ax
je 0x402d5b
cmp ax, 9
je 0x402d48
cmp ax, 0x20
je 0x402d48
mov dword [ebp - 0x6c], 0
xor edi, edi
nop
cmp ax, 0x5c
je 0x402db0
cmp ax, 0x22
je 0x402dc0
mov dword [ebp - 0x6c], 0
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x402d5b
cmp ax, 9
sete cl
cmp ax, 0x20
mov esi, ecx
sete cl
mov edx, esi
or dl, cl
je 0x402d00
test edi, 1
jne 0x402d00
lea esi, [esi]
movzx eax, word [ebx + 2]
add ebx, 2
cmp ax, 9
je 0x402d48
cmp ax, 0x20
je 0x402d48
lea eax, [ebp - 0x5c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoW]
sub esp, 4
test byte [ebp - 0x30], 1
je 0x402dd8
movzx esi, word [ebp - 0x2c]
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._wWinMain_16
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
inc dword [ebp - 0x6c]
jmp 0x402d1b
and dword [ebp - 0x6c], 1
jne 0x402d14
xor edi, 1
jmp 0x402d1b
mov eax, 1
mov esi, 1
mov word [ebp - 0x2c], ax
jmp 0x402d74

Function at 0x402df0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 1
call sym.__configure_wide_argv
call sym.__initialize_wide_environment
call sym.___p___argc
mov esi, dword [eax]
call sym.___p___wargv
mov edi, dword [eax]
call sym.__get_initial_wide_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
inc eax
mov dword [esp], eax
call sym.__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._wmain
mov dword [esp], eax
call sym._exit
nop
nop
nop
nop
nop
Function at 0x4017b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov ebx, ecx
xor eax, eax
push edi
mov edi, dword [ebp + 8]
shl edi, 4
lea esi, [ebx + 0x14]
mov ecx, dword [ebx + 0x10]
lea esi, [esi + 4]
mov edx, dword [esi - 4]
add ecx, edi
movzx ecx, byte [ecx + eax]
xor byte [edx], cl
mov ecx, dword [ebx + 0x10]
mov edx, dword [esi - 4]
add ecx, edi
movzx ecx, byte [ecx + eax + 4]
xor byte [edx + 1], cl
mov ecx, dword [ebx + 0x10]
mov edx, dword [esi - 4]
add ecx, edi
movzx ecx, byte [ecx + eax + 8]
xor byte [edx + 2], cl
mov ecx, dword [ebx + 0x10]
mov edx, dword [esi - 4]
add ecx, edi
movzx ecx, byte [ecx + eax + 0xc]
inc eax
xor byte [edx + 3], cl
cmp eax, 4
jl 0x4017c3
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x402f30
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e4f48
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x52038c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov esi, dword [ebp + 8]
cmp dword [esi + 0x14], 8
jb 0x402f69
mov eax, dword [esi]
jmp 0x402f6b
mov eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x403019
push 2
push ecx
push 0x50d690
mov ecx, esi
call fcn.00403070
cmp eax, 0xffffffff
je 0x402ff2
push eax
push 0
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.00403020
mov dword [ebp - 4], 0
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x402fc8
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.00402f30
test eax, eax
je 0x402fdd
cmp dword [esi + 0x14], 8
jb 0x402fd0
mov esi, dword [esi]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x403011
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x402ff2
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00404840
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a4c3a
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x28]
call fcn.004047e0
mov eax, 1
jmp 0x402ff4

Function at 0x405120
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e5152
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x52038c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi]
push 0
push dword [eax + 4]
call dword [sym.imp.USER32.dll_ShowWindow]
push 0x4f8
call fcn.004a4c59
mov esi, eax
mov dword [ebp - 0x10], esi
push 0x4f8
push 0
push esi
mov dword [ebp - 4], 0
call fcn.004be240
add esp, 0x10
mov ecx, esi
call fcn.00406a50
push 0
push 0x12c
push 0x15e
push 0
push 0
push 0x40100
mov esi, eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [edi]
mov ecx, esi
push 0x96c80000
push 0x50d6e8
push dword [eax + 4]
call fcn.004217bf
mov ecx, esi
call fcn.0042166b
push 1
mov ecx, esi
call fcn.00421b98
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x406680
Capabilities:
Get thread local storage value
Terminate process
Terminate thread

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
call fcn.0042024a
call dword [sym.imp.ole32.dll_OleUninitialize]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov esi, dword [edi + 0x48]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 8]
test eax, eax
je 0x4066cd
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
test eax, eax
jne 0x4066ba
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push dword [esi + 8]
call ebx
mov dword [esi + 8], 0
mov dword [esi + 4], 0
mov esi, dword [edi + 0x48]
cmp byte [esi + 0x14], 0
je 0x406725
mov ecx, esi
call fcn.0040db00
mov eax, dword [esi + 8]
test eax, eax
je 0x40671f
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40670c
mov eax, dword [esi + 8]
test eax, eax
je 0x40671f
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
test eax, eax
jne 0x40670c
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push dword [esi + 8]
call ebx
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
pop ebx
test ecx, ecx
je 0x40673c
mov eax, dword [ecx]
push 1
call dword [eax]
call fcn.0040de10
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x406751
mov byte [eax + 4], 1
jmp fcn.0040e7e0
Function at 0x4071d0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e54cb
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x52038c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
sub eax, 0x10
je 0x4072bf
sub eax, 0x455
je 0x407226
sub eax, 0x6d
jne 0x4072da
push 1
call fcn.00421799
jmp 0x4072da
push 0x84
lea eax, [ebp - 0x94]
push 0
push eax
call fcn.004be240
add esp, 0xc
lea ecx, [ebp - 0x94]
call fcn.004196ad
push str.SystemProcessing.exe
mov dword [ebp - 4], 0
sub esp, 0x18
movups xmm0, xmmword [0x525ad8]
mov eax, esp
push str._s_s
movups xmmword [eax], xmm0
movq xmm0, qword [0x525ae8]
movq qword [eax + 0x10], xmm0
lea eax, [ebp - 0x94]
push eax
call fcn.00419c31
add esp, 0x24
lea ecx, [ebp - 0x94]
push 1
push 0
push 0
call fcn.004e33a0
push eax
push 0x50f430
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 1
mov ecx, esi
call fcn.00421799
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], 0xffffffff
call fcn.00419770
jmp 0x4072da
mov ecx, dword [0x525a80]
push 0
push 0
push 0x4d2
call fcn.00421667
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
push dword [ebp + 0x10]
mov ecx, esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004207ae
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a4c3a
mov esp, ebp
pop ebp
ret 0xc
Function at 0x407310
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e550b
mov eax, dword fs:[0]
push eax
sub esp, 0x41c
mov eax, dword [0x52038c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [0x525aec], 8
mov eax, 0x525ad8
cmovae eax, dword [0x525ad8]
push eax
lea eax, [ebp - 0x428]
push str._smain.ini
push eax
call fcn.0040c330
push 0x400
lea eax, [ebp - 0x410]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.004be240
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x428]
add esp, 0x18
cmp dword [ebp - 0x414], 0x10
cmovae eax, dword [ebp - 0x428]
push eax
push 0x400
lea eax, [ebp - 0x410]
push eax
push 0x50d6e7
push 0x50ebcc
push str.uinfo
call edi
cmp byte [ebp - 0x410], 0
jne 0x4073c6
xor ecx, ecx
jmp 0x4073d9
lea ecx, [ebp - 0x410]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4073d0
sub ecx, edx
push ecx
lea eax, [ebp - 0x410]
push eax
lea ecx, [esi + 0x480]
call fcn.004039c0
cmp dword [ebp - 0x414], 0x10
lea eax, [ebp - 0x428]
cmovae eax, dword [ebp - 0x428]
push eax
push 0x400
lea eax, [ebp - 0x410]
push eax
push 0x50d6e7
push 0x50ebd8
push str.uinfo
call edi
cmp byte [ebp - 0x410], 0
jne 0x40742b
xor ecx, ecx
jmp 0x40743d
lea ecx, [ebp - 0x410]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407434
sub ecx, edx
push ecx
lea eax, [ebp - 0x410]
push eax
lea ecx, [esi + 0x498]
call fcn.004039c0
cmp dword [ebp - 0x414], 0x10
lea eax, [ebp - 0x428]
cmovae eax, dword [ebp - 0x428]
push eax
push 0x400
lea eax, [ebp - 0x410]
push eax
push 0x50d6e7
push 0x50ebd0
push str.uinfo
call edi
cmp byte [ebp - 0x410], 0
jne 0x40748f
xor ecx, ecx
jmp 0x4074a1
lea ecx, [ebp - 0x410]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407498
sub ecx, edx
push ecx
lea eax, [ebp - 0x410]
push eax
lea ecx, [esi + 0x4b0]
call fcn.004039c0
cmp dword [ebp - 0x414], 0x10
lea eax, [ebp - 0x428]
cmovae eax, dword [ebp - 0x428]
push eax
push 0x400
lea eax, [ebp - 0x410]
push eax
push 0x50d6e7
push 0x50ebd4
push str.uinfo
call edi
cmp byte [ebp - 0x410], 0
jne 0x4074f3
xor ecx, ecx
jmp 0x407509
lea ecx, [ebp - 0x410]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407500
sub ecx, edx
push ecx
lea eax, [ebp - 0x410]
push eax
lea ecx, [esi + 0x4c8]
call fcn.004039c0
cmp dword [ebp - 0x414], 0x10
lea eax, [ebp - 0x428]
cmovae eax, dword [ebp - 0x428]
push eax
push 0x400
lea eax, [ebp - 0x410]
push eax
push 0x50d6e7
push str.mosid
push str.uinfo
call edi
cmp byte [ebp - 0x410], 0
jne 0x40755b
xor ecx, ecx
jmp 0x40756d
lea ecx, [ebp - 0x410]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407564
sub ecx, edx
push ecx
lea eax, [ebp - 0x410]
push eax
lea ecx, [esi + 0x4e0]
call fcn.004039c0
mov eax, dword [ebp - 0x414]
cmp eax, 0x10
jb 0x40759e
inc eax
lea ecx, [ebp - 0x428]
push eax
push dword [ebp - 0x428]
call fcn.004049b0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a4c3a
mov esp, ebp
pop ebp
ret
Function at 0x40d820
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e5d9e
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x52038c]
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 0x40d8d9
xor ecx, ecx
jmp 0x40d8e9
mov ecx, edx
lea ebx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d8e0
sub ecx, ebx
push ecx
push edx
lea ecx, [esi + 0x30]
call fcn.004039c0
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 0x40d9a0
Capabilities:
Terminate process
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e5076
mov eax, dword fs:[0]
push eax
push ebx
push esi
push edi
mov eax, dword [0x52038c]
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 0x40da3b
call fcn.0040db00
mov eax, dword [esi + 8]
test eax, eax
je 0x40da35
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40da22
mov eax, dword [esi + 8]
test eax, eax
je 0x40da35
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
test eax, eax
setne al
test al, al
jne 0x40da22
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
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 0x40da51
inc eax
mov ecx, edi
push eax
push dword [edi]
call fcn.004049b0
mov dword [edi + 0x14], 0xf
cmp dword [edi + 0x14], 0x10
mov dword [edi + 0x10], 0
jb 0x40da67
mov edi, dword [edi]
mov byte [edi], 0
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x40da74
push eax
call ebx
mov dword [ebp - 4], 0
mov edi, dword [esi + 0x24]
test edi, edi
je 0x40daa3
or eax, 0xffffffff
lock xadd dword [edi + 4], eax
jne 0x40daa3
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [edi + 8], eax
jne 0x40daa3
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 0x40daeb
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40dad8
mov eax, dword [esi + 8]
test eax, eax
je 0x40daeb
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
test eax, eax
jne 0x40dad8
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
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 0x40dc30
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e5e3c
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x52038c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call fcn.0040de10
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [eax]
call ebx
test eax, eax
jne 0x40dca0
push 0x14
call fcn.004a4c59
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.0040de10
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
call fcn.0040de10
push dword [eax]
call ebx
test eax, eax
je 0x40dcb1
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 0x40dccb
mov ecx, dword [edi + 0x20]
mov eax, dword [ecx]
call dword [eax]
jmp 0x40dd30
push 0xb8
cmp eax, 2
jne 0x40dcf0
call fcn.004a4c59
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, eax
mov dword [ebp - 4], 0
call fcn.00414db0
jmp 0x40dd29
cmp eax, 1
jne 0x40dd10
call fcn.004a4c59
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, eax
mov dword [ebp - 4], 1
call fcn.00414ca0
jmp 0x40dd29
call fcn.004a4c59
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, eax
mov dword [ebp - 4], 2
call fcn.004135e0
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.00413c60
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
cmp dword [edi + 0x18], 3
mov ecx, dword [edi + 0x1c]
je 0x40dd6a
test ecx, ecx
je 0x40ddbe
mov eax, dword [ecx]
push 1
call dword [eax]
jmp 0x40ddbe
test ecx, ecx
je 0x40dd74
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 0x40ddb7
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x40ddb1
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x40ddb1
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.0040de10
push dword [eax]
call ebx
call fcn.0040de10
push dword [eax]
call ebx
mov esi, eax
test esi, esi
je 0x40ddfe
call fcn.0040de10
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0x14
push esi
call fcn.004a4caf
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 0x40de10
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x525b60]
sub esp, 0x18
push esi
cmp eax, 2
je 0x40dee0
push 0
push 1
push 0x525b60
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x40debd
push 4
call fcn.004a4c59
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 [0x525b64], esi
mov dword [ebp - 8], 0x525b60
mov dword [ebp - 0xc], 0x40df50
mov dword [ebp - 0x18], 0x40df50
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], 0x40df50
mov dword [eax + 8], 0x525b60
mov byte [ebp - 1], 0
mov dword [ebp - 0x14], 0x525b60
mov dword [eax + 0x24], eax
call fcn.00416640
mov eax, dword [0x525b64]
add esp, 0x28
mov dword [0x525b60], 2
pop esi
mov esp, ebp
pop ebp
ret
cmp eax, 2
je 0x40dee0
mov eax, dword [0x525b60]
cmp eax, 2
je 0x40dee0
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call esi
mov eax, dword [0x525b60]
cmp eax, 2
jne 0x40ded2
mov eax, dword [0x525b64]
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40e410
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e5f28
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x52038c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
test edi, edi
jns 0x40e455
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.0040de10
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
je 0x40e43f
call fcn.0040e300
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.0040e300
mov edi, eax
lea eax, [ebp - 0x18]
push eax
lea ecx, [edi + 0x18]
call fcn.0040ede0
push eax
add eax, 0x10
push eax
push ecx
lea eax, [ebp - 0x18]
push eax
lea ecx, [edi + 0x18]
call fcn.0040ee10
cmp byte [ebp - 0x14], 0
jne 0x40e4c1
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x14]
cmp eax, dword [ebx]
je 0x40e4c1
xor bl, bl
jmp 0x40e4cc
mov eax, dword [ebp + 8]
inc dword [ebx + 8]
mov dword [ebx + 0xc], eax
mov bl, 1
test esi, esi
je 0x40e4d7
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 0x40e4f0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e5f58
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x52038c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.0040de10
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
je 0x40e5b0
mov ecx, dword [edi + 8]
cmp ecx, 1
jl 0x40e5b0
add ecx, 0xffffffff
mov dword [edi + 8], ecx
jne 0x40e59d
call fcn.0040e300
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.0040e300
lea ecx, [eax + 0x18]
call fcn.0040e960
call fcn.0040e300
lea ecx, [eax + 0x18]
mov eax, dword [ebp - 0x10]
cmp eax, dword [ecx]
je 0x40e58c
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0040e300
lea ecx, [eax + 0x18]
call fcn.0040e9b0
mov dword [edi], 0xffffffff
test esi, esi
je 0x40e59d
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 0x40f100
Capabilities:
Terminate process
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 0x40f152
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40f13b
mov eax, dword [esi + 8]
test eax, eax
je 0x40f152
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
test eax, eax
jne 0x40f13b
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
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 0x40f163
push 0x10
push esi
call fcn.004a4caf
add esp, 8
mov eax, esi
pop esi
pop ebp
ret 4

Function at 0x40f1d0
Capabilities:
Create thread

Disassembly:
push esi
push edi
mov esi, ecx
lea edi, [esi + 4]
push edi
push 0
push esi
push 0x40f290
push 0
push 0
call fcn.004c20cb
add esp, 0x18
mov dword [esi + 8], eax
cmp eax, 2
jae 0x40f201
mov dword [esi + 8], 0
mov dword [edi], 0
mov ecx, dword [esi + 0xc]
test ecx, ecx
jle 0x40f278
or eax, 0xffffffff
cmp ecx, 1
jne 0x40f229
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 0x40f245
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 0x40f263
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