joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100806c0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
push esi
and esp, 0xfffffff0
sub esp, 0xa0
xorps xmm0, xmm0
mov esi, ecx
lea eax, [esp + 0xc]
mov dword [esp + 0xc], pe_nt_image_headers32
lea ecx, [esp + 0x10]
movaps xmmword [esp + 0x80], xmm0
movaps xmmword [esp + 0x70], xmm0
movaps xmmword [esp + 0x60], xmm0
movaps xmmword [esp + 0x50], xmm0
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x20], xmm0
movaps xmmword [esp + 0x10], xmm0
push eax
push ecx
push edx
call sub.WS2_32.dll_getsockname
cmp eax, 0xffffffff
je 0x10080765
movzx ecx, word [esp + 0x10]
mov eax, dword [esp + 0xc]
cmp ecx, 2
je 0x1008077d
cmp ecx, 0x17
jne 0x100807a1
cmp eax, 0x1b
jbe 0x100807b7
movzx eax, word [esp + 0x12]
movups xmm0, xmmword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
mov word [esi], 1
rol ax, 8
movups xmmword [esi + 4], xmm0
mov dword [esi + 0x14], ecx
mov dword [esi + 0x18], edx
mov word [esi + 0x1c], ax
lea esp, [ebp - 4]
pop esi
pop ebp
ret
call sub.WS2_32.dll_WSAGetLastError
mov byte [esi + 4], 0
mov byte [esi + 7], 0
mov word [esi + 5], 0
mov dword [esi + 8], eax
jmp 0x100807ac
cmp eax, 0xf
jbe 0x100807cd
movzx ecx, word [esp + 0x12]
mov eax, dword [esp + 0x14]
mov word [esi], 0
rol cx, 8
mov dword [esi + 2], eax
mov word [esi + 6], cx
lea esp, [ebp - 4]
pop esi
pop ebp
ret
mov byte [esi + 4], 2
mov dword [esi + 8], 0x100de8d0
mov word [esi], 2
lea esp, [ebp - 4]
pop esi
pop ebp
ret
push 0x100de8b0
push 0x43
push 0x100de86c
call fcn.100b0df0
add esp, 0xc
ud2
push 0x100de85c
push 0x42
push str.assertion_failed:_len_as_usize___mem::size_of::_c::sockaddr_in___library_std_src_sys_common_net.rs
call fcn.100b0df0
add esp, 0xc
ud2

