joyce8/EMBER2024-capa huggingface dataset:
Function at 0x562a81
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x562ab9
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00560afc
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00560ad4
jmp 0x562ac5
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x56427d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x5642bf
call fcn.0056a4b6
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x5642bf
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x5642b6
xor eax, eax
jmp 0x5642c7
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.005642cd
pop edi
pop esi
pop ebx
ret 4

Function at 0x56a9e6
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x56aa14
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x56aa32
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0056a94c
jmp 0x56aa32
mov eax, dword [esi + 0x14]
test eax, eax
je 0x56aa32
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0056a94c
test edi, edi
mov eax, edi
jne 0x56aa1c
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0xd12d70
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x6c4000]
mov dword [edi + 0x734120], 0x2447026a
push edi
jmp 0xd12d9a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0xd12da1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xd12d90
mov eax, 1
add ebx, ebx
jne 0xd12db3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0xd12dc4
jne 0xd12de3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xd12de3
dec eax
add ebx, ebx
jne 0xd12dd0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0xd12da8
add ebx, ebx
jne 0xd12ddf
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0xd12e35
xor ecx, ecx
sub eax, 3
jb 0xd12dfb
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0xd12e6a
sar eax, 1
mov ebp, eax
jmp 0xd12e06
add ebx, ebx
jne 0xd12e06
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xd12dd4
inc ecx
add ebx, ebx
jne 0xd12e14
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xd12dd4
add ebx, ebx
jne 0xd12e21
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0xd12e16
jne 0xd12e32
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0xd12e16
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0xd12e54
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0xd12e46
jmp 0xd12d96
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0xd12e54
add edi, ecx
jmp 0xd12d96
pop esi
mov edi, esi
mov ecx, 0x2b3a9
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0xd12e72
mov eax, dword [edi]
mov bl, byte [edi + 4]
xchg ah, al
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0xd12e77
lea edi, [esi + 0x90e000]
mov eax, dword [edi]
or eax, eax
je 0xd12ee8
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x917ec4]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x918054]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0xd12e9d
mov ecx, edi
jns 0xd12ecc
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x918058]
or eax, eax
je 0xd12ee2
mov dword [ebx], eax
add ebx, 4
jmp 0xd12eba
call dword [esi + 0x918068]
mov ebp, dword [esi + 0x91805c]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x31f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0xd12f1c
sub esp, 0xffffff80
jmp 0x4040c8
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 0x40a5e0
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 0x40a640
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 0x40a760
mov eax, dword [0x4dd060]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x40a674
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40a6f7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x40a660
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x40a787
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 0x40a767
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x40a6f0
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x40a700
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 0x40a6f0
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 0x40a67e
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 0x40ac20
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 0x40ac75
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 0x40ac6e
test esi, esi
je 0x40ac6e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40ac50
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 0x40afa0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x40afc5
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x40afd0
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x40afc5
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 0x40b018
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40b00e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40b01a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x40b000
xor eax, eax
pop ebx
pop esi
ret

Function at 0x40b500
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 0x40b520
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 0x40b570
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40b511
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 0x40b560

Function at 0x40b5a0
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 0x40b668
mov edx, dword [0x4dd0c0]
mov eax, dword [edx + 4]
test eax, eax
je 0x40b630
cmp edx, 0x4dd0c0
jne 0x40b615
mov dword [0x4dd0c0], eax
cmp eax, 0x4dd0c0
je 0x40b61c
lea esi, [esi]
nop
test eax, eax
je 0x40b645
mov edx, dword [edx]
mov dword [eax], edx
mov edx, eax
mov eax, dword [edx + 4]
cmp eax, 0x4dd0c0
jne 0x40b608
mov eax, dword [0x4dd0c4]
mov dword [edx + 4], eax
test eax, eax
je 0x40b645
mov edx, eax
jmp 0x40b612
mov dword [esp], 0x4dd140
call dword [sym.imp.KERNEL32.dll_FindAtomA]
sub esp, 4
test ax, ax
jne 0x40b685
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, 0x4d5e34
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 0x40b645
Function at 0x40b6a0
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 0x40b6b3
xor eax, eax
mov edx, 0x5f
jmp 0x40b6ef
movzx edx, byte [eax + str.__eh_shmem3_gcc_tdm_]
mov byte [eax + 0x4dd10c], dl
add eax, 1
cmp eax, 0x15
jne 0x40b6e8
xor eax, eax
mov edx, 0x5f
jmp 0x40b717
movzx edx, byte [eax + str.__eh_shmem3_gcc_tdm_]
mov byte [eax + 0x4dd140], dl
add eax, 1
cmp eax, 0x14
jne 0x40b710
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 0x40b90a
mov dword [esp], 0x4dd140
call dword [sym.imp.KERNEL32.dll_FindAtomA]
sub esp, 4
test ax, ax
jne 0x40b860
mov edx, 0x4dd0c0
mov eax, 0x20
lea esi, [esi]
lea esi, [esi]
bt edx, eax
jae 0x40b800
mov ecx, eax
neg ecx
mov byte [ecx + 0x4dd175], 0x41
sub eax, 1
jne 0x40b7f0
mov dword [esp], 0x4dd140
call dword [sym.imp.KERNEL32.dll_AddAtomA]
sub esp, 4
test ax, ax
je 0x40b8f9
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 0x40b92a
lea esi, [esi]
cmp byte [eax + 0x4dd155], 0x41
jne 0x40b8ab
mov ecx, ebp
mov edx, edi
sub ecx, eax
shl edx, cl
or esi, edx
add eax, 1
cmp eax, 0x20
jne 0x40b898
mov eax, esi
mov dword [0x4dd0c0], eax
jmp 0x40b8cc
cmp edx, 0x4dd0c0
je 0x40b834
mov edx, eax
mov eax, dword [eax + 4]
test eax, eax
jne 0x40b8c0
cmp edx, 0x4dd0c0
je 0x40b834
mov dword [edx + 4], 0x4dd0c0
mov dword [esp], dbg.__eh_shmem3_gcc_tdm_cleanup_local_region
call sym.__onexit
jmp 0x40b834
mov eax, 0x4d5e90
call dbg.__eh_shmem_get_error
xor eax, eax
jmp 0x40b851
mov eax, 0x4d5e6c
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, 0x4d5eb4
call dbg.__eh_shmem_get_error
xor eax, eax
jmp 0x40b8b5
Function at 0x40fb60
Capabilities:
Allocate thread local storage

Disassembly:
push ebx
sub esp, 8
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x40fbe8
mov edx, dword [eax + 0x18]
test edx, edx
jne 0x40fc10
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 0x40fbc0
mov ecx, dword [eax + 0x18]
test ecx, ecx
jne 0x40fbe0
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 0x40fb9c
test eax, eax
jne 0x40fbe0
call sym.___shmem3_winpthreads_tdm_init_local_region
lea esi, [esi]
mov eax, dword [eax + 0x18]
jmp 0x40fba8
call sym.___shmem3_winpthreads_tdm_init_local_region
mov ebx, dword [eax + 0x18]
mov eax, dword [0x4dd1e0]
test ebx, ebx
je 0x40fb78
test eax, eax
jne 0x40fc10
call sym.___shmem3_winpthreads_tdm_init_local_region
lea esi, [esi]
lea esi, [esi]
mov ebx, dword [eax + 0x18]
jmp 0x40fb84

Function at 0x40fc20
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 0x40fcfb
mov eax, 0x27
lea edx, [esp + 0x15]
jmp 0x40fccd
cmp eax, 0x6a
je 0x40fcea
mov ecx, eax
add eax, 1
cmp byte [edx + eax], 0
jne 0x40fcc8
cmp eax, 0x6a
je 0x40fcea
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 0x40fce0
Function at 0x412ed0
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 0x412ef2
call sym.__pthread_cleanup_dest.part.0
test byte [ebx + 0x20], 0x30
je 0x412f69
mov eax, dword [0x4dd1e0]
mov edx, eax
test eax, eax
je 0x41300f
cmp dword [eax + 0x18], 0
jne 0x412f64
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 0x412f5b
cmp dword [ebx + 0x14], 0
mov eax, dword [eax + 0x18]
je 0x412f7d
mov dword [ebx + 0x68], 1
mov esi, dword [ebx + 4]
test eax, eax
je 0x412f4e
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov dword [ebx + 0x18], 0
test byte [ebx + 0x24], 4
jne 0x412fcf
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
mov eax, dword [edx + 0x18]
jmp 0x412f19
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 0x412f91
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 0x413051
cmp dword [eax + 0x18], 0
je 0x413001
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 0x412f5b
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 0x413075
cmp dword [eax + 0x18], 0
jne 0x413049
mov dword [eax + 0x18], 0x4d0030
mov eax, 0x4d0030
jmp 0x412fb8
call sym.___shmem3_winpthreads_tdm_init_local_region
cmp dword [eax + 0x18], 0
jne 0x413024
mov eax, dword [0x4dd1e0]
jmp 0x412f0d
mov edx, dword [0x4dd1e0]
test edx, edx
jne 0x412f64
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x18]
jmp 0x412f19
mov edx, dword [0x4dd1e0]
test edx, edx
je 0x41306b
mov eax, dword [edx + 0x18]
jmp 0x412fb8
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x18], 0
je 0x413001
test eax, eax
jne 0x412fb5
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x412fb5
call sym.___shmem3_winpthreads_tdm_init_local_region
cmp dword [eax + 0x18], 0
jne 0x41303f
mov eax, dword [0x4dd1e0]
jmp 0x413001
Function at 0x414c90
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 0x414cb0
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 0x414d00
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x414ca1
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 0x414cf0

Function at 0x414d30
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 0x414df8
mov edx, dword [0x4dd1e0]
mov eax, dword [edx + 4]
test eax, eax
je 0x414dc0
cmp edx, 0x4dd1e0
jne 0x414da5
mov dword [0x4dd1e0], eax
cmp eax, 0x4dd1e0
je 0x414dac
lea esi, [esi]
nop
test eax, eax
je 0x414dd5
mov edx, dword [edx]
mov dword [eax], edx
mov edx, eax
mov eax, dword [edx + 4]
cmp eax, 0x4dd1e0
jne 0x414d98
mov eax, dword [0x4dd1e4]
mov dword [edx + 4], eax
test eax, eax
je 0x414dd5
mov edx, eax
jmp 0x414da2
mov dword [esp], 0x4dd280
call dword [sym.imp.KERNEL32.dll_FindAtomA]
sub esp, 4
test ax, ax
jne 0x414e15
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 0x414dd5
Function at 0x421440
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x4d67a0
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 0x421488
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 0x421473

Function at 0x424b00
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 0x424b38
movzx edx, byte [esi + eax - 1]
mov dword [ebx + 0x24], edx
add esp, 0x14
pop ebx
pop esi
ret 8

Function at 0x424b50
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