joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000f2d0
Capabilities:
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
cmp dword [eax], 0x52727464
je 0x1000f2e5
xor eax, eax
jmp 0x1000f35a
mov ecx, dword [ebp + 8]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
add edx, 0x10000
mov dword [ebp - 0x10], edx
mov eax, dword [ebp + 8]
add eax, 0x48
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0
jmp 0x1000f312
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0x38d
jae 0x1000f355
mov edx, dword [ebp - 4]
imul edx, edx, 0x48
mov eax, dword [ebp - 8]
cmp dword [eax + edx + 0x40], 0
je 0x1000f353
mov ecx, dword [ebp - 4]
imul ecx, ecx, 0x48
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx + 0x40]
cmp eax, dword [ebp - 0xc]
jb 0x1000f34f
mov ecx, dword [ebp - 4]
imul ecx, ecx, 0x48
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx + 0x40]
cmp eax, dword [ebp - 0x10]
jb 0x1000f353
xor eax, eax
jmp 0x1000f35a
jmp 0x1000f309
mov eax, 1
mov esp, ebp
pop ebp
ret

Function at 0x1000f520
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x1013c1c8]
mov dword [ebp - 4], eax
jmp 0x1000f539
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
je 0x1000f556
lea eax, [ebp - 8]
push eax
push 0x40
push 0x10000
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x1000f530
mov esp, ebp
pop ebp
ret
Function at 0x1000f9a0
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1013c1d8], eax
je 0x1000f9be
mov eax, 0x10dd
jmp 0x1000fa9f
mov eax, dword [0x1013c1e8]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x1000fa3c
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x10]
movzx eax, byte [edx + 0x36]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 4]
cmp dword [eax + 4], 0
jne 0x1000fa1a
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x10], 0
je 0x1000fa1a
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x10]
push eax
call fcn.1000f040
add esp, 4
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
push edx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
jmp 0x1000f9c6
mov dword [0x1013c1e8], 0
call fcn.1000f360
mov ecx, dword [0x1013c1e4]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x1000fa89
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push ecx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [ebp - 0x18]
mov dword [ebp - 8], edx
jmp 0x1000fa54
mov dword [0x1013c1e4], 0
mov dword [0x1013c1d8], 0
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x1000ffa0
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [0x1013c1dc], 0
je 0x1000ffb9
mov eax, dword [0x1013c1dc]
jmp 0x10010059
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
cmp dword [ebp + 8], eax
jne 0x1000ffcb
xor eax, eax
jmp 0x10010059
push 8
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x10010021
mov dword [ebp - 8], 8
cmp dword [ebp - 4], 0
je 0x1001000a
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
push edx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [ebp - 4], 0
mov eax, dword [ebp - 8]
mov dword [0x1013c1dc], eax
mov dword [0x1013c1e0], 0
mov eax, dword [ebp - 8]
jmp 0x10010059
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x1001003b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x1000ffeb
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [0x1013c1e4]
mov dword [ecx], edx
mov eax, dword [ebp - 4]
mov dword [0x1013c1e4], eax
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x1001092b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x1013ba6c]
jne 0x10010935
repz ret
jmp fcn.10010f6e
Function at 0x10001060
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor esi, esi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10001070
sub eax, edx
mov edi, eax
xor eax, eax
lea ecx, [ecx]
mov byte [eax + 0x10010a68], al
inc eax
cmp eax, 0x100
jl 0x10001080
xor ecx, ecx
mov eax, ecx
cdq
idiv edi
mov eax, dword [ebp + 8]
movzx ebx, byte [ecx + 0x10010a68]
movzx edx, byte [edx + eax]
add edx, ebx
add esi, edx
and esi, 0x800000ff
jns 0x100010b7
dec esi
or esi, 0xffffff00
inc esi
mov al, byte [esi + 0x10010a68]
mov byte [ecx + 0x10010a68], al
inc ecx
mov byte [esi + 0x10010a68], bl
cmp ecx, 0x100
jl 0x10001090
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x10004360
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
dec eax
jne 0x10004386
push eax
push eax
push eax
push 0x10002100
push eax
push eax
call fcn.10004649
add esp, 0x18
test eax, eax
je 0x10004386
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop ebp
ret 0xc

Function at 0x1000438f
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [section..data]
jne 0x10004399
repz ret
jmp fcn.10004966