Function at 0x10080f50
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x4b0
call fcn.10080f64
Function at 0x100853a0
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x68
mov eax, dword [ebp + 8]
mov edi, ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 7
mov dword [esp + 0x32], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x36], 0
mov byte [esp + 0x34], 1
lea esi, [esp + 0x18]
lea ecx, [esp + 0xc]
push esi
push eax
call fcn.1006ff00
add esp, 8
cmp byte [esp + 0xc], 4
jne 0x10085415
mov esi, dword [esp + 0x10]
jmp 0x10085426
movzx eax, byte [esp + 0xc]
mov esi, dword [esp + 0x10]
cmp al, 4
jne 0x100854d1
lea ebx, [esp + 0x18]
mov edx, esi
mov ecx, ebx
call fcn.10070140
mov eax, dword [esp + 0x18]
xor eax, 2
or eax, dword [esp + 0x1c]
jne 0x10085489
cmp byte [esp + 0x20], 3
jne 0x100854c6
mov eax, dword [esp + 0x24]
mov ebx, dword [eax + 4]
mov ecx, dword [eax]
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp + 4], ecx
push ecx
call eax
add esp, 4
mov eax, dword [ebx + 4]
test eax, eax
je 0x10085477
push dword [ebx + 8]
push eax
push dword [esp + 0xc]
call fcn.10004680
add esp, 0xc
push 4
push 0xc
push dword [esp + 0x10]
call fcn.10004680
add esp, 0xc
jmp 0x100854c6
cmp dword [esp + 0x54], 0
jne 0x100854c6
mov eax, dword [esp + 0x50]
test esi, esi
mov dword [esp + 8], eax
je 0x100854e3
mov dword [esp + 0x18], 0
call sub.KERNEL32.dll_GetCurrentProcess
push 2
push 0
push 0
push ebx
push eax
push esi
push eax
call sub.KERNEL32.dll_DuplicateHandle
test eax, eax
je 0x1008554b
mov eax, dword [esp + 0x18]
jmp 0x100854e5
mov dword [edi], 0
jmp 0x10085556
movzx ecx, al
mov edx, esi
call fcn.10035d10
mov dword [edi], 0
jmp 0x1008555c
xor eax, eax
push 0
push 0
push 0
push 2
push 0
mov dword [esp + 0x18], eax
push eax
call sub.KERNEL32.dll_CreateFileMappingA
test eax, eax
je 0x1008553a
mov ebx, eax
push dword [esp + 8]
push 0
push 0
push 4
push eax
call sub.KERNEL32.dll_MapViewOfFile
mov dword [esp + 0x14], eax
push ebx
call sub.KERNEL32.dll_CloseHandle
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x1008553a
mov eax, dword [esp + 4]
mov dword [edi + 4], eax
mov dword [edi + 8], ecx
mov ecx, dword [esp + 8]
mov dword [edi + 0xc], ecx
mov dword [edi], 1
jmp 0x10085556
mov dword [edi], 0
push dword [esp + 4]
call sub.KERNEL32.dll_CloseHandle
jmp 0x10085556
call sub.KERNEL32.dll_GetLastError
mov dword [edi], 0
push esi
call sub.KERNEL32.dll_CloseHandle
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x10087610
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov eax, dword [0x100d410c]
mov esi, ecx
test eax, eax
je 0x10087639
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x10087651
cmp dword [eax + 4], 0
je 0x10087651
add eax, 8
pop esi
pop edi
pop ebp
ret
push 0x100d410c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jae 0x1008762c
mov eax, dword [0x100d410c]
test eax, eax
je 0x100876e8
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
je 0x10087704
mov edi, eax
test eax, eax
jne 0x100876b0
mov eax, dword [0x100f5654]
movzx eax, byte [eax]
push 4
push 0x10
call fcn.10004670
add esp, 8
test eax, eax
je 0x10087719
mov dword [eax], 0x100d410c
mov dword [eax + 4], 0
mov edi, eax
mov eax, dword [0x100d410c]
test eax, eax
je 0x1008770a
dec eax
push edi
push eax
call sub.KERNEL32.dll_TlsSetValue
test esi, esi
je 0x100876d0
mov eax, dword [esi]
xor ecx, ecx
mov edx, 0
mov dword [esi], 0
cmp eax, 1
jne 0x100876d4
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
jmp 0x100876d4
xor ecx, ecx
xor edx, edx
lea eax, [edi + 8]
mov dword [edi + 4], 1
mov dword [edi + 8], ecx
mov byte [edi + 0xc], dl
pop esi
pop edi
pop ebp
ret
push 0x100d410c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
jne 0x1008766e
xor eax, eax
pop esi
pop edi
pop ebp
ret
push 0x100d410c
call fcn.1007e000
add esp, 4
jmp 0x100876a9
push 0x10
push 4
call fcn.100a32d0
add esp, 8
ud2
Function at 0x10087730
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 8
mov eax, dword [0x100d411c]
mov esi, ecx
test eax, eax
je 0x10087809
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x1008775f
cmp dword [eax + 4], 0
mov edi, eax
jne 0x10087804
mov eax, dword [0x100d411c]
test eax, eax
je 0x1008782a
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
je 0x10087846
mov edi, eax
test eax, eax
jne 0x100877c2
mov eax, dword [0x100f5654]
movzx eax, byte [eax]
push 4
push 0xc
call fcn.10004670
add esp, 8
test eax, eax
je 0x10087863
mov dword [eax], 0x100d411c
mov dword [eax + 4], 0
mov edi, eax
mov eax, dword [0x100d411c]
test eax, eax
je 0x10087851
dec eax
push edi
push eax
call sub.KERNEL32.dll_TlsSetValue
test esi, esi
je 0x100877d7
mov eax, dword [esi]
mov dword [esi], 0
test eax, eax
je 0x100877d9
mov eax, dword [esi + 4]
jmp 0x100877d9
xor eax, eax
mov edx, dword [edi + 4]
mov ecx, dword [edi + 8]
test edx, edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], ecx
mov dword [edi + 4], 1
mov dword [edi + 8], eax
je 0x10087804
test ecx, ecx
je 0x10087804
lock dec dword [ecx]
jne 0x10087804
lea ecx, [ebp - 0xc]
call fcn.1003ebd0
add edi, 8
jmp 0x10087848
push 0x100d411c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jae 0x10087753
jmp 0x1008775f
push 0x100d411c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
jne 0x1008777c
xor edi, edi
mov eax, edi
add esp, 8
pop esi
pop edi
pop ebp
ret
push 0x100d411c
call fcn.1007e000
add esp, 4
jmp 0x100877bb
push 0xc
push 4
call fcn.100a32d0
add esp, 8
ud2

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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov eax, dword [0x100d412c]
mov esi, ecx
test eax, eax
je 0x100878a9
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x100878c1
cmp byte [eax + 4], 0
je 0x100878c1
add eax, 5
pop esi
pop edi
pop ebp
ret
push 0x100d412c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jae 0x1008789c
mov eax, dword [0x100d412c]
test eax, eax
je 0x10087934
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
je 0x1008794c
mov edi, eax
test eax, eax
jne 0x10087911
mov eax, dword [0x100f5654]
movzx eax, byte [eax]
push 4
push 8
call fcn.10004670
add esp, 8
test eax, eax
je 0x10087961
mov dword [eax], 0x100d412c
mov byte [eax + 4], 0
mov edi, eax
mov eax, dword [0x100d412c]
test eax, eax
je 0x10087952
dec eax
push edi
push eax
call sub.KERNEL32.dll_TlsSetValue
xor ecx, ecx
test esi, esi
je 0x10087926
cmp byte [esi], 0
mov byte [esi], 0
movzx eax, byte [esi + 1]
cmove eax, ecx
mov ecx, eax
lea eax, [edi + 5]
mov byte [edi + 4], 1
mov byte [edi + 5], cl
pop esi
pop edi
pop ebp
ret
push 0x100d412c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
jne 0x100878d6
xor eax, eax
pop esi
pop edi
pop ebp
ret
push 0x100d412c
call fcn.1007e000
add esp, 4
jmp 0x1008790a
push 8
push 4
call fcn.100a32d0
add esp, 8
ud2
Function at 0x10087970
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
mov eax, dword [0x100d413c]
test eax, eax
je 0x10087995
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x100879ad
cmp byte [eax + 4], 0
je 0x100879ad
add eax, 5
pop esi
pop ebp
ret
push 0x100d413c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jae 0x10087989
mov eax, dword [0x100d413c]
test eax, eax
je 0x10087a22
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
je 0x10087a3a
mov esi, eax
test eax, eax
jne 0x100879fd
mov eax, dword [0x100f5654]
movzx eax, byte [eax]
push 4
push 8
call fcn.10004670
add esp, 8
test eax, eax
je 0x10087a4e
mov dword [eax], 0x100d413c
mov byte [eax + 4], 0
mov esi, eax
mov eax, dword [0x100d413c]
test eax, eax
je 0x10087a3f
dec eax
push esi
push eax
call sub.KERNEL32.dll_TlsSetValue
mov eax, dword [ebp + 8]
xor ecx, ecx
test eax, eax
je 0x10087a15
cmp byte [eax], 0
mov byte [eax], 0
movzx eax, byte [eax + 1]
cmove eax, ecx
mov ecx, eax
lea eax, [esi + 5]
mov byte [esi + 4], 1
mov byte [esi + 5], cl
pop esi
pop ebp
ret
push 0x100d413c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
jne 0x100879c2
xor eax, eax
pop esi
pop ebp
ret
push 0x100d413c
call fcn.1007e000
add esp, 4
jmp 0x100879f6
push 8
push 4
call fcn.100a32d0
add esp, 8
ud2

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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 8
mov eax, dword [0x100d415c]
mov esi, ecx
test eax, eax
je 0x10087c89
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x10087bdf
cmp dword [eax + 4], 0
mov edi, eax
jne 0x10087c84
mov eax, dword [0x100d415c]
test eax, eax
je 0x10087caa
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
je 0x10087cc6
mov edi, eax
test eax, eax
jne 0x10087c42
mov eax, dword [0x100f5654]
movzx eax, byte [eax]
push 4
push 0xc
call fcn.10004670
add esp, 8
test eax, eax
je 0x10087ce3
mov dword [eax], 0x100d415c
mov dword [eax + 4], 0
mov edi, eax
mov eax, dword [0x100d415c]
test eax, eax
je 0x10087cd1
dec eax
push edi
push eax
call sub.KERNEL32.dll_TlsSetValue
test esi, esi
je 0x10087c57
mov eax, dword [esi]
mov dword [esi], 0
test eax, eax
je 0x10087c59
mov eax, dword [esi + 4]
jmp 0x10087c59
xor eax, eax
mov edx, dword [edi + 4]
mov ecx, dword [edi + 8]
test edx, edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], ecx
mov dword [edi + 4], 1
mov dword [edi + 8], eax
je 0x10087c84
test ecx, ecx
je 0x10087c84
lock dec dword [ecx]
jne 0x10087c84
lea ecx, [ebp - 0xc]
call fcn.1003eb90
add edi, 8
jmp 0x10087cc8
push 0x100d415c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jae 0x10087bd3
jmp 0x10087bdf
push 0x100d415c
call fcn.1007e000
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
jne 0x10087bfc
xor edi, edi
mov eax, edi
add esp, 8
pop esi
pop edi
pop ebp
ret
push 0x100d415c
call fcn.1007e000
add esp, 4
jmp 0x10087c3b
push 0xc
push 4
call fcn.100a32d0
add esp, 8
ud2
Function at 0x100b9410
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, dword [ebp + 8]
test eax, eax
je 0x100b9468
lea edi, [edx + eax*2]
xor ebx, ebx
movzx esi, byte [edx + 1]
cmp byte [edx], ch
lea edx, [edx + 2]
lea eax, [ebx + esi]
jne 0x100b9460
cmp ebx, eax
ja 0x100b94e2
cmp eax, dword [ebp + 0x10]
ja 0x100b94f3
add ebx, dword [ebp + 0xc]
nop word cs:[eax + eax]
nop
test esi, esi
je 0x100b9462
dec esi
cmp byte [ebx], cl
lea ebx, [ebx + 1]
jne 0x100b9450
jmp 0x100b94bf
ja 0x100b9468
cmp edx, edi
mov ebx, eax
jne 0x100b9422
mov edx, dword [ebp + 0x18]
test edx, edx
je 0x100b94c3
mov esi, dword [ebp + 0x14]
movzx ecx, cx
mov al, 1
add edx, esi
nop dword [eax]
movzx ebx, byte [esi]
lea edi, [esi + 1]
test bl, bl
js 0x100b94a0
mov esi, edi
sub ecx, ebx
jns 0x100b94b7
jmp 0x100b94c5
cmp edi, edx
je 0x100b94cc
movzx edi, byte [esi + 1]
and ebx, 0x7f
add esi, 2
shl ebx, 8
or ebx, edi
sub ecx, ebx
js 0x100b94c5
xor al, 1
cmp esi, edx
jne 0x100b9480
jmp 0x100b94c5
xor eax, eax
jmp 0x100b94c5
mov al, 1
and al, 1
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x100ea4c4
push 0x2b
push 0x100e8cbd
call fcn.100b0df0
add esp, 0xc
ud2
push 0x100ea4d4
push eax
push ebx
call fcn.100b6b50
add esp, 0xc
ud2
push 0x100ea4d4
push dword [ebp + 0x10]
push eax
call fcn.100b6af0
add esp, 0xc
ud2
Function at 0x100c9b90
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0xc
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x100d41ac], eax
cmp eax, 0xffffffff
je 0x100d056c
add esp, 0xc
ret

