joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4065c9
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
lea eax, [ebp - 0x23c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x4065ed
xor eax, eax
test eax, eax
je 0x406600
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x406600
xor ecx, ecx
jmp 0x406603
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x40a014]
lea eax, [ebp + eax*2 - 0x23c]
push ecx
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x23c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

Function at 0x40672c
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x7a65c4], 0
push esi
jne 0x406763
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x40673d
mov dword [ecx*4 + 0x7a65c0], eax
inc ecx
cmp ecx, 0x100
jl 0x406738
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406794
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x7a65c0]
xor eax, esi
inc ecx
dec edx
jne 0x406776
pop edi
not eax
pop esi
ret 0xc
Function at 0x1000119b
Capabilities:
Create process on windows
Extract resource via kernel32 functions
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x270
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0xa
push 0x66
push dword [0x100042a0]
xor esi, esi
mov dword [ebp - 0x210], esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, esi
je 0x10001308
push edi
push dword [0x100042a0]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push dword [0x100042a0]
mov dword [ebp - 0x214], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, esi
je 0x10001308
cmp dword [ebp - 0x214], esi
je 0x10001308
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x218], eax
cmp eax, esi
je 0x10001308
push ebx
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x20c]
push eax
push esi
push 0x100031cc
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push esi
push esi
push 2
push esi
xor ebx, ebx
inc ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10001307
push esi
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0x214]
mov dword [ebp - 0x21c], esi
push dword [ebp - 0x218]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x210], eax
call edi
cmp dword [ebp - 0x210], ebx
jne 0x10001307
push 0x44
lea eax, [ebp - 0x270]
push esi
push eax
call fcn.10002370
add esp, 0xc
xor eax, eax
mov word [ebp - 0x240], ax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x270]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x20c]
push eax
push esi
mov dword [ebp - 0x270], 0x44
mov dword [ebp - 0x244], ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [ebp - 0x210], eax
cmp eax, ebx
jne 0x10001307
push dword [ebp - 0x228]
call edi
push dword [ebp - 0x22c]
call edi
pop ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x210]
pop edi
xor ecx, ebp
pop esi
call fcn.10002361
leave
ret
Function at 0x1000141d
Capabilities:
Create process on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push esi
push 0x44
xor esi, esi
lea eax, [ebp - 0x58]
push esi
push eax
call fcn.10002370
add esp, 0xc
xor eax, eax
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x58]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push dword [ebp + 8]
mov dword [ebp - 0x58], 0x44
push esi
mov dword [ebp - 0x2c], 1
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x1000146d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100014b2
push dword [ebp + 0xc]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1000148b
push 0x5b4
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x14]
mov dword [ebp - 4], 0x2c9
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp - 4]
pop esi
leave
ret
Function at 0x100014b5
Capabilities:
Check if file exists
Get common file path
Get file attributes
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x828]
push eax
lea eax, [ebp - 0x20c]
push eax
push 0
push 2
push 0
push 0x10003318
push 0x80000000
mov dword [ebp - 0x828], 0x208
call dword [sym.imp.SHLWAPI.dll_SHRegGetValueW]
test eax, eax
jne 0x10001692
cmp word [ebp - 0x20c], 0x22
setne al
test eax, eax
jne 0x1000169f
lea eax, [ebp - 0x20a]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, 0x10003314
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x10001692
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push str.rar.exe
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10001692
push esi
push edi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHELL32.dll_PathGetShortPath]
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str.IRAR
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x414]
push eax
push ebx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x824]
push str.cmd__c__s_vb___s__lpk.dllfind__i__lpk.dll_
push eax
call esi
mov edi, 0xea60
lea eax, [ebp - 0x824]
push edi
push eax
call fcn.1000141d
add esp, 0x1c
test eax, eax
je 0x10001690
lea eax, [ebp - 0x414]
push eax
push ebx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x824]
push str.__s__x___s__.exe___s_
push eax
call esi
lea eax, [ebp - 0x824]
push 0x1d4c0
push eax
call fcn.1000141d
add esp, 0x1c
lea eax, [ebp - 0x414]
push eax
call fcn.10001718
lea eax, [ebp - 0x414]
push eax
push ebx
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x824]
push str.__s__a__r__ep1__s____s____slpk.dll_
push eax
call esi
lea eax, [ebp - 0x824]
push 0x3a980
push eax
call fcn.1000141d
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x824]
push 0x100031f4
push eax
call esi
lea eax, [ebp - 0x824]
push edi
push eax
call fcn.1000141d
add esp, 0x34
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.10002361
leave
ret
mov eax, 0x100031f0
jmp 0x1000152e
Function at 0x100016a9
Capabilities:
Check for time delay via gettickcount
Get disk information

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 8], eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x1388
push dword [0x100042ac]
mov dword [ebp - 4], eax
call edi
mov ebx, 0x102
jmp 0x10001708
call esi
cmp eax, dword [ebp - 4]
jb 0x10001713
sub eax, dword [ebp - 4]
cmp eax, 0x6ddd00
ja 0x10001713
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
cmp eax, dword [ebp - 8]
jne 0x10001713
push 0x1388
push dword [0x100042ac]
call edi
cmp eax, ebx
je 0x100016df
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
xor eax, eax
inc eax
jmp 0x1000170e
Function at 0x10001adc
Capabilities:
Create thread
Resume thread
Terminate thread

