joyce8/EMBER2024-capa huggingface dataset:
Function at 0x412281
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
pushal
call 0x412290
pop dword [ebp - 0x44]
mov eax, 0xb5abf184
sub eax, 0xb56acef4
sub dword [ebp - 0x44], eax
push 0x40
push 0x1000
push 0x3cbbe
push 0
mov eax, 0x766d75e9
sub eax, 0x762ae5bd
add eax, dword [ebp - 0x44]
call dword [eax]
mov ecx, 0x56c0
mov edi, eax
mov edx, 0xf4a076ef
add edx, 0xba2f711
add edx, dword [ebp - 0x44]
mov esi, 0xac3bce54
xor dword [ebp - 0x24], 0x5dbd8e54
mov ebx, dword [edx]
xor dword [ebp - 0x20], edx
xor ebx, esi
add dword [ebp - 0x2c], 0xb23b3da1
mov dword [edi], ebx
add dword [ebp - 0x34], ecx
add edi, 0xd2a422ee
sub edi, 0xd2a422ea
add edx, 0xae78ddb0
sub edx, 0xae78ddac
loop 0x4122e3
add eax, 0x14dd3
mov ebx, eax
add eax, 5
mov ecx, 0x400000
add ecx, dword [ebp - 0x44]
call ebx
leave
ret
Function at 0x40192d
Capabilities:
Parse pe header

Disassembly:
push 0x60
push 0x412250
call fcn.00404050
mov edi, 0x94
mov eax, edi
call fcn.00405590
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [0x41213c]
mov ecx, dword [esi + 0x10]
mov dword [0x4181e0], ecx
mov eax, dword [esi + 4]
mov dword [0x4181ec], eax
mov edx, dword [esi + 8]
mov dword [0x4181f0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4181e4], esi
cmp ecx, 2
je 0x40198d
or esi, 0x8000
mov dword [0x4181e4], esi
shl eax, 8
add eax, edx
mov dword [0x4181e8], eax
xor esi, esi
push esi
mov edi, dword [0x412054]
call edi
cmp word [eax], 0x5a4d
jne 0x4019c8
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4019c8
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4019e0
cmp eax, 0x20b
je 0x4019cd
mov dword [ebp - 0x1c], esi
jmp 0x4019f4
cmp dword [ecx + 0x84], 0xe
jbe 0x4019c8
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4019ee
cmp dword [ecx + 0x74], 0xe
jbe 0x4019c8
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00403355
pop ecx
test eax, eax
jne 0x401a08
push 0x1c
call fcn.00401909
pop ecx
call fcn.004045c6
test eax, eax
jne 0x401a19
push 0x10
call fcn.00401909
pop ecx
call fcn.00405503
mov dword [ebp - 4], esi
call fcn.00405305
test eax, eax
jge 0x401a32
push 0x1b
call fcn.004018e4
pop ecx
call dword [0x41205c]
mov dword [0x41de54], eax
call fcn.004051e3
mov dword [0x418060], eax
call fcn.00405141
test eax, eax
jge 0x401a58
push 8
call fcn.004018e4
pop ecx
call fcn.00404f0e
test eax, eax
jge 0x401a69
push 9
call fcn.004018e4
pop ecx
push 1
call fcn.00404900
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x401a7f
push eax
call fcn.004018e4
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [0x412058]
call fcn.00404eb1
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x401aa0
movzx eax, word [ebp - 0x40]
jmp 0x401aa3
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call 0x40dd30
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x401ac1
push edi
call 0x404a2d
call fcn.00404a4f
jmp 0x401af3
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040408b
ret

Function at 0x67c76b
Capabilities:
Parse pe header

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

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x4dd048], 1
mov dword [0x4dd044], 1
mov dword [0x4dd040], 1
mov dword [0x4dd038], 1
jne 0x401060
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010c0
mov dword [0x4dd014], eax
mov eax, dword [0x4dd054]
test eax, eax
je 0x4010b0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x4dd068]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x4dd050]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x4d006c], 1
je 0x4010f0
xor eax, eax
add esp, 0x1c
ret
mov dword [esp], 1
call sym.___set_app_type
jmp 0x40107a
movzx edx, word [ecx + 0x18]
cmp dx, 0x10b
je 0x401108
cmp dx, 0x20b
jne 0x401060
cmp dword [ecx + 0x84], 0xe
jbe 0x401060
mov edx, dword [ecx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401060
mov dword [esp], dbg._matherr
call dbg.__mingw_setusermatherr
xor eax, eax
add esp, 0x1c
ret
cmp dword [ecx + 0x74], 0xe
jbe 0x401060
mov ecx, dword [ecx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401060
Function at 0x40aaf0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x40ab50
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x4dd05c]
test esi, esi
jle 0x40ac70
mov eax, dword [0x4dd060]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x40ab84
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40ac07
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x40ab70
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x40ac97
mov eax, dword [0x4dd060]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x4dd060]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x40ac77
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x40ac00
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x40ac10
add dword [0x4dd05c], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 0x40
mov eax, 4
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x4dd060]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x40ac00
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x40ab8e
mov eax, dword [0x4dd060]
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 dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
nop
Function at 0x40b130
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x4dd078
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x4dd070]
sub esp, 4
test ebx, ebx
je 0x40b185
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 0x40b17e
test esi, esi
je 0x40b17e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40b160
mov dword [esp], 0x4dd078
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40b4b0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x40b4d5
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x40b4e0
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x40b4d5
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test esi, esi
je 0x40b528
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40b51e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40b52a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x40b510
xor eax, eax
pop ebx
pop esi
ret

Function at 0x40ba10
Capabilities:
Print debug messages

Disassembly:
push esi
push ebx
mov ebx, eax
sub esp, 0x34
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40ba30
add esp, 0x34
pop ebx
pop esi
ret
lea edx, [esp + 0x2c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
sub esp, 0x1c
test eax, eax
jne 0x40ba80
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40ba21
int3
mov eax, dword [esp + 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [esp], eax
call esi
sub esp, 4
mov dword [esp], ebx
call esi
sub esp, 4
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
sub esp, 4
jmp 0x40ba70
Function at 0x40bab0
Capabilities:
Check mutex on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp + 8], 0x4dd104
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
sub esp, 0xc
mov ebx, eax
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test eax, eax
jne 0x40bb78
mov edx, dword [0x4dd0c0]
mov eax, dword [edx + 4]
test eax, eax
je 0x40bb40
cmp edx, 0x4dd0c0
jne 0x40bb25
mov dword [0x4dd0c0], eax
cmp eax, 0x4dd0c0
je 0x40bb2c
lea esi, [esi]
nop
test eax, eax
je 0x40bb55
mov edx, dword [edx]
mov dword [eax], edx
mov edx, eax
mov eax, dword [edx + 4]
cmp eax, 0x4dd0c0
jne 0x40bb18
mov eax, dword [0x4dd0c4]
mov dword [edx + 4], eax
test eax, eax
je 0x40bb55
mov edx, eax
jmp 0x40bb22
mov dword [esp], 0x4dd140
call dword [sym.imp.KERNEL32.dll_FindAtomA]
sub esp, 4
test ax, ax
jne 0x40bb95
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
sub esp, 4
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
sub esp, 4
add esp, 0x18
pop ebx
ret
mov eax, 0x4d5e74
call dbg.__eh_shmem_get_error
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
sub esp, 4
add esp, 0x18
pop ebx
ret
movzx eax, ax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeleteAtom]
sub esp, 4
jmp 0x40bb55
Function at 0x40bbb0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edx, edx
mov dword [esp + 0x1c], eax
movzx eax, byte [esp + edx + 0x1c]
mov ecx, eax
and eax, 0xf
shr cl, 4
add eax, 0x61
add ecx, 0x41
mov byte [edx + edx + 0x4dd105], al
mov byte [edx + edx + 0x4dd104], cl
add edx, 1
cmp edx, 4
jne 0x40bbc3
xor eax, eax
mov edx, 0x5f
jmp 0x40bbff
movzx edx, byte [eax + str.__eh_shmem3_gcc_tdm_]
mov byte [eax + 0x4dd10c], dl
add eax, 1
cmp eax, 0x15
jne 0x40bbf8
xor eax, eax
mov edx, 0x5f
jmp 0x40bc27
movzx edx, byte [eax + str.__eh_shmem3_gcc_tdm_]
mov byte [eax + 0x4dd140], dl
add eax, 1
cmp eax, 0x14
jne 0x40bc20
mov byte [0x4dd154], 0x2d
mov dword [0x4dd155], 0x61616161
mov dword [0x4dd159], 0x61616161
mov dword [0x4dd15d], 0x61616161
mov dword [0x4dd161], 0x61616161
mov dword [0x4dd165], 0x61616161
mov dword [0x4dd169], 0x61616161
mov dword [0x4dd16d], 0x61616161
mov dword [0x4dd171], 0x61616161
mov byte [0x4dd175], 0
mov dword [esp + 8], 0x4dd104
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
sub esp, 0xc
mov ebx, eax
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov esi, eax
test eax, eax
jne 0x40be1a
mov dword [esp], 0x4dd140
call dword [sym.imp.KERNEL32.dll_FindAtomA]
sub esp, 4
test ax, ax
jne 0x40bd70
mov edx, 0x4dd0c0
mov eax, 0x20
lea esi, [esi]
lea esi, [esi]
bt edx, eax
jae 0x40bd10
mov ecx, eax
neg ecx
mov byte [ecx + 0x4dd175], 0x41
sub eax, 1
jne 0x40bd00
mov dword [esp], 0x4dd140
call dword [sym.imp.KERNEL32.dll_AddAtomA]
sub esp, 4
test ax, ax
je 0x40be09
mov dword [esp], dbg.__eh_shmem3_gcc_tdm_cleanup_local_region
mov dword [0x4dd0c0], 0x4dd0c0
call sym.__onexit
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
sub esp, 4
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4dd0c0]
sub esp, 4
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, ax
mov ebp, 0x20
mov edi, 1
mov dword [esp + 8], 0x36
mov dword [esp + 4], 0x4dd140
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetAtomNameA]
mov edx, eax
sub esp, 0xc
xor eax, eax
test edx, edx
je 0x40be3a
lea esi, [esi]
cmp byte [eax + 0x4dd155], 0x41
jne 0x40bdbb
mov ecx, ebp
mov edx, edi
sub ecx, eax
shl edx, cl
or esi, edx
add eax, 1
cmp eax, 0x20
jne 0x40bda8
mov eax, esi
mov dword [0x4dd0c0], eax
jmp 0x40bddc
cmp edx, 0x4dd0c0
je 0x40bd44
mov edx, eax
mov eax, dword [eax + 4]
test eax, eax
jne 0x40bdd0
cmp edx, 0x4dd0c0
je 0x40bd44
mov dword [edx + 4], 0x4dd0c0
mov dword [esp], dbg.__eh_shmem3_gcc_tdm_cleanup_local_region
call sym.__onexit
jmp 0x40bd44
mov eax, 0x4d5ed0
call dbg.__eh_shmem_get_error
xor eax, eax
jmp 0x40bd61
mov eax, 0x4d5eac
call dbg.__eh_shmem_get_error
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
sub esp, 4
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x4d5ef4
call dbg.__eh_shmem_get_error
xor eax, eax
jmp 0x40bdc5
Function at 0x410070
Capabilities:
Allocate thread local storage

Disassembly:
push ebx
sub esp, 8
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x4100f8
mov edx, dword [eax + 0x18]
test edx, edx
jne 0x410120
mov dword [eax + 0x18], 0x4d0030
mov ebx, 0x4d0030
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [ebx], eax
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x4100d0
mov ecx, dword [eax + 0x18]
test ecx, ecx
jne 0x4100f0
mov dword [eax + 0x18], 0x4d0030
mov eax, 0x4d0030
cmp dword [eax], 0xffffffff
je sym._pthread_tls_init.cold
add esp, 8
pop ebx
ret
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4dd1e0]
mov edx, dword [edx + 0x18]
test edx, edx
je 0x4100ac
test eax, eax
jne 0x4100f0
call sym.___shmem3_winpthreads_tdm_init_local_region
lea esi, [esi]
mov eax, dword [eax + 0x18]
jmp 0x4100b8
call sym.___shmem3_winpthreads_tdm_init_local_region
mov ebx, dword [eax + 0x18]
mov eax, dword [0x4dd1e0]
test ebx, ebx
je 0x410088
test eax, eax
jne 0x410120
call sym.___shmem3_winpthreads_tdm_init_local_region
lea esi, [esi]
lea esi, [esi]
mov ebx, dword [eax + 0x18]
jmp 0x410094

Function at 0x410130
Capabilities:
Contain obfuscated stackstrings
Print debug messages

Disassembly:
push edi
xor eax, eax
mov ecx, 0x10
sub esp, 0x88
lea edi, [esp + 0x40]
mov dword [esp + 0x15], 0x6f727245
mov dword [esp + 0x19], 0x6c632072
mov dword [esp + 0x1d], 0x696e6165
mov dword [esp + 0x21], 0x7520676e
mov dword [esp + 0x25], 0x70732070
mov dword [esp + 0x29], 0x6b5f6e69
mov dword [esp + 0x2d], 0x20737965
mov dword [esp + 0x31], 0x20726f66
mov dword [esp + 0x35], 0x65726874
mov dword [esp + 0x39], 0x206461
mov dword [esp + 0x3d], 0
mov dword [esp + 0x7c], 0
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea edx, [esp + 0x3c]
mov dword [esp + 8], 0xa
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__ultoa]
cmp byte [esp + 0x3c], 0
je 0x41020b
mov eax, 0x27
lea edx, [esp + 0x15]
jmp 0x4101dd
cmp eax, 0x6a
je 0x4101fa
mov ecx, eax
add eax, 1
cmp byte [edx + eax], 0
jne 0x4101d8
cmp eax, 0x6a
je 0x4101fa
add ecx, 2
mov byte [esp + eax + 0x15], 0xa
mov byte [esp + ecx + 0x15], 0
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
sub esp, 4
call sym._abort
mov ecx, 0x28
mov eax, 0x27
lea edx, [esp + 0x15]
jmp 0x4101f0
Function at 0x4133e0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov esi, dword [esp + 0x20]
call sym.___pthread_self_lite
mov dword [eax + 4], esi
mov ebx, eax
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x413402
call sym.__pthread_cleanup_dest.part.0
test byte [ebx + 0x20], 0x30
je 0x413479
mov eax, dword [0x4dd1e0]
mov edx, eax
test eax, eax
je 0x41351f
cmp dword [eax + 0x18], 0
jne 0x413474
mov dword [eax + 0x18], 0x4d0030
mov eax, 0x4d0030
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x41346b
cmp dword [ebx + 0x14], 0
mov eax, dword [eax + 0x18]
je 0x41348d
mov dword [ebx + 0x68], 1
mov esi, dword [ebx + 4]
test eax, eax
je 0x41345e
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov dword [ebx + 0x18], 0
test byte [ebx + 0x24], 4
jne 0x4134df
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
mov eax, dword [edx + 0x18]
jmp 0x413429
add ebx, 0x70
mov dword [esp + 4], 1
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_longjmp]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x4134a1
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov dword [ebx + 0x18], 0
mov eax, ebx
mov esi, dword [ebx + 4]
call sym._push_pthread_mem
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x413561
cmp dword [eax + 0x18], 0
je 0x413511
mov eax, dword [eax + 0x18]
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push eax
push eax
jmp 0x41346b
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
push edx
mov dword [ebx + 0x14], 0
call sym._push_pthread_mem
mov eax, dword [0x4dd1e0]
mov edx, eax
test eax, eax
je 0x413585
cmp dword [eax + 0x18], 0
jne 0x413559
mov dword [eax + 0x18], 0x4d0030
mov eax, 0x4d0030
jmp 0x4134c8
call sym.___shmem3_winpthreads_tdm_init_local_region
cmp dword [eax + 0x18], 0
jne 0x413534
mov eax, dword [0x4dd1e0]
jmp 0x41341d
mov edx, dword [0x4dd1e0]
test edx, edx
jne 0x413474
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x18]
jmp 0x413429
mov edx, dword [0x4dd1e0]
test edx, edx
je 0x41357b
mov eax, dword [edx + 0x18]
jmp 0x4134c8
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x18], 0
je 0x413511
test eax, eax
jne 0x4134c5
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x4134c5
call sym.___shmem3_winpthreads_tdm_init_local_region
cmp dword [eax + 0x18], 0
jne 0x41354f
mov eax, dword [0x4dd1e0]
jmp 0x413511
Function at 0x4151a0
Capabilities:
Print debug messages

Disassembly:
push esi
push ebx
mov ebx, eax
sub esp, 0x34
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4151c0
add esp, 0x34
pop ebx
pop esi
ret
lea edx, [esp + 0x2c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
sub esp, 0x1c
test eax, eax
jne 0x415210
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x4151b1
int3
mov eax, dword [esp + 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [esp], eax
call esi
sub esp, 4
mov dword [esp], ebx
call esi
sub esp, 4
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
sub esp, 4
jmp 0x415200

Function at 0x415240
Capabilities:
Check mutex on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp + 8], 0x4dd240
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
sub esp, 0xc
mov ebx, eax
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test eax, eax
jne 0x415308
mov edx, dword [0x4dd1e0]
mov eax, dword [edx + 4]
test eax, eax
je 0x4152d0
cmp edx, 0x4dd1e0
jne 0x4152b5
mov dword [0x4dd1e0], eax
cmp eax, 0x4dd1e0
je 0x4152bc
lea esi, [esi]
nop
test eax, eax
je 0x4152e5
mov edx, dword [edx]
mov dword [eax], edx
mov edx, eax
mov eax, dword [edx + 4]
cmp eax, 0x4dd1e0
jne 0x4152a8
mov eax, dword [0x4dd1e4]
mov dword [edx + 4], eax
test eax, eax
je 0x4152e5
mov edx, eax
jmp 0x4152b2
mov dword [esp], 0x4dd280
call dword [sym.imp.KERNEL32.dll_FindAtomA]
sub esp, 4
test ax, ax
jne 0x415325
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
sub esp, 4
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
sub esp, 4
add esp, 0x18
pop ebx
ret
mov eax, str.failed_to_to_lock_cleanup_mutex_n
call sym.___shmem_get_error
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
sub esp, 4
add esp, 0x18
pop ebx
ret
movzx eax, ax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeleteAtom]
sub esp, 4
jmp 0x4152e5
Function at 0x421970
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x4d67e0
mov esi, dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
sub esp, 4
mov dword [esp + 4], str.rand_s
mov dword [esp], eax
call ebx
sub esp, 8
test eax, eax
je 0x4219b8
mov dword [esp + 0x20], esi
mov dword [dbg.init_rand_s], eax
add esp, 0x14
pop ebx
pop esi
jmp eax
mov dword [esp], str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
sub esp, 4
mov dword [esp + 4], str.SystemFunction036
mov dword [esp], eax
call ebx
mov dword [0x4ddd90], eax
sub esp, 8
mov eax, dbg.mingw_rand_s
jmp 0x4219a3

Function at 0x425040
Capabilities:
Read file on windows

Disassembly:
push esi
push ebx
mov ebx, ecx
sub esp, 0x14
mov eax, dword [ecx + 0x20]
mov esi, dword [esp + 0x20]
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x24]
mov dword [esp], esi
mov dword [esp + 8], eax
call sym._fread
mov edx, 0xffffffff
test eax, eax
jle 0x425078
movzx edx, byte [esi + eax - 1]
mov dword [ebx + 0x24], edx
add esp, 0x14
pop ebx
pop esi
ret 8

Function at 0x425090
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
mov eax, dword [ecx + 0x20]
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sym._fwrite
add esp, 0x1c
ret 8