Function at 0x100ca0a0
Capabilities:
Print debug messages

Disassembly:
test eax, eax
je 0x100ca0d0
push edi
push esi
push ebx
mov ebx, eax
add esp, 0xffffff80
mov dword [esp], eax
call fcn.100cd1f0
cmp eax, 1
je 0x100ca0d1
mov dword [ebx], 0xffffffff
sub esp, 0xffffff80
pop ebx
pop esi
pop edi
ret
ret
lea ebx, [esp + 0x15]
xor eax, eax
mov esi, str.Error_cleaning_up_spin_keys_for_thread
mov ecx, 0xa
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 + 4], edx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__ultoa]
cmp byte [esp + 0x3c], 0
mov eax, 0x27
jne 0x100ca125
jmp 0x100ca133
cmp eax, 0x6a
je 0x100ca13d
add eax, 1
cmp byte [ebx + eax], 0
jne 0x100ca120
cmp eax, 0x6a
je 0x100ca13d
mov byte [esp + eax + 0x15], 0xa
mov byte [esp + eax + 0x16], 0
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push eax
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x100ca1e0
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 [0x101121b8], 1
je 0x100ca1f5
call fcn.100ca150
mov eax, dword [0x100d41ac]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
test eax, eax
je 0x100ca220
add esp, 0x2c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.100c9ff0
mov ebx, eax
mov eax, dword [entry4]
test eax, eax
je 0x100ca20c
test ebx, ebx
je 0x100ca20c
mov dword [ebx + 0x24], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebx + 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 [ebx + 0x1c], 0xffffffff
mov dword [ebx + 0x18], eax
sub esp, 0x10
lea eax, [ebx + 0x38]
call fcn.100ca0a0
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebx + 0x64], 0
mov dword [ebx + 0x14], 0
call esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, eax
call esi
lea edx, [ebx + 0x14]
mov dword [esp + 8], ebp
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
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 0x100d0571
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x6c], eax
movzx eax, byte [ebx + 0x20]
sub esp, 4
and eax, 0xffffffcf
or eax, 0x10
mov byte [ebx + 0x20], al
mov eax, dword [0x100d41ac]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
je 0x100d0571
add esp, 0x2c
mov esi, ebx
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x100ca460
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 0x100ca490
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x100ca540
add esp, 0x10
mov eax, 1
pop ebx
pop esi
pop edi
ret 0xc
cmp eax, 1
je 0x100ca570
cmp eax, 3
jne 0x100ca47a
mov eax, dword [0x100d41ac]
cmp eax, 0xffffffff
je 0x100ca47a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x100ca47a
test byte [eax + 0x20], 0x30
je 0x100ca5a0
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x100ca4d3
call fcn.100ca370
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x100ca505
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 0x100ca4f7
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.100c9910
lea eax, [ebx + 0x38]
call fcn.100ca0a0
mov eax, ebx
call fcn.100c9d80
mov eax, dword [0x100d41ac]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
jmp 0x100ca47a
mov eax, dword [0x10112194]
test eax, eax
je 0x100ca47a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov dword [0x10112194], 0
sub esp, 4
jmp 0x100ca47a
mov dword [esp + 4], 0x100c9ac0
mov dword [esp], 1
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
sub esp, 8
mov dword [0x10112194], eax
mov eax, 1
add esp, 0x10
pop ebx
pop esi
pop edi
ret 0xc
mov edx, dword [ebx + 0x68]
mov eax, dword [eax + 0x18]
test edx, edx
jne 0x100ca612
test eax, eax
je 0x100ca5ba
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 0x100ca5d7
call fcn.100ca370
lea edi, [ebx + 0x1c]
lea esi, [ebx + 0x38]
test byte [ebx + 0x24], 4
je 0x100ca641
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x100ca5fc
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.100c9910
mov eax, esi
jmp 0x100ca513
test eax, eax
je 0x100ca622
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.100c9910
lea eax, [ebx + 0x38]
call fcn.100ca0a0
jmp 0x100ca47a
mov dword [esp], edi
call fcn.100c9910
mov eax, esi
call fcn.100ca0a0
jmp 0x100ca47a
Function at 0x100cafd0
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.100ca1e0
mov ebx, eax
mov dword [eax + 4], esi
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x100caff2
call fcn.100ca370
test byte [ebx + 0x20], 0x30
jne 0x100cb00b
add ebx, 0x70
mov dword [esp + 4], 1
mov dword [esp], ebx
call sub.msvcrt.dll_longjmp
mov eax, dword [0x100d41ac]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
push edx
test eax, eax
je 0x100cb04e
cmp dword [ebx + 0x14], 0
mov eax, dword [eax + 0x18]
je 0x100cb092
mov esi, dword [ebx + 4]
mov dword [ebx + 0x68], 1
test eax, eax
je 0x100cb041
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov dword [ebx + 0x18], 0
test byte [ebx + 0x24], 4
jne 0x100cb057
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]
push edx
mov dword [ebx + 0x14], 0
mov eax, ebx
call fcn.100c9d80
mov eax, dword [0x100d41ac]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push eax
push eax
jmp 0x100cb04e
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x100cb0a6
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov dword [ebx + 0x18], 0
mov esi, dword [ebx + 4]
jmp 0x100cb071