Function at 0x1000a784
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.10005acf
and dword [ebp - 0x14], 0
cmp dword [0x10010a48], 0
mov dword [ebp - 0x18], eax
jne 0x1000a837
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x1000a8df
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x1000a8df
mov esi, dword [0x1000fdb4]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x10010a48], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x10010a4c], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x10010a50], eax
call edi
push eax
call esi
mov dword [0x10010a58], eax
test eax, eax
je 0x1000a837
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x10010a54], eax
mov eax, dword [0x10010a54]
mov ecx, dword [ebp - 0x18]
mov esi, dword [0x1000fdb0]
cmp eax, ecx
je 0x1000a890
cmp dword [0x10010a58], ecx
je 0x1000a890
push eax
call esi
push dword [0x10010a58]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x1000a890
test ebx, ebx
je 0x1000a890
call edi
test eax, eax
je 0x1000a887
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x1000a887
test byte [ebp - 8], 1
jne 0x1000a890
or dword [ebp + 0x10], 0x200000
jmp 0x1000a8c3
mov eax, dword [0x10010a4c]
cmp eax, dword [ebp - 0x18]
je 0x1000a8c3
push eax
call esi
test eax, eax
je 0x1000a8c3
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x1000a8c3
mov eax, dword [0x10010a50]
cmp eax, dword [ebp - 0x18]
je 0x1000a8c3
push eax
call esi
test eax, eax
je 0x1000a8c3
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x10010a48]
call esi
test eax, eax
je 0x1000a8df
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x1000a8e1
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000438f
leave
ret
Function at 0x4013ca
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [0x4d5650], 1
mov dword [0x4d5654], 1
mov dword [0x4d5658], 1
mov dword [0x4d5644], 1
mov dword [ebp - 4], 0x400000
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x401415
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x401438
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
movzx eax, ax
cmp eax, 0x10b
je 0x40145a
cmp eax, 0x20b
je 0x40147f
jmp 0x4014aa
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5c]
cmp eax, 0xe
ja 0x40146c
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x4014af
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x6c]
cmp eax, 0xe
ja 0x401497
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x4014af
mov eax, 0
leave
ret
Function at 0x402610
Capabilities:
Get thread local storage value
Read file on windows

Disassembly:
push ebp
push edi
mov edi, ecx
mov ecx, 0xfa0
push esi
push ebx
xor ebx, ebx
sub esp, 0x3c
call fcn.004084d0
mov esi, eax
add eax, 8
mov dword [esp + 0x2c], eax
test esi, esi
je 0x4026fb
lea esi, [esi]
lea esi, [esi]
mov eax, dword [esi]
test eax, eax
jne 0x40265a
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0
call fcn.0040a570
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0xfa0
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov ebp, eax
cmp eax, 0xfa0
je 0x402740
mov dword [esp], edi
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x4027c6
test ebp, ebp
js 0x402790
mov ecx, esi
mov edx, ebp
call fcn.00408790
mov esi, eax
test eax, eax
je 0x402778
mov edx, dword [eax]
mov ecx, ebx
call fcn.00408ef0
lea ecx, [esi + 8]
mov ebx, eax
mov eax, dword [eax]
lea edx, [ebx + eax + 8]
mov eax, dword [esi]
mov dword [esp + 4], ecx
mov dword [esp], edx
add eax, 1
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esi]
add dword [ebx], eax
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, ebx
xor edx, edx
call fcn.00408ef0
mov ebx, eax
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0
call fcn.0040a570
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0xfa0
mov dword [esp + 4], 1
mov dword [esp], 8
call sub.msvcrt.dll_fread
mov ebp, eax
cmp eax, 0xfa0
jne 0x402687
jmp 0x4026f0
mov edx, dword [esi]
mov ecx, ebx
call fcn.00408ef0
mov ebx, eax
mov eax, dword [eax]
lea edx, [ebx + eax + 8]
mov eax, dword [esi]
mov dword [esp], edx
add eax, 1
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esi]
add dword [ebx], eax
jmp 0x402640
add esp, 0x3c
mov ecx, ebx
xor edx, edx
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00408ef0
mov eax, ebp
mov dword [esp + 0x10], 0x7fffffff
sar eax, 0x1f
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp], ebp
mov dword [esp + 4], eax
call fcn.0040b690
jmp 0x40269f
mov ecx, edi
call fcn.00402400
lea esi, [esi]
Function at 0x402f10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, ecx
push edi
push esi
mov esi, edx
push ebx
xor ebx, ebx
sub esp, 0x2c
mov dword [esp], 0x4900e0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea edx, [esi - 1]
xor eax, eax
sub esp, 4
mov dword [esp + 0x1c], edx
test esi, esi
jle 0x402f90
lea esi, [esi]
mov dword [esp], 1
mov edi, dword [ebp + eax*4]
add ebx, 1
call dword [0x4720c4]
mov dword [esp], 0
mov ecx, eax
mov edx, edi
call fcn.00402d70
sub esp, 4
cmp ebx, esi
jge 0x402f90
mov eax, ebx
jb 0x402f40
mov eax, dword [esp + 0x1c]
mov dword [esp], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 4], eax
call fcn.0040a570
mov eax, dword [esp + 0x18]
jmp 0x402f40
mov dword [esp], 1
call dword [0x4720c4]
mov dword [esp + 8], 1
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x473105
call sub.msvcrt.dll_fwrite
mov dword [esp], 1
call dword [0x4720c4]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4900e0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x403080
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, eax
xor eax, eax
push ebx
mov ebx, edx
sub esp, 0x14
test edx, edx
je 0x403097
mov dword [esp], edx
call sub.msvcrt.dll_strlen
mov dword [esp + 0xc], esi
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
call sub.msvcrt.dll_fwrite
mov dword [esp], esi
call sub.msvcrt.dll_fflush
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x4031a0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
call dword [0x4720c4]
mov dword [esp + 8], 0x4b
mov dword [esp + 0xc], eax
mov ebx, eax
mov dword [esp + 4], 1
mov dword [esp], str._GC__cannot_register_thread_local_variable__too_many_thread_local_variables
call sub.msvcrt.dll_fwrite
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 1
call sub.msvcrt.dll_exit
lea esi, [esi]
nop

Function at 0x4031f0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
mov ebx, ecx
sub esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret
Function at 0x404fd0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
mov edi, edx
push esi
push ebx
mov ebx, eax
sub esp, 0x2c
mov edx, dword [eax + 4]
mov eax, dword [eax]
cmp edx, eax
jle 0x404ff8
mov esi, dword [ebx + 8]
mov dword [esi + eax*4], edi
add dword [ebx], 1
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [edx + edx*2]
mov esi, dword [0x49c308]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
shr edx, 0x1f
add edx, eax
sar edx, 1
mov dword [ebx + 4], edx
mov dword [esp + 0x1c], edx
call ebp
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
call ecx
sub esp, 4
mov esi, eax
mov eax, dword [esp + 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [esp + 0x18], eax
call eax
lea ecx, [esi + 0x54]
sub esp, 4
mov edx, dword [esp + 0x1c]
lea edx, [edx*4 + 8]
call fcn.00404070
mov dword [eax + 4], 1
mov edx, dword [ebx]
lea esi, [eax + 8]
mov dword [esp], esi
lea eax, [edx*4]
mov edx, dword [ebx + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 8]
mov ecx, dword [0x49c308]
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], ecx
call ebp
mov ecx, dword [esp + 0x1c]
mov ebp, eax
mov dword [esp], ecx
mov ecx, dword [esp + 0x14]
call ecx
sub esp, 4
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x18]
mov dword [esp], ebp
call ecx
sub esp, 4
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
sub edx, 8
add ecx, 0x54
call fcn.00404df0
mov eax, dword [ebx]
mov dword [ebx + 8], esi
mov dword [esi + eax*4], edi
add dword [ebx], 1
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x405190
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov esi, dword [esp + 0x44]
mov ebx, dword [esp + 0x40]
mov eax, dword [esi]
test al, 4
je 0x4051b0
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
or eax, 4
mov dword [esi], eax
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
cmp edx, eax
jle 0x4051d0
mov edi, dword [ebx + 8]
mov dword [edi + eax*4], esi
add dword [ebx], 1
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [edx + edx*2]
mov edi, dword [0x49c308]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
shr edx, 0x1f
add edx, eax
sar edx, 1
mov dword [ebx + 4], edx
mov dword [esp + 0x1c], edx
call ebp
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
call ecx
sub esp, 4
mov edi, eax
mov eax, dword [esp + 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [esp + 0x18], eax
call eax
lea ecx, [edi + 0x54]
sub esp, 4
mov edx, dword [esp + 0x1c]
lea edx, [edx*4 + 8]
call fcn.00404070
mov dword [eax + 4], 1
mov edx, dword [ebx]
lea edi, [eax + 8]
lea eax, [edx*4]
mov edx, dword [ebx + 8]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 8]
mov ecx, dword [0x49c308]
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], ecx
call ebp
mov ecx, dword [esp + 0x1c]
mov ebp, eax
mov dword [esp], ecx
mov ecx, dword [esp + 0x14]
call ecx
sub esp, 4
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x18]
mov dword [esp], ebp
call ecx
sub esp, 4
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
sub edx, 8
add ecx, 0x54
call fcn.00404df0
mov dword [ebx + 8], edi
mov eax, dword [ebx]
jmp 0x4051c1

Function at 0x4052b0
Capabilities:
Get thread local storage value

Disassembly:
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x10
mov ebx, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], edi
add ebx, 0x2c
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00405190
add esp, 0x10
pop ebx
pop esi
pop edi
ret
Function at 0x405340
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
mov esi, ecx
push ebx
sub esp, 0x2c
mov edi, dword [ecx + 4]
mov ebx, dword [0x49c308]
lea eax, [edi + edi + 1]
mov dword [esp + 0x10], edi
lea edi, [edi*8 + 8]
mov dword [ecx + 4], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x1c], eax
call eax
mov dword [esp], ebx
mov ebp, eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x18], eax
call eax
mov ebx, eax
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov dword [esp], ebp
mov dword [esp + 0x14], eax
call eax
lea edx, [edi + 8]
lea ecx, [ebx + 0x54]
sub esp, 4
call fcn.00404070
lea ebx, [eax + 8]
mov dword [eax + 4], 1
mov dword [esp + 8], edi
xor edi, edi
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x10]
mov edx, dword [esi + 0xc]
test eax, eax
jns 0x4053db
jmp 0x405414
lea eax, [edi + 1]
cmp dword [esp + 0x10], edi
je 0x405414
mov edi, eax
mov ebp, dword [edx + edi*4]
test ebp, ebp
je 0x4053d0
mov ecx, dword [esi + 4]
mov eax, dword [ebp + 4]
and eax, ecx
lea edx, [ebx + eax*4]
cmp dword [edx], 0
je 0x405406
lea esi, [esi]
lea eax, [eax + eax*4 + 1]
and eax, ecx
lea edx, [ebx + eax*4]
cmp dword [edx], 0
jne 0x4053f8
mov dword [edx], ebp
lea eax, [edi + 1]
mov edx, dword [esi + 0xc]
cmp dword [esp + 0x10], edi
jne 0x4053d9
mov edi, dword [0x49c308]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], edx
call eax
mov ebp, eax
mov dword [esp], edi
mov eax, dword [esp + 0x18]
call eax
sub esp, 4
mov edi, eax
mov dword [esp], ebp
mov eax, dword [esp + 0x14]
call eax
lea ecx, [edi + 0x54]
sub esp, 4
mov edx, dword [esp + 0x10]
sub edx, 8
call fcn.00404df0
mov dword [esi + 0xc], ebx
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x405460
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, ecx
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x2c
mov ebx, dword [ecx + 4]
mov edi, dword [ebp + 0xc]
mov ecx, ebx
and ecx, edx
lea eax, [ecx*4]
mov dword [esp + 0x10], eax
add eax, edi
mov edx, dword [eax]
mov dword [esp + 0x18], eax
test edx, edx
je 0x4054b0
mov eax, ecx
jmp 0x40549d
lea eax, [eax + eax*4 + 1]
and eax, ebx
mov edx, dword [edi + eax*4]
test edx, edx
je 0x4054b0
cmp dword [edx + 4], esi
jne 0x405490
add esp, 0x2c
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp]
lea eax, [ebx + 1]
mov dword [esp + 0x14], edx
lea edx, [eax + eax]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x14]
lea edx, [edx + edx*2]
cmp dword [esp + 0x1c], edx
jl 0x405598
sub eax, dword [esp + 0x14]
cmp eax, 3
jle 0x405598
mov eax, dword [esp + 0x14]
add eax, 1
mov dword [ebp], eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
test eax, eax
je 0x405510
lea esi, [esi]
nop
lea ecx, [ecx + ecx*4 + 1]
and ecx, ebx
mov edx, dword [edi + ecx*4]
lea eax, [ecx*4]
test edx, edx
jne 0x4054f8
mov dword [esp + 0x10], eax
mov ebx, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, 0x30
lea ecx, [ebx + 0x54]
sub esp, 4
call fcn.00404070
lea edx, [eax + 8]
lea edi, [eax + 0xc]
mov dword [eax + 8], 0
mov ebx, eax
and edi, 0xfffffffc
mov ecx, edx
mov dword [eax + 4], 1
xor eax, eax
sub ecx, edi
mov dword [edx + 0x24], 0
add ecx, 0x28
shr ecx, 2
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 8], eax
mov dword [edx + 4], esi
mov esi, dword [esp + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], edx
mov dword [eax + esi], edx
add esp, 0x2c
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, ebp
call fcn.00405340
mov ebx, dword [ebp + 4]
mov eax, dword [ebp]
mov ecx, esi
mov edi, dword [ebp + 0xc]
and ecx, ebx
mov dword [esp + 0x14], eax
lea eax, [ecx*4]
mov dword [esp + 0x10], eax
add eax, edi
mov dword [esp + 0x18], eax
jmp 0x4054df

Function at 0x4056e0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov ebx, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
add ebx, 0x20
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov dword [esp], ebx
call fcn.004056b0
add esp, 0x14
pop ebx
pop esi
ret