joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a050
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push esi
push 1
lea ecx, [esp + 0xc]
push eax
push ecx
call fcn.0040ca40
mov eax, dword [eax]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [esp + 8]
mov esi, eax
call fcn.0041fcef
cmp esi, 0xffffffff
jne 0x40a082
xor eax, eax
pop esi
ret
mov edx, esi
pop esi
and dl, 0x10
neg dl
sbb edx, edx
and edx, 0xfffffffe
inc edx
mov eax, edx
ret

Function at 0x40a0a0
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x426ad0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [0x432de8]
push ebx
mov dword [esp + 8], eax
mov dword [esp + 0x24], 0
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 4]
push eax
mov byte [esp + 0x28], 4
mov dword [esp + 8], 0x428550
call fcn.0040ca60
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 5
push ecx
lea ecx, [esp + 8]
call fcn.00409f10
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
lea ecx, [esp + 0x2c]
sete bl
call fcn.0041fcef
lea ecx, [esp + 4]
mov dword [esp + 0x24], 0xffffffff
call fcn.0040c930
mov ecx, dword [esp + 0x1c]
mov al, bl
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret

Function at 0x40a150
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x426b18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [0x432de8]
push ebx
mov dword [esp + 8], eax
mov dword [esp + 0x24], 0
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 4]
push eax
mov byte [esp + 0x28], 4
mov dword [esp + 8], 0x428550
call fcn.0040ca60
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 5
push ecx
lea ecx, [esp + 8]
call fcn.00409f10
push 0x432384
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 6
call fcn.0041f2ec
mov dl, byte [0x428658]
lea ecx, [esp + 0x2c]
push edx
call fcn.0041fff1
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetVolumeLabelA]
test eax, eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x24], 5
setne bl
call fcn.0041fcef
lea ecx, [esp + 4]
mov dword [esp + 0x24], 0xffffffff
call fcn.0040c930
mov ecx, dword [esp + 0x1c]
mov al, bl
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret
Function at 0x40a340
Capabilities:
Copy file
Delete file
Move file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x426b6a
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
mov bl, byte [esp + 0x48]
push ebp
mov ebp, dword [esp + 0x44]
test bl, 1
push esi
je 0x40a3a0
lea eax, [esp + 0x50]
push eax
push ebp
call fcn.00409f70
add esp, 8
test al, al
je 0x40a3a0
call fcn.0040a670
mov ecx, dword [esp + 0x50]
push eax
push ecx
call fcn.0040a6f0
add esp, 8
test al, 1
je 0x40a3a0
call fcn.0040a650
push eax
push ebp
call fcn.00409f30
add esp, 8
test bl, 2
jne 0x40a3e6
xor ebx, ebx
lea edx, [esp + 0x50]
push ebx
push ebp
push edx
call fcn.0040ca40
mov eax, dword [eax]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x50]
mov esi, eax
call fcn.0041fcef
cmp esi, ebx
je 0x40a4a2
pop esi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret
push edi
push ebp
lea ecx, [esp + 0x58]
call fcn.0041fd5d
mov eax, dword [esp + 0x54]
push 1
xor ebx, ebx
mov esi, dword [eax - 8]
mov dword [esp + 0x48], ebx
lea ecx, [esi + 2]
push ecx
lea ecx, [esp + 0x18]
call fcn.00405b90
mov edi, dword [esp + 0x14]
mov ecx, esi
mov esi, dword [esp + 0x54]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x24], 3
mov word [esp + 0x30], 0x454
mov dword [esp + 0x28], eax
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
test eax, eax
pop edi
jne 0x40a484
cmp dword [esp + 0x2a], ebx
jne 0x40a484
lea ecx, [esp + 0xc]
mov byte [esp + 0x40], bl
call fcn.00405bc0
lea ecx, [esp + 0x50]
mov dword [esp + 0x40], 0xffffffff
call fcn.0041fcef
pop esi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret
lea ecx, [esp + 0xc]
mov byte [esp + 0x40], bl
call fcn.00405bc0
lea ecx, [esp + 0x50]
mov dword [esp + 0x40], 0xffffffff
call fcn.0041fcef
cmp byte [esp + 0x4c], bl
je 0x40a4ee
push 0x14
call fcn.0041fa30
add esp, 4
mov dword [esp + 0x50], eax
cmp eax, ebx
mov dword [esp + 0x40], 2
je 0x40a4d1
push ebp
push 0xd9
mov ecx, eax
call fcn.0040aa20
jmp 0x40a4d3
xor eax, eax
lea edx, [esp + 0x4c]
push 0x42e080
push edx
mov dword [esp + 0x48], 0xffffffff
mov dword [esp + 0x54], eax
call fcn.0041540a
mov ecx, dword [esp + 0x38]
pop esi
pop ebp
xor al, al
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret
Function at 0x40a510
Capabilities:
Access peb ldr_data
Get kernel32 base address
Move file