Function at 0x100cf950
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.100ce840
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.100ce840
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 0x100cf9b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x101121ec]
test esi, esi
jle 0x100cfad0
mov edi, dword [0x101121f0]
xor ebx, ebx
lea edx, [edi + 0xc]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x100cf9e4
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x100cfa69
add ebx, 1
add edx, 0x14
cmp ebx, esi
jne 0x100cf9d0
mov dword [esp], eax
mov ebx, eax
call fcn.100d0200
mov edi, eax
test eax, eax
je 0x100cfaf7
mov eax, dword [0x101121f0]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.100d0310
mov edx, dword [0x101121f0]
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 0x100cfad7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x100cfa62
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x100cfa70
add dword [0x101121ec], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 0x40
mov eax, 4
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x101121f0]
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 0x100cfa62
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.100cf950
lea esi, [esi]
lea edi, [edi]
xor esi, esi
jmp 0x100cf9ee
mov eax, dword [0x101121f0]
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.100cf950
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.100cf950
mov esi, esi
lea edi, [edi]

Function at 0x100cfe40
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x10112200
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x101121f8]
sub esp, 4
test ebx, ebx
je 0x100cfe95
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x100cfe8e
test esi, esi
je 0x100cfe8e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x100cfe70
mov dword [esp], 0x10112200
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret