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

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, eax
test esi, esi
jne 0x4014ca
pop esi
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push str.decryption_log_utf16.txt
call ebx
add eax, esi
push 4
push 0x3000
lea eax, [eax*2 + 8]
push eax
push 0
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
je 0x40156d
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x40155f
push esi
call ebx
cmp word [esi + eax*2], 0x5c
je 0x40151e
push esi
call ebx
mov ecx, 0x5c
mov word [esi + eax*2], cx
push str.decryption_log_utf16.txt
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x41e39c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0
push 0
push 4
push 0
push 1
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40155f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x401580
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x41e308]
push edi
mov edi, edx
push 0x41e39c
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
push 0x80
push 3
push 0
push 1
push 4
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4015e4
push 0x41e39c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004048b1
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
xor eax, eax
add edi, edi
mov dword [ebp - 8], eax
xor esi, esi
add esi, eax
lea eax, [ebp - 8]
push 0
push eax
mov eax, dword [ebp - 0xc]
sub edi, esi
push edi
add eax, esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401617
mov eax, dword [ebp - 8]
jmp 0x4015f6
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x41e39c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004048b1
mov esp, ebp
pop ebp
ret
Function at 0x401640
Capabilities:
Print debug messages

Disassembly:
mov eax, dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
push esi
mov ebx, ecx
push edi
mov edi, edx
test ebx, ebx
je 0x40165c
push edi
call eax
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_lstrlenW]
jmp 0x40165e
xor esi, esi
push 4
push 0x3000
push ebx
call eax
add eax, esi
lea eax, [eax*2 + 0x1e]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
je 0x4016b5
push ebx
push str.KRAB:__s
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
test edi, edi
je 0x40169c
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
pop ebx
ret
push 0x10
push str.FATAL_ERROR
push str.ERROR_IN_dbg_ROUTINE
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
pop ebx
ret

Function at 0x401740
Capabilities:
Print debug messages

Disassembly:
push ebx
push esi
push 4
push 0x3000
push 0x200
push 0
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
test ebx, ebx
je 0x4017f8
push edi
push esi
push 0x41806c
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 0xc
push 0
call esi
push 4
push 0x3000
push ebx
mov edi, eax
call esi
add eax, edi
lea eax, [eax*2 + 0x1e]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualFree]
mov esi, eax
test esi, esi
je 0x4017d6
push ebx
push str.KRAB:__s
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x8000
push 0
push esi
call edi
push 0x8000
push 0
push ebx
call edi
pop edi
pop esi
pop ebx
ret
push 0x10
push str.FATAL_ERROR
push str.ERROR_IN_dbg_ROUTINE
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0x8000
push 0
push ebx
call edi
pop edi
pop esi
pop ebx
ret
push 0x10
push str.FATAL_ERROR
push str.ERROR_IN_dbg_ROUTINE
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop esi
pop ebx
ret
Function at 0x401810
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, ecx
mov ecx, 0x41d402
push esi
push edi
mov dword [ebp - 4], ebx
call fcn.00404720
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
push ebx
push 1
push 1
push ebx
call edi
push eax
push str.DeleteTXT__:_Trying_to_delete_landing_from_path__ws_r_n
call fcn.004013b0
add esp, 0x14
push ebx
call edi
push esi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
mov dword [ebp - 8], eax
call ebx
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [ebp - 4]
call edi
push str._DECRYPT.html
push dword [ebp - 4]
mov esi, eax
call ebx
mov eax, dword [ebp - 4]
push eax
push 1
push 1
push eax
call edi
push eax
push str.DeleteTXT__:_Trying_to_delete_html_landing__ws_r_n
call fcn.004013b0
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esp, 0x14
push dword [ebp - 4]
call edi
mov eax, dword [ebp - 4]
xor ecx, ecx
push str._DECRYPT.txt
mov word [eax + esi*2], cx
mov esi, eax
push esi
call ebx
push esi
push 1
push 1
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push str.DeleteTXT__:_Trying_to_delete_txt_landing__ws_r_n
call fcn.004013b0
add esp, 0x14
push esi
call edi
mov eax, dword [ebp - 8]
xor ecx, ecx
pop edi
mov dword [0x41e314], 1
mov word [esi + eax*2], cx
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4021c0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x40
push 0x3000
xorps xmm0, xmm0
mov esi, ecx
push 0x202
movdqu xmmword [ebp - 0x14], xmm0
push 0
mov dword [ebp - 0x14], 0x202
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], 0
test eax, eax
jne 0x402213
mov ecx, str.Memory_manager:_error_allocating_memory_page
call fcn.004016d0
push ecx
lea ecx, [ebp - 0x14]
call fcn.004035b0
mov edx, str.ProgramData_
mov ecx, esi
mov edi, eax
call fcn.00404850
test eax, eax
jne 0x402341
mov edx, str.IETldCache_
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
mov edx, str.Boot_
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
mov edx, str.Program_Files_
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
mov edx, str.Tor_Browser_
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
mov edx, str.Projects_
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
mov edx, str.All_Users_
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
mov edx, str.Local_Settings_
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
mov edx, str.Windows_
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push eax
push 0x2a
push edi
push eax
call ebx
test eax, eax
je 0x4022ec
mov edx, edi
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
push 0
push 0x2b
push edi
push 0
call ebx
test eax, eax
je 0x402306
mov edx, edi
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
push 0
push 0x24
push edi
push 0
call ebx
test eax, eax
je 0x402320
mov edx, edi
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
push 0
push 0x1c
push edi
push 0
call ebx
test eax, eax
je 0x40233a
mov edx, edi
mov ecx, esi
call fcn.00404850
test eax, eax
jne 0x402341
mov esi, 1
jmp 0x402343
xor esi, esi
push 0x8000
push 0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004048b1
mov esp, ebp
pop ebp
ret
Function at 0x402de0
Capabilities:
Get disk information
Get hostname

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x38
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x34], eax
push esi
xorps xmm0, xmm0
lea eax, [esp + 0x1c]
push edi
movq qword [esp + 0x14], xmm0
mov dword [esp + 0x18], eax
lea eax, [esp + 0x14]
push 0x419494
movdqa xmmword [esp + 0x24], xmm0
push eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov al, 0x41
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov byte [esp + 0x13], al
mov byte [esp + 0x14], al
lea eax, [esp + 0x14]
push eax
call esi
cmp eax, 2
jbe 0x402e71
cmp eax, 5
je 0x402e71
lea ecx, [esp + 0x14]
call fcn.004025f0
lea eax, [esp + 0x14]
push eax
push 1
push 1
push eax
call edi
add eax, eax
push eax
push 0x419498
call fcn.004013b0
add esp, 0x14
mov al, byte [esp + 0x13]
inc al
mov byte [esp + 0x13], al
cmp al, 0x5a
jle 0x402e37
push 4
push 0x3000
push 0x202
push 0
mov dword [esp + 0x2c], 0x100
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0
push 1
push 0
push str.Started_Network_Share_Decryption_Thread_r_n
mov esi, eax
call fcn.004013b0
add esp, 0x10
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
je 0x402ede
push esi
push 1
push 1
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push str.Excluding_from_scan:__ws_r_n
call fcn.004013b0
add esp, 0x14
mov edx, esi
jmp 0x402ee0
xor edx, edx
push dword [esp + 0x18]
xor ecx, ecx
call fcn.004026a0
add esp, 4
lea eax, [esp + 0x14]
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0
call edi
push 4
push 0x3000
push str.decryption_end
mov esi, eax
call edi
add eax, esi
lea eax, [eax*2 + 0x14]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
je 0x402f6c
push str.decryption_end
call edi
push str.decryption_end
push 0x418064
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
xor edx, edx
mov ecx, esi
call fcn.00401640
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
xor ecx, esp
call fcn.004048b1
mov esp, ebp
pop ebp
ret
Function at 0x403650
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push 0x41e2f0
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xf0000000
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
mov dword [ebp - 0xc], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x40375e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x80090016
jne 0x40372e
call esi
push eax
push 1
push 1
push 0xa
push str.Decrpyting_RSA__CryptAcquireContext_CRYPT_VERIFYCONTEXT_ERROR:_0x_X_n
call fcn.004013b0
add esp, 0x14
lea eax, [ebp - 8]
push 8
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x40375e
call esi
mov ecx, eax
call fcn.00401740
mov ecx, str.Error_in_AcquireContext
call fcn.004016d0
call esi
push eax
push 1
push 1
push 0xa
push str.Decrpyting_RSA__CryptAcquireContext_CRYPT_NEWKEYSET_ERROR:_0x_X_n
call fcn.004013b0
add esp, 0x14
push 0x41e2f0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004048b1
mov esp, ebp
pop ebp
ret
call esi
mov ecx, eax
call fcn.00401740
mov ecx, str.Error_in_AcquireContext
call fcn.004016d0
push 0x41e2f0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004048b1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xc]
xor esi, esi
push eax
push esi
push esi
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x40378e
push dword [ebp - 0x18]
push ebx
push esi
push 1
push esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov esi, eax
jmp 0x403798
mov ecx, str.Error_importing_key
call fcn.004016d0
push 0
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0x41e2f0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004048b1
mov esp, ebp
pop ebp
ret

Function at 0x4037c0
Capabilities:
Encrypt data using salsa20 or chacha

Disassembly:
mov eax, dword [edx]
mov dword [ecx + 4], eax
mov eax, dword [edx + 4]
mov dword [ecx + 8], eax
mov eax, dword [edx + 8]
mov dword [ecx + 0xc], eax
mov eax, dword [edx + 0xc]
mov dword [ecx + 0x10], eax
mov eax, dword [edx + 0x10]
mov dword [ecx + 0x2c], eax
mov eax, dword [edx + 0x14]
mov dword [ecx + 0x30], eax
mov eax, dword [edx + 0x18]
mov dword [ecx + 0x34], eax
mov eax, dword [edx + 0x1c]
mov dword [0x41e3b4], 0x417f24
mov dword [ecx + 0x38], eax
mov dword [ecx], 0x61707865
mov dword [ecx + 0x14], 0x3320646e
mov dword [ecx + 0x28], 0x79622d32
mov dword [ecx + 0x3c], 0x6b206574
ret
Function at 0x40d679
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.00406456
mov dword [ebp - 0x14], eax
cmp dword [0x41e2b0], esi
jne 0x40d76c
push 0x800
push esi
push 0x417e04
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x40d6f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40d84c
push esi
push esi
push 0x417e04
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40d84c
push 0x417e1c
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40d84c
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x41e2b0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x41e2b4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x41e2b8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x41e2c0], eax
test eax, eax
je 0x40d769
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x41e2bc], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40d791
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40d784
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x40d7a6
push 4
pop eax
jmp 0x40d84e
cmp dword [ebp - 0x14], esi
je 0x40d7a6
push dword [0x41e2b0]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40d78b
mov eax, dword [0x41e2bc]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x40d804
cmp dword [0x41e2c0], edi
je 0x40d804
push eax
call ebx
push dword [0x41e2c0]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40d804
test eax, eax
je 0x40d804
call ecx
test eax, eax
je 0x40d7f9
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x40d7f9
test byte [ebp - 8], 1
jne 0x40d804
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x40d834
mov eax, dword [0x41e2b4]
cmp eax, edi
je 0x40d831
push eax
call ebx
test eax, eax
je 0x40d831
call eax
mov esi, eax
test esi, esi
je 0x40d831
mov eax, dword [0x41e2b8]
cmp eax, edi
je 0x40d831
push eax
call ebx
test eax, eax
je 0x40d831
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x41e2b0]
call ebx
test eax, eax
je 0x40d84c
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40d84e
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004048b1
mov esp, ebp
pop ebp
ret
Function at 0x40b690
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x4e83c0]
test esi, esi
jle 0x40b7a0
mov edi, dword [0x4e83c4]
xor ebx, ebx
lea edx, [edi + 0xc]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x40b6c4
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x40b745
add ebx, 1
add edx, 0x14
cmp ebx, esi
jne 0x40b6b0
mov dword [esp], eax
mov ebx, eax
call sym.___mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x40b7c7
mov eax, dword [0x4e83c4]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call sym.__GetPEImageBase
add eax, dword [edi + 0xc]
mov edx, dword [0x4e83c4]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x40b7a7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x40b73e
sub eax, 4
and eax, 0xfffffffb
jne 0x40b750
add dword [0x4e83c0], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
add ebx, dword [0x4e83c4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov dword [ebx + 4], eax
mov dword [ebx + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x40b73e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call sym.___report_error
lea esi, [esi]
xor esi, esi
jmp 0x40b6ce
mov eax, dword [0x4e83c4]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call sym.___report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call sym.___report_error
mov esi, esi
lea edi, [edi]

Function at 0x40bc00
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x4e83d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x4e83d0]
sub esp, 4
test ebx, ebx
je 0x40bc55
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x40bc4e
test esi, esi
je 0x40bc4e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40bc30
mov dword [esp], 0x4e83d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x41c720
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0xc
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x4a2090], eax
je 0x41c737
add esp, 0xc
ret
call sym._abort
lea esi, [esi]

Function at 0x41cc30
Capabilities:
Print debug messages

Disassembly:
test eax, eax
je 0x41cc60
push edi
push esi
push ebx
mov ebx, eax
add esp, 0xffffff80
mov dword [esp], eax
call sym._pthread_spin_destroy
cmp eax, 1
je 0x41cc62
mov dword [ebx], 0xffffffff
sub esp, 0xffffff80
pop ebx
pop esi
pop edi
ret
repz ret
lea ebx, [esp + 0x15]
mov esi, str.Error_cleaning_up_spin_keys_for_thread
mov ecx, 0xa
xor eax, eax
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x3d]
mov ecx, 0x43
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea edx, [esp + 0x3c]
mov dword [esp + 8], 0xa
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.msvcrt.dll__ultoa]
cmp byte [esp + 0x3c], 0
mov eax, 0x27
jne 0x41ccb5
jmp 0x41ccd2
cmp eax, 0x6a
je 0x41ccc3
add eax, 1
cmp byte [ebx + eax], 0
jne 0x41ccb0
cmp eax, 0x6a
jne 0x41ccd2
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push eax
call sym._abort
mov byte [esp + eax + 0x15], 0xa
mov byte [esp + eax + 0x16], 0
jmp 0x41ccc3
Function at 0x41cd70
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
cmp dword [0x4e8e24], 1
je 0x41cd85
call sym.__pthread_once_raw.part.5.constprop.11
mov eax, dword [0x4a2090]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
mov ebx, eax
je 0x41cdb0
add esp, 0x2c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call sym._pop_pthread_mem
mov esi, eax
mov eax, dword [entry3]
test eax, eax
je 0x41cd9c
test esi, esi
je 0x41cd9c
mov dword [esi + 0x24], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 0x3c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi + 0x18], eax
lea eax, [esi + 0x38]
sub esp, 0x10
mov dword [esi + 0x1c], 0xffffffff
call sym._replace_spin_keys.constprop.10
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [esi + 0x64], 0
mov dword [esi + 0x14], 0
call ebx
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, eax
call ebx
lea edx, [esi + 0x14]
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
sub esp, 0x1c
test eax, eax
je 0x41ceb2
mov eax, dword [esi + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [esi + 0x6c], eax
movzx eax, byte [esi + 0x20]
sub esp, 4
mov dword [esi + 0x68], 0
and eax, 0xffffffcf
or eax, 0x10
mov byte [esi + 0x20], al
mov eax, dword [0x4a2090]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
je 0x41ceb2
add esp, 0x2c
mov ebx, esi
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call sym._abort
mov esi, esi
lea edi, [edi]