Disassembly:
push 0xffffffffffffffff
push 0x426b92
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push ebx
push esi
push edi
push 0
lea ecx, [esp + 0x10]
push eax
push ecx
call fcn.0040ca40
mov edi, dword [esp + 0x2c]
mov esi, dword [eax]
push 0
lea edx, [esp + 0x34]
push edi
push edx
mov dword [esp + 0x30], 0
call fcn.0040ca40
mov eax, dword [eax]
add esp, 0x18
push esi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
lea ecx, [esp + 0x24]
sete bl
call fcn.0041fcef
or esi, 0xffffffff
lea ecx, [esp + 0xc]
mov dword [esp + 0x18], esi
call fcn.0041fcef
test bl, bl
je 0x40a5e2
mov al, byte [esp + 0x28]
test al, al
je 0x40a5ce
push 0x14
call fcn.0041fa30
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
mov dword [esp + 0x18], 1
je 0x40a5b5
push edi
push 0xda
mov ecx, eax
call fcn.0040aa20
jmp 0x40a5b7
xor eax, eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push 0x42e080
push eax
mov dword [esp + 0x20], esi
call fcn.0041540a
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret
mov ecx, dword [esp + 0x10]
pop edi
pop esi
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x40a610
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
push ebx
push 1
lea ecx, [esp + 0xc]
push eax
push ecx
call fcn.0040ca40
mov eax, dword [eax]
add esp, 0xc
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
lea ecx, [esp + 8]
setne bl
call fcn.0041fcef
mov al, bl
pop ebx
ret
Function at 0x40b470
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x426d0c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
mov eax, 0x428690
mov dword [esp + 0xc], esi
mov dword [esi + 0x30], edi
mov dword [esi + 0x3c], edi
mov dword [esi + 0x38], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x2c], eax
mov dword [esp + 0x18], edi
mov dword [esi + 0x44], edi
mov dword [esi + 0x50], edi
mov dword [esi + 0x4c], edi
mov dword [esi + 0x48], edi
mov dword [esi + 0x40], eax
lea ebx, [esi + 0x68]
mov byte [esp + 0x18], 1
mov ecx, ebx
mov dword [esi + 0x64], edi
call fcn.00405b50
mov dword [ebx + 0xc], edi
lea ebx, [esi + 0x78]
mov byte [esp + 0x18], 2
mov ecx, ebx
call fcn.00405b50
mov dword [ebx + 0xc], edi
mov eax, dword [esp + 0x20]
mov ecx, esi
push eax
mov byte [esp + 0x1c], 3
mov dword [esi], 0x42868c
call fcn.0040b680
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 4

Function at 0x40ccb0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x427038
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
mov eax, dword [esp + 0x2c]
push ebx
push esi
push eax
lea ecx, [esp + 0x38]
call fcn.0041fd5d
mov cl, byte [0x428658]
mov dword [esp + 0x2c], 0
push ecx
lea ecx, [esp + 0x38]
call fcn.0041f33f
mov eax, dword [0x432de8]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0xc]
push edx
mov byte [esp + 0x30], 5
mov dword [esp + 0x10], 0x428550
call fcn.0040ca60
mov esi, dword [esp + 0x34]
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 6
call fcn.00403ce0
mov eax, dword [eax]
push esi
push eax
mov byte [esp + 0x34], 7
call fcn.00415990
add esp, 8
or esi, 0xffffffff
test eax, eax
je 0x40cd6d
mov ecx, dword [esp + 0x34]
push ecx
call fcn.0040a050
add esp, 4
cmp eax, esi
sete al
test al, al
jne 0x40cd6d
xor bl, bl
jmp 0x40cd6f
mov bl, 1
lea ecx, [esp + 8]
mov byte [esp + 0x2c], 6
call fcn.0041fcef
test bl, bl
jne 0x40cdf5
lea edx, [esp + 8]
lea ecx, [esp + 0xc]
push edx
call fcn.00403ce0
mov eax, dword [eax]
mov byte [esp + 0x2c], 8
push eax
call fcn.0040ccb0
add esp, 4
lea ecx, [esp + 8]
test al, al
sete bl
mov byte [esp + 0x2c], 6
call fcn.0041fcef
test bl, bl
jne 0x40cdc7
mov eax, dword [esp + 0x34]
push eax
call fcn.0040a610
add esp, 4
test al, al
jne 0x40cdf5
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 0
call fcn.0040c930
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], esi
call fcn.0041fcef
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 0
call fcn.0040c930
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], esi
call fcn.0041fcef
mov ecx, dword [esp + 0x24]
pop esi
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x28
ret
Function at 0x4afce4
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffb4
mov dword [esp], eax
lea esi, [esp + 0x30]
lea eax, [esp + 0xc]
push eax
call sub.kernel32.dll_GetSystemInfo
mov edi, dword [esp]
push 0x1c
push esi
push edi
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4afdaf
jmp 0x4afda3
cmp dword [esi + 0x10], 0x1000
jne 0x4afd8f
test byte [esi + 0x15], 1
jne 0x4afd8f
mov byte [esp + 4], 0
mov ebp, dword [esi + 0x14]
cmp ebp, 1
je 0x4afd40
cmp ebp, 2
je 0x4afd40
cmp ebp, 0x10
je 0x4afd40
cmp ebp, 0x20
jne 0x4afd5c
lea eax, [esp + 8]
push eax
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4afd5c
mov byte [esp + 4], 1
xor ebx, ebx
jmp 0x4afd6d
mov eax, dword [esi]
add eax, ebx
call fcn.004afcdc
add ebx, dword [esp + 0x10]
cmp ebx, dword [esi + 0xc]
jb 0x4afd60
cmp byte [esp + 4], 0
je 0x4afd8f
lea eax, [esp + 8]
push eax
mov eax, dword [esp + 0xc]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov edi, eax
push 0x1c
push esi
push edi
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4afdaf
mov eax, dword [esi + 4]
cmp eax, dword [esp]
je 0x4afd15
add esp, 0x4c
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x433005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
call 0x43300c
nop
nop
nop
pop eax
nop
nop
nop
add eax, 0x40a063
nop
sub eax, 0x40a009
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x433030
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
jne 0x43301e
nop
nop
nop
popal
nop
nop
jmp 0x431219

Function at 0x431000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
nop
nop
push 4
nop
nop
nop
nop
nop
pop edi
nop
nop
cmp eax, 0
nop
je 0x431072
nop
nop
nop
nop
nop
mov ebx, 0x40915c
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x27f0d2a
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x431060
nop
mov eax, section..data
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
je 0x4310d2
nop
nop
mov ebx, 0x42f3f8
mov ecx, ebx
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
pop eax
nop
nop
nop
nop
nop
mov esi, 0x6d7a3ae3
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
nop
add eax, edi
nop
loop 0x4310c0
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x401219
Function at 0x4056a1
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, ebx
and eax, 4
push edi
mov dword [ebp - 4], eax
call fcn.0040596c
test bl, 8
mov dword [ebp - 8], eax
je 0x4056e0
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x429248], eax
jmp 0x40585d
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x4056fa
test eax, eax
je 0x40580b
test bl, 2
je 0x40580b
mov esi, 0x4246b8
push edi
push esi
call fcn.00405e19
cmp dword [ebp + 8], 0
je 0x405719
push 0x40951c
push esi
call sub.KERNEL32.dll_lstrcatW
jmp 0x40571f
push edi
call fcn.004058b0
cmp word [edi], 0
jne 0x40572f
cmp word [0x4246b8], 0x5c
jne 0x40573a
push 0x409014
push edi
call sub.KERNEL32.dll_lstrcatW
push edi
call sub.KERNEL32.dll_lstrlenW
lea ebx, [edi + eax*2]
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405800
cmp word [ebp - 0x22c], 0x2e
jne 0x405784
cmp word [ebp - 0x22a], 0
je 0x4057e3
cmp word [ebp - 0x22a], 0x2e
jne 0x405784
cmp word [ebp - 0x228], 0
je 0x4057e3
lea eax, [ebp - 0x22c]
push eax
push ebx
call fcn.00405e19
test byte [ebp - 0x258], 0x10
je 0x4057af
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4057e3
push dword [ebp + 0xc]
push edi
call fcn.004056a1
jmp 0x4057e3
push dword [ebp - 4]
push edi
call fcn.00405659
test eax, eax
jne 0x4057db
cmp dword [ebp - 4], eax
je 0x4057d3
push edi
push 0xfffffffffffffff1
call fcn.004050c1
push 0
push edi
call fcn.00405cb3
jmp 0x4057e3
inc dword [0x429248]
jmp 0x4057e3
push edi
push 0xfffffffffffffff2
call fcn.004050c1
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40575c
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x40580b
and word [ebx - 2], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x40585d
cmp dword [ebp - 8], esi
jne 0x40581f
inc dword [0x429248]
jmp 0x40585d
push edi
call fcn.0040615c
test eax, eax
je 0x40585d
push edi
call fcn.00405864
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.00405659
test eax, eax
jne 0x405855
cmp dword [ebp - 4], esi
je 0x405817
push edi
push 0xfffffffffffffff1
call fcn.004050c1
push esi
push edi
call fcn.00405cb3
jmp 0x40585d
push edi
push 0xffffffffffffffe5
call fcn.004050c1
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x404370
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0xc
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x4f9024], eax
je 0x404387
add esp, 0xc
ret
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x404880
Capabilities:
Print debug messages

Disassembly:
test eax, eax
je 0x4048b0
push edi
push esi
push ebx
mov ebx, eax
add esp, 0xffffff80
mov dword [esp], eax
call fcn.00404230
cmp eax, 1
je 0x4048b2
mov dword [ebx], 0xffffffff
sub esp, 0xffffff80
pop ebx
pop esi
pop edi
ret
repz ret
lea ebx, [esp + 0x15]
mov esi, str.Error_cleaning_up_spin_keys_for_thread
mov ecx, 0xa
xor eax, eax
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x3d]
mov ecx, 0x43
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea edx, [esp + 0x3c]
mov dword [esp + 8], 0xa
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.msvcrt.dll__ultoa]
cmp byte [esp + 0x3c], 0
mov eax, 0x27
jne 0x404905
jmp 0x404922
cmp eax, 0x6a
je 0x404913
add eax, 1
cmp byte [ebx + eax], 0
jne 0x404900
cmp eax, 0x6a
jne 0x404922
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push eax
call sub.msvcrt.dll_abort
mov byte [esp + eax + 0x15], 0xa
mov byte [esp + eax + 0x16], 0
jmp 0x404913
Function at 0x4049c0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
cmp dword [0x551078], 1
je 0x4049d5
call fcn.00404930
mov eax, dword [0x4f9024]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
mov ebx, eax
je 0x404a00
add esp, 0x2c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.004047d0
mov esi, eax
mov eax, dword [entry3]
test eax, eax
je 0x4049ec
test esi, esi
je 0x4049ec
mov dword [esi + 0x24], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 0x3c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi + 0x18], eax
lea eax, [esi + 0x38]
sub esp, 0x10
mov dword [esi + 0x1c], 0xffffffff
call fcn.00404880
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [esi + 0x64], 0
mov dword [esi + 0x14], 0
call ebx
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, eax
call ebx
lea edx, [esi + 0x14]
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
sub esp, 0x1c
test eax, eax
je 0x404b02
mov eax, dword [esi + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [esi + 0x6c], eax
movzx eax, byte [esi + 0x20]
sub esp, 4
mov dword [esi + 0x68], 0
and eax, 0xffffffcf
or eax, 0x10
mov byte [esi + 0x20], al
mov eax, dword [0x4f9024]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
je 0x404b02
add esp, 0x2c
mov ebx, esi
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll_abort
mov esi, esi
lea edi, [edi]
Function at 0x404c40
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x404c70
mov edi, dword [esp + 0x28]
test edi, edi
je 0x404d11
add esp, 0x10
mov eax, 1
pop ebx
pop esi
pop edi
ret 0xc
cmp eax, 1
je 0x404d40
cmp eax, 3
jne 0x404c5a
mov eax, dword [0x4f9024]
cmp eax, 0xffffffff
je 0x404c5a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
mov ebx, eax
je 0x404c5a
test byte [eax + 0x20], 0x30
je 0x404d62
mov eax, dword [eax + 0xb4]
test eax, eax
jne 0x404e64
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x404ce4
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 0x404cd6
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x14], 0
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call fcn.00403440
lea eax, [ebx + 0x38]
call fcn.00404880
mov esi, dword [ebx + 0xb0]
test esi, esi
jne 0x404de9
mov eax, ebx
call fcn.00404570
jmp 0x404de9
mov eax, dword [0x551054]
test eax, eax
je 0x404c5a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov dword [0x551054], 0
sub esp, 4
jmp 0x404c5a
mov dword [esp + 4], 0x404290
mov dword [esp], 1
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
sub esp, 8
mov dword [0x551054], eax
jmp 0x404c5a
mov edx, dword [ebx + 0x68]
mov eax, dword [eax + 0x18]
test edx, edx
jne 0x404e10
test eax, eax
je 0x404d80
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
jne 0x404e40
test byte [ebx + 0x24], 4
lea edi, [ebx + 0x1c]
lea esi, [ebx + 0x38]
je 0x404e50
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x404dc5
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov dword [ebx + 0x14], 0
mov dword [esp], edi
call fcn.00403440
mov eax, esi
call fcn.00404880
mov ecx, dword [ebx + 0xb0]
test ecx, ecx
je 0x404d05
mov eax, dword [0x4f9024]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
jmp 0x404c5a
test eax, eax
je 0x404e20
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
lea eax, [ebx + 0x1c]
mov dword [ebx + 0x18], 0
mov dword [esp], eax
call fcn.00403440
lea eax, [ebx + 0x38]
call fcn.00404880
jmp 0x404c5a
call fcn.00404b50
jmp 0x404d9c
mov dword [esp], edi
call fcn.00403440
mov eax, esi
call fcn.00404880
jmp 0x404c5a
call fcn.00404b50
jmp 0x404cb2
Function at 0x4057e0
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.004049c0
mov ebx, eax
mov dword [eax + 4], esi
mov eax, dword [eax + 0xb4]
test eax, eax
jne 0x405863
test byte [ebx + 0x20], 0x30
jne 0x405817
add ebx, 0x70
mov dword [esp + 4], 1
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_longjmp]
mov eax, dword [0x4f9024]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
push edx
mov ebx, eax
je 0x40585a
cmp dword [ebx + 0x14], 0
mov eax, dword [eax + 0x18]
je 0x4058a7
test eax, eax
mov esi, dword [ebx + 4]
mov dword [ebx + 0x68], 1
je 0x40584d
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
test byte [ebx + 0x24], 4
mov dword [ebx + 0x18], 0
jne 0x40586a
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
call fcn.00404b50
jmp 0x4057fd
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
cmp dword [ebx + 0xb0], 0
mov dword [ebx + 0x14], 0
je 0x4058ce
mov eax, dword [0x4f9024]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push eax
push eax
jmp 0x40585a
test eax, eax
mov dword [ebx], 0xdeadbeef
je 0x4058bb
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
cmp dword [ebx + 0xb0], 0
mov dword [ebx + 0x18], 0
mov esi, dword [ebx + 4]
jne 0x40588d
mov eax, ebx
call fcn.00404570
jmp 0x40588d