joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41a7e0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov esi, dword [esp + 0x40]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
call fcn.004199b0
mov eax, dword [0x431060]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x41a8f8
lea edi, [ebx + 0x38]
mov dword [esp], edi
call fcn.0041d1e0
mov edx, dword [ebx + 0x2c]
cmp esi, dword [ebx + 0x28]
jb 0x41a8c4
lea ebp, [esi + 1]
mov dword [esp], edx
lea eax, [ebp*4]
mov dword [esp + 4], eax
call sub.msvcrt.dll_realloc
test eax, eax
je 0x41a904
mov dword [esp + 0x1c], eax
mov dword [esp + 4], ebp
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
mov edx, dword [esp + 0x1c]
test eax, eax
mov dword [esp + 0x18], eax
je 0x41a904
mov ecx, dword [ebx + 0x28]
mov eax, ebp
mov dword [esp + 4], 0
mov dword [esp + 0x1c], edx
sub eax, ecx
lea ecx, [edx + ecx*4]
shl eax, 2
mov dword [esp], ecx
mov dword [esp + 8], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebx + 0x28]
mov edx, dword [esp + 0x18]
mov ecx, ebp
mov dword [esp + 4], 0
sub ecx, eax
add eax, edx
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x28], ebp
mov dword [ebx + 0x2c], edx
mov dword [ebx + 0x30], eax
mov eax, dword [esp + 0x44]
mov dword [edx + esi*4], eax
mov eax, dword [ebx + 0x30]
mov byte [eax + esi], 1
mov dword [esp], edi
call fcn.0041d230
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
sub esp, 4
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00419a60
mov ebx, eax
jmp 0x41a815
mov dword [esp], edi
call fcn.0041d230
mov eax, 0xc
jmp 0x41a8ec

Function at 0x41a9a0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
call fcn.004199b0
mov eax, dword [0x431060]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41a9c8
mov eax, dword [eax + 0x18]
add esp, 0x1c
ret
call fcn.00419a60
test eax, eax
jne 0x41a9bd
add esp, 0x1c
ret

Function at 0x41aa30
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
call fcn.004199b0
mov eax, dword [0x431060]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41aa58
add eax, 0xc
add esp, 0x1c
ret
call fcn.00419a60
test eax, eax
jne 0x41aa4d
jmp 0x41aa50
Function at 0x41aa90
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 fcn.00419b90
mov dword [eax + 4], esi
mov ebx, eax
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x41aab2
call fcn.00419bc0
test byte [ebx + 0x20], 0x30
jne 0x41aacc
add ebx, 0x70
mov dword [esp + 4], 1
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_longjmp]
mov eax, dword [0x431060]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
push edx
test eax, eax
je 0x41ab0d
cmp dword [ebx + 0x14], 0
mov eax, dword [eax + 0x18]
je 0x41ab4d
mov dword [ebx + 0x68], 1
mov esi, dword [ebx + 4]
test eax, eax
je 0x41ab02
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
xor eax, eax
mov dword [ebx + 0x18], eax
test byte [ebx + 0x24], 4
jne 0x41ab16
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
push ecx
mov dword [ebx + 0x14], eax
mov eax, ebx
call fcn.00419990
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [0x431060]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edx
push edx
jmp 0x41ab0d
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x41ab61
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
xor eax, eax
mov esi, dword [ebx + 4]
mov dword [ebx + 0x18], eax
jmp 0x41ab2e

Function at 0x41ab70
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x449afc]
test eax, eax
jne 0x41ab80
xor eax, eax
ret
sub esp, 0x1c
call fcn.004199b0
mov eax, dword [0x431060]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41abc0
mov edx, dword [eax + 0x10]
test edx, edx
jle 0x41abb0
xor eax, eax
add esp, 0x1c
ret
test byte [eax + 0x20], 3
je 0x41aba4
mov eax, dword [eax + 0x24]
and eax, 1
jmp 0x41aba6
call fcn.00419a60
test eax, eax
je 0x41aba4
jmp 0x41ab9d

Function at 0x41abd0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
call fcn.004199b0
mov eax, dword [0x431060]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41ac10
mov edx, dword [esp + 0x20]
test edx, edx
jle 0x41ac00
lock add dword [eax + 0x10], 1
add esp, 0x1c
ret
lock sub dword [eax + 0x10], 1
add esp, 0x1c
ret
call fcn.00419a60
test eax, eax
jne 0x41abed
add esp, 0x1c
ret
Function at 0x41ad10
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
call fcn.004199b0
mov eax, dword [0x431060]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x41ad80
test byte [ebx + 0x20], 0xc
jne 0x41ad40
mov eax, dword [0x449afc]
test eax, eax
jne 0x41ad50
add esp, 0x14
pop ebx
pop esi
ret
lea esi, [ebx + 0x1c]
mov dword [esp], esi
call fcn.00418ca0
movzx eax, byte [ebx + 0x20]
test al, 3
je 0x41ad72
mov edx, dword [ebx + 0x24]
test dl, 1
je 0x41ad72
mov ecx, dword [ebx + 0x10]
test ecx, ecx
jle 0x41ad91
mov dword [esp], esi
call fcn.00418fd0
add esp, 0x14
pop ebx
pop esi
ret
call fcn.00419a60
mov ebx, eax
test eax, eax
jne 0x41ad31
add esp, 0x14
pop ebx
pop esi
ret
and eax, 0xfffffff3
and edx, 0xfffffffe
or eax, 4
mov dword [ebx + 0x24], edx
mov byte [ebx + 0x20], al
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x41adb1
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push eax
mov dword [esp], esi
call fcn.00418fd0
call fcn.0041ac20
nop
push esi
push ebx
sub esp, 0x14
mov eax, dword [esp + 0x20]
test eax, eax
je 0x41ae30
mov dword [esp], eax
call fcn.0041c140
xor ecx, ecx
mov ebx, edx
mov edx, 0xffffffff
cmp edx, eax
sbb ecx, ebx
cmovae edx, eax
mov ebx, edx
call fcn.004199b0
mov eax, dword [0x431060]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
test eax, eax
je 0x41ae80
test ebx, ebx
je 0x41ae4a
call fcn.0041ad10
mov eax, dword [esi + 0x18]
test eax, eax
je 0x41ae70
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.0041c250
call fcn.0041ad10
add esp, 0x14
xor eax, eax
pop ebx
pop esi
ret
call fcn.004199b0
mov eax, dword [0x431060]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41ae90
call fcn.0041ad10
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
call fcn.0041ad10
add esp, 0x14
xor eax, eax
pop ebx
pop esi
ret
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
jmp 0x41ae1f
call fcn.00419a60
mov esi, eax
jmp 0x41ae03
call fcn.00419a60
jmp 0x41ae4a
Function at 0x42f270
Capabilities:
Query environment variable

Disassembly:
push edi
sub esp, 0x18
mov eax, dword [esp + 0x20]
lea edi, [eax + 0x60]
mov dword [esp], edi
call sub.msvcrt.dll_malloc
test eax, eax
je 0x42e712
mov edx, eax
lea edi, [edx + 4]
mov ecx, edx
xor eax, eax
mov dword [edx], 0
and edi, 0xfffffffc
mov dword [edx + 0x5c], 0
sub ecx, edi
add ecx, 0x60
shr ecx, 2
rep stosd dword es:[edi], eax
add esp, 0x18
lea eax, [edx + 0x60]
pop edi
ret
mov eax, edi
call fcn.00420540
mov edx, eax
test eax, eax
je 0x42f258
jmp 0x42e6e9
call fcn.0042f5d4
nop
nop
nop
call fcn.0042f5d4
nop
nop
nop
nop
nop
nop
nop
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov eax, dword [0x4490e8]
mov dword [esp + 0x2c], eax
xor eax, eax
mov dword [esp + 4], 0
mov dword [esp], 0x4310c0
call fcn.00419120
mov dword [esp], str.GLIBCXX_TUNABLES
mov dword [0x4310c4], 0
mov dword [0x4310c8], 0
mov dword [0x4310cc], 0
call sub.msvcrt.dll_getenv
mov dword [esp + 0x14], 8
mov dword [esp + 0x18], str.obj_size
mov ebx, eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 9
mov dword [esp + 0x24], str.obj_count
mov dword [esp + 0x28], 0x40
test eax, eax
jne 0x42f316
jmp 0x42f3e7
mov dword [esp], ebx
mov dword [esp + 4], 0x3a
call sub.msvcrt.dll_strchr
mov ebx, eax
test eax, eax
je 0x42f390
xor eax, eax
cmp byte [ebx], 0x3a
sete al
add ebx, eax
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
xor eax, 0x62696c67
xor edx, 0x2e787863
or eax, edx
jne 0x42f300
mov eax, dword [ebx + 7]
mov edx, dword [ebx + 0xb]
xor eax, 0x5f68652e
xor edx, 0x6c6f6f70
or eax, edx
jne 0x42f300
cmp byte [ebx + 0xf], 0x2e
jne 0x42f300
add ebx, 0x10
lea esi, [esp + 0x14]
lea ebp, [esp + 0x2c]
mov edi, dword [esi]
test edi, edi
je 0x42f377
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov eax, dword [esi + 4]
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x42f381
cmp byte [ebx + edi], 0x3d
je 0x42f415
add esi, 0xc
cmp ebp, esi
jne 0x42f35a
jmp 0x42f300
mov eax, dword [esp + 0x28]
mov edx, 0x100
mov ecx, 6
cmp eax, edx
cmovle edx, eax
mov eax, dword [esp + 0x1c]
test eax, eax
cmove eax, ecx
add eax, 0x2c
imul eax, edx
lea ebx, [eax*4]
mov dword [0x4310cc], ebx
test ebx, ebx
jne 0x42f3f6
mov dword [esp], 0x42f1e0
call fcn.00401400
mov eax, dword [esp + 0x2c]
sub eax, dword [0x4490e8]
jne 0x42f460
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [0x4310cc], 0x3200
mov ebx, 0x3200
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
mov dword [0x4310c8], eax
test eax, eax
je 0x42f453
xor edx, edx
mov dword [0x4310c4], eax
mov dword [eax], ebx
mov dword [eax + 4], edx
jmp 0x42f3c3
lea eax, [esp + 0x10]
xor ebp, ebp
mov dword [esp + 4], eax
lea eax, [ebx + edi + 1]
mov dword [esp + 8], ebp
mov dword [esp], eax
call sub.msvcrt.dll_strtoul
mov ebx, dword [esp + 0x10]
movzx edx, byte [ebx]
cmp dl, 0x3a
je 0x42f443
test dl, dl
jne 0x42f300
test eax, eax
js 0x42f300
mov dword [esi + 8], eax
jmp 0x42f300
xor ecx, ecx
mov dword [0x4310cc], ecx
jmp 0x42f3c3
call fcn.00412a70
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
call fcn.0042f5d4
nop
nop
nop
call fcn.0042f5d4
nop
nop
nop
Function at 0x401682
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b8
mov dword [esp], 0
call sub.msvcrt.dll_time
mov dword [esp], eax
call sub.msvcrt.dll_srand
mov word [ebp - 0xa], 0x202
movzx eax, word [ebp - 0xa]
lea edx, [ebp - 0x1a0]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_WSAStartup]
call eax
sub esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4016d0
mov eax, 0
jmp 0x401704
movzx eax, word [ebp - 0x1a0]
cmp al, 2
jne 0x4016ea
movzx eax, word [ebp - 0x1a0]
shr ax, 8
cmp al, 2
je 0x4016f8
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
mov eax, 0
jmp 0x401704
mov byte [0x44b044], 1
mov eax, 1
leave
ret

Function at 0x401706
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x54
mov eax, dword [ebp + 8]
mov dword [esp + 4], 0
mov dword [esp], 0x433068
mov ecx, eax
call fcn.00424160
sub esp, 8
test eax, eax
setne al
test al, al
je 0x4017a8
lea eax, [ebp - 0x11]
mov dword [ebp - 0x10], eax
nop
nop
lea eax, [ebp - 0x2c]
lea edx, [ebp - 0x11]
mov dword [esp + 8], edx
mov dword [esp + 4], 4
mov dword [esp], str.panyan
mov ecx, eax
call fcn.0042d690
sub esp, 0xc
lea eax, [ebp - 0x44]
lea edx, [ebp - 0x2c]
mov dword [esp + 8], edx
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0042eda0
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x44]
mov dword [esp], edx
mov ecx, eax
call fcn.0042e320
sub esp, 4
lea eax, [ebp - 0x44]
mov ecx, eax
call fcn.0042e2c0
lea eax, [ebp - 0x2c]
mov ecx, eax
call fcn.0042e2c0
lea eax, [ebp - 0x11]
mov ecx, eax
call fcn.00429fcc
nop
mov eax, dword [ebp + 8]
mov ecx, eax
call fcn.00424320
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_gethostbyname]
call eax
sub esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4017cf
mov eax, 0
jmp 0x401800
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
jmp 0x401800
mov ebx, dword [ebp - 4]
leave
ret

Function at 0x401fd8
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
lea edx, [ebp - 9]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_recv]
call eax
sub esp, 0x10
shr eax, 0x1f
test al, al
je 0x40203b
mov dword [esp], 4
call fcn.0042f390
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x436f34
mov dword [esp], eax
call fcn.0042f710
movzx eax, byte [ebp - 9]
leave
ret
Function at 0x4021ad
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 8]
mov ecx, eax
call fcn.00424320
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_DeleteFileA]
call eax
sub esp, 4
mov eax, dword [ebp + 8]
mov ecx, eax
call fcn.00424320
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
call eax
sub esp, 0x1c
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x10], 0
lea edx, [ebp - 0x10]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
call eax
sub esp, 0x14
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
nop
leave
ret
Function at 0x40dae0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.004191f0
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 sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.004191f0
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x40db40
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x44b078]
test esi, esi
jle 0x40dc60
mov eax, dword [0x44b07c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x40db74
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40dbf7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x40db60
mov dword [esp], ebx
call fcn.0040e540
mov edi, eax
test eax, eax
je 0x40dc87
mov eax, dword [0x44b07c]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.0040e680
mov edx, dword [0x44b07c]
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 0x40dc67
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x40dbf0
lea edx, [eax - 0x40]
and edx, 0xffffffbf
jne 0x40dc00
add dword [0x44b078], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x44b07c]
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 0x40dbf0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.0040dae0
lea esi, cs:[esi]
nop
xor esi, esi
jmp 0x40db7e
mov eax, dword [0x44b07c]
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 fcn.0040dae0
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.0040dae0
lea esi, cs:[esi]
nop
Function at 0x40e1b0
Capabilities:
Get thread local storage value

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

Function at 0x40e540
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x40e565
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x40e570
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x40e565
push esi
push ebx
mov ebx, dword [esp + 0xc]
movzx eax, word [ecx + 0x400014]
movzx esi, word [ecx + 0x400006]
sub ebx, 0x400000
lea eax, [edx + eax + 0x18]
test si, si
je 0x40e5b8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40e5ae
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40e5ba
add ecx, 1
add eax, 0x28
cmp esi, ecx
jne 0x40e5a0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x413590
Capabilities:
Terminate process

Disassembly:
sub esp, 0x1c
mov dword [esp + 8], 0x2d
mov dword [esp + 4], str._buffer_overflow_detected_:_terminated_n
mov dword [esp], 2
call sub.msvcrt.dll__write
mov dword [esp], 0x17
call sub.KERNEL32.dll_IsProcessorFeaturePresent
sub esp, 4
test eax, eax
je 0x4135c9
mov ecx, 8
int 0x29
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [esp + 4], 0xc0000409
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push eax
push eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x4135f0
Capabilities:
Terminate process

Disassembly:
sub esp, 0x1c
mov dword [esp + 8], 0x2c
mov dword [esp + 4], str._stack_smashing_detected_:_terminated_n
mov dword [esp], 2
call sub.msvcrt.dll__write
mov dword [esp], 0x17
call sub.KERNEL32.dll_IsProcessorFeaturePresent
sub esp, 4
test eax, eax
je 0x413629
mov ecx, 2
int 0x29
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [esp + 4], 0xc0000409
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push eax
push eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x41a3b0
Capabilities:
Print debug messages

Disassembly:
push edi
pxor xmm0, xmm0
lea edi, [esp + 8]
and esp, 0xfffffff0
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push ebx
lea ebx, [ebp - 0x41]
sub esp, 0x50
movups xmmword [ebp - 0x21], xmm0
mov eax, dword [0x44b0f8]
mov dword [ebp - 0xc], eax
xor eax, eax
movups xmmword [ebp - 0x41], xmm0
movups xmmword [ebp - 0x31], xmm0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esp + 8], str.Error_cleaning_up_spin_keys_for_thread__lu._n
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x35
mov dword [esp], ebx
call fcn.0041f920
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
sub esp, 4
call sub.msvcrt.dll_abort
lea esi, cs:[esi]
lea esi, [esi]

Function at 0x41a7a0
Capabilities:
Allocate thread local storage

Disassembly:
cmp dword [0x44baf4], 1
je 0x41a840
push edi
mov eax, 0x44baf4
push esi
push ebx
sub esp, 0x10
call fcn.0041a1a0
lea esi, [eax + 4]
mov ebx, eax
mov dword [esp], esi
call fcn.00419a90
mov edi, dword [0x44baf4]
test edi, edi
jne 0x41a810
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x432124], eax
cmp eax, 0xffffffff
je 0x4313d5
mov dword [0x44baf4], 1
mov dword [esp], esi
call fcn.00419dc0
add esp, 0x10
mov eax, ebx
pop ebx
pop esi
pop edi
jmp fcn.0041a430
cmp edi, 1
je 0x41a7f2
mov dword [esp], 2
call dword [0x43210c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x44baf4
mov dword [esp + 4], str._once__p_is__ld_n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x41a7f2
ret
call sub.msvcrt.dll_abort
call sub.msvcrt.dll_abort
mov eax, dword [0x14]
ud2

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

Disassembly:
sub esp, 0x1c
call fcn.0041a7a0
mov eax, dword [0x432124]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41a9a8
add esp, 0x1c
ret
add esp, 0x1c
jmp fcn.0041a850
Function at 0x41ac80
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x41aca8
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x41ada0
add esp, 0x14
pop ebx
pop esi
ret 0xc
cmp eax, 1
je 0x41ad70
cmp eax, 3
jne 0x41ac99
mov eax, dword [0x432124]
cmp eax, 0xffffffff
je 0x41ac99
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x41ac99
test byte [eax + 0x20], 0x30
je 0x41add0
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x41aceb
call fcn.0041a9b0
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x41ad1d
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x41ad0f
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x18], 0
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call fcn.00419f60
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.0041dfc0
cmp eax, 1
je 0x41ae9e
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test eax, eax
je 0x41ae92
mov eax, dword [0x432124]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
jmp 0x41ac99
mov eax, dword [0x44bacc]
test eax, eax
je 0x41adbc
mov dword [esp + 4], 0x41a110
mov dword [esp], 1
call eax
mov dword [0x44bad0], eax
add esp, 0x14
pop ebx
pop esi
ret 0xc
mov eax, dword [0x44bad0]
test eax, eax
je 0x41ac99
mov edx, dword [0x44bac8]
test edx, edx
je 0x41adbc
mov dword [esp], eax
call edx
mov dword [0x44bad0], 0
add esp, 0x14
pop ebx
pop esi
ret 0xc
mov edx, dword [ebx + 0x68]
mov eax, dword [eax + 0x18]
test edx, edx
jne 0x41ae44
test eax, eax
je 0x41adea
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebx + 0xb4]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x68], 1
test eax, eax
je 0x41ae07
call fcn.0041a9b0
test byte [ebx + 0x24], 4
je 0x41ae82
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x41ad1d
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebx + 0x1c]
sub esp, 4
mov dword [ebx + 0x14], 0
mov dword [esp], eax
call fcn.00419f60
lea eax, [ebx + 0x38]
jmp 0x41ad2b
test eax, eax
je 0x41ae82
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebx + 0x1c]
sub esp, 4
mov dword [ebx + 0x18], 0
mov dword [esp], eax
call fcn.00419f60
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.0041dfc0
cmp eax, 1
je 0x41ae9e
mov dword [ebx + 0x38], 0xffffffff
jmp 0x41ac99
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call fcn.00419f60
lea eax, [ebx + 0x38]
jmp 0x41ae69
mov eax, ebx
call fcn.0041a5e0
jmp 0x41ad51
call fcn.0041a3b0
lea esi, cs:[esi]
lea esi, cs:[esi]