Disassembly:
push esi
xor esi, esi
push esi
push 4
push esi
push 0x100019a3
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xfffffffffffffff1
push eax
mov dword [0x100042a8], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
je 0x10001b13
push dword [0x100042a8]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x10001b26
push esi
push dword [0x100042a8]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [0x100042a8], esi
pop esi
ret

Function at 0x10002361
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [section..data]
jne 0x1000236b
repz ret
jmp fcn.100024fd
Function at 0x40b60d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x410920
cmp edx, dword [eax]
je 0x40b62f
add eax, 8
inc ecx
cmp eax, 0x4109b0
jl 0x40b620
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x410920]
jne 0x40b75d
mov eax, dword [0xf0f8b0]
cmp eax, 1
je 0x40b737
test eax, eax
jne 0x40b660
cmp dword [0x410248], 1
je 0x40b737
cmp edx, 0xfc
je 0x40b75d
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40b697
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00408970
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00408b40
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40b6da
lea eax, [ebp - 0x1a4]
push eax
call fcn.00408b40
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x40f48c
push edi
call fcn.00409090
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00408970
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00408980
lea eax, [ebp - 0xa0]
push 0x40f46c
push eax
call fcn.00408980
push dword [esi + 0x410924]
lea eax, [ebp - 0xa0]
push eax
call fcn.00408980
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040d7e3
add esp, 0x2c
pop edi
jmp 0x40b75d
lea eax, [ebp + 8]
lea esi, [esi + 0x410924]
push 0
push eax
push dword [esi]
call fcn.00408b40
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x401000
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe8
mov eax, dword [0x415100]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov dword [ebp - 0xe4], 0
mov ecx, 0x33
mov esi, section..data
lea edi, [ebp - 0xd4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [ebp - 0xdc], 0xcd
push 4
push 0x3000
mov eax, dword [ebp - 0xdc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xd8], eax
cmp dword [ebp - 0xd8], 0
jne 0x401067
jmp 0x4010f7
mov ecx, dword [ebp - 0xdc]
push ecx
lea edx, [ebp - 0xd4]
push edx
mov eax, dword [ebp - 0xd8]
push eax
call fcn.00401db0
add esp, 0xc
lea ecx, [ebp - 0xe4]
push ecx
push 0x20
mov edx, dword [ebp - 0xdc]
push edx
mov eax, dword [ebp - 0xd8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0xe8], eax
cmp dword [ebp - 0xe8], 0
jne 0x4010b2
jmp 0x4010f7
push 0
push 0
push 0
mov ecx, dword [ebp - 0xd8]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0xe0], eax
cmp dword [ebp - 0xe0], 0
jne 0x4010da
jmp 0x4010f7
push 0xffffffffffffffff
mov edx, dword [ebp - 0xe0]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401109
mov esp, ebp
pop ebp
ret

Function at 0x40190f
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40194e
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40194e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40194e
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40194e
cmp dword [ecx + 0x74], 0xe
jbe 0x40194e
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4074e3
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x407580
push ebx
push esi
call fcn.004074ac
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00407440
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40752d
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40757f
push edi
push eax
call fcn.00408100
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40754d
call fcn.00405fa1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40757e
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00407440
add esp, 0x20
test eax, eax
jne 0x40756c
push edi
call fcn.00405fa1
jmp 0x407574
push ebx
call fcn.00405fa1
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x40887d
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x410fe8
push 0x410fe0
push str.FlsAlloc
push 0x1f
call fcn.0040873c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4088b1
push dword [ebp + 8]
mov ecx, esi
call dword [0x40f11c]
call esi
jmp 0x4088b7
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4088fb
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x410ff8
push 0x410ff0
push str.FlsGetValue
push 0x21
call fcn.0040873c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x408932
push dword [ebp + 8]
mov ecx, esi
call dword [0x40f11c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40893a
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x411000
push 0x410ff8
push str.FlsSetValue
push 0x22
call fcn.0040873c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x408974
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x40f11c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x40ddd0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40ddfd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40ddfd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x430005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
mov eax, section..text
nop
nop
push 4
nop
nop
nop
nop
nop
nop
pop edi
nop
nop
cmp eax, 0
nop
nop
nop
je 0x430072
nop
nop
nop
nop
nop
mov ebx, 0x408f6c
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
xchg ecx, eax
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
nop
mov esi, 0x35ec215e
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x430060
nop
nop
nop
nop
nop
mov eax, section..data
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x4300d2
nop
mov ebx, 0x42e3d0
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x129c3c52
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
loop 0x4300c0
nop
nop
nop
nop
popal
nop
jmp 0x401219
Function at 0x403380
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x6cac38]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp + 8], 0
je 0x403449
test esi, esi
jne 0x403458
mov eax, dword [fcn.00413cb0]
test eax, eax
je 0x4033d4
cmp eax, fcn.00413cb0
je 0x4033d4
push 0x42
push str.....cryptoinit.c
push 0xc
call eax
add esp, 0xc
jmp 0x4033f1
cmp dword [0x6ca8e4], 0
je 0x4033e7
mov dword [0x6ca8e4], 0
push 0xc
call fcn.005e2268
add esp, 4
mov esi, eax
test esi, esi
je 0x403458
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
test esi, esi
je 0x403458
mov ecx, dword [0x6cac38]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x403458
mov eax, dword [fcn.00413ef0]
test eax, eax
je 0x40343a
cmp eax, fcn.00413ef0
je 0x40343a
push 0x44
push str.....cryptoinit.c
push esi
call eax
add esp, 0xc
pop edi
xor eax, eax
pop esi
pop ebp
ret
push esi
call fcn.005dc555
add esp, 4
pop edi
xor eax, eax
pop esi
pop ebp
ret
mov edx, dword [0x6cac38]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
mov eax, esi
pop esi
pop ebp
ret
Function at 0x403af0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
xor ebx, ebx
cmp dword [0x6d2ce4], ebx
je 0x403c7a
cmp dword [0x6d2cd4], ebx
jne 0x403c7a
push esi
push edi
mov dword [0x6d2cd4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x6cac38]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [0x6cac38]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
call fcn.00403970
mov esi, dword [0x6d2cd8]
cmp esi, ebx
je 0x403b89
mov edx, dword [esi]
call edx
mov eax, dword [fcn.00413ef0]
mov ecx, esi
mov esi, dword [esi + 4]
cmp eax, ebx
je 0x403b7c
cmp eax, fcn.00413ef0
je 0x403b7c
push 0x20a
push str.....cryptoinit.c
push ecx
call eax
add esp, 0xc
jmp 0x403b85
push ecx
call fcn.005dc555
add esp, 4
cmp esi, ebx
jne 0x403b51
mov eax, dword [0x6d2cdc]
mov dword [0x6d2cd8], ebx
mov esi, eax
cmp eax, ebx
je 0x403bc9
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [fcn.00413ef0]
cmp eax, ebx
je 0x403bc0
cmp eax, fcn.00413ef0
je 0x403bc0
push 0x40
push str.....crypto_threads_win.c
push esi
call eax
add esp, 0xc
jmp 0x403bc9
push esi
call fcn.005dc555
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_TlsFree]
mov dword [0x6d2cdc], ebx
cmp dword [0x6d2d2c], ebx
je 0x403bee
mov eax, dword [0x6d2888]
push eax
call edi
mov ecx, dword [0x6d288c]
push ecx
call edi
cmp dword [0x6d2d00], ebx
je 0x403c08
push 0x405610
mov esi, 0x6d2d70
call fcn.0041ac10
add esp, 4
mov eax, dword [0x6cac38]
push eax
mov dword [0x6cac38], 0xffffffff
call edi
call fcn.00402820
mov esi, dword [0x6d2844]
cmp esi, ebx
je 0x403c45
call fcn.00419a50
mov edx, dword [0x6d283c]
push edx
mov dword [0x6d2844], ebx
call edi
mov eax, dword [0x6d2840]
push eax
call edi
call fcn.00424e60
call fcn.00424cf0
call fcn.00426890
call fcn.0046b5c0
call fcn.0041bd20
call fcn.0040e610
call fcn.00401c20
call fcn.004120f0
call fcn.004056a0
pop edi
mov dword [0x6d2ce4], ebx
pop esi
pop ebx
ret

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

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x6d27b0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x406c2b
mov ecx, dword [0x6d27b0]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call fcn.00405570
add esp, 4
pop edi
pop esi
ret
Function at 0x406ca0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 4
call fcn.005e28b0
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push 0
push 0
push 0x40000
mov dword [esp + 0x18], eax
call fcn.00403c80
add esp, 0xc
test eax, eax
je 0x406d4e
push 0x406c50
mov esi, 0x6d2d6c
call fcn.0041ac10
add esp, 4
neg eax
sbb eax, eax
test dword [0x6d2d7c], eax
je 0x406d4e
call edi
mov edi, eax
mov eax, dword [0x6d27b0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, 0xffffffff
je 0x406d4e
test esi, esi
jne 0x406d80
mov ecx, dword [0x6d27b0]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0xffffffffffffffff
push ecx
call ebx
test eax, eax
je 0x406d4e
mov ecx, 0x2de
mov edx, str.....cryptoerrerr.c
mov edi, 0x188
call fcn.00413cf0
mov esi, eax
push 0
test esi, esi
jne 0x406d57
mov edx, dword [0x6d27b0]
push edx
call ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 2
call fcn.00403a00
add esp, 8
test eax, eax
je 0x406d94
mov eax, dword [0x6d27b0]
push esi
push eax
call ebx
test eax, eax
je 0x406d94
push 0
push 0
push 2
call fcn.00403c80
add esp, 0xc
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.00405570
mov ecx, dword [0x6d27b0]
add esp, 4
push 0
push ecx
call ebx
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret