joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4032a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x40f040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40335c
cmp byte [esi + 0x3d], 0
je 0x40335c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40334a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x403311
sub eax, 1
je 0x403315
sub eax, 2
jne 0x40334a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a7fd
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x403333
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40334a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a7fd
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a7fd
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0040a7fd
mov esp, ebp
pop ebp
ret
Function at 0x406d30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x24], ebx
mov eax, dword [edi + 4]
cdq
mov esi, eax
mov eax, dword [ecx + 4]
xor esi, edx
sub esi, edx
cdq
xor eax, edx
mov dword [ebp - 8], esi
sub eax, edx
mov edx, eax
mov dword [ebp - 0x14], edx
cmp esi, eax
jge 0x406d69
mov dword [ebp - 8], eax
mov edx, esi
mov dword [ebp - 0x14], esi
cmovge ecx, edi
cmovge edi, dword [ebp + 8]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x28], edi
test edx, edx
jne 0x406d84
pop edi
pop esi
mov dword [ebx + 4], edx
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ecx + 4]
mov esi, edx
mov eax, dword [edi + 4]
shr eax, 0x1f
shr ebx, 0x1f
mov edi, eax
mov ecx, ebx
mov dword [ebp - 0x10], eax
neg ecx
and edi, ebx
mov dword [ebp - 0x18], ecx
mov ecx, eax
neg ecx
mov eax, edi
neg eax
mov dword [ebp - 0x1c], ecx
test ecx, ecx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x24]
cmovne esi, dword [ebp - 8]
mov dword [ebp - 0x20], esi
lea edx, [esi + edi]
cmp edx, dword [eax]
jle 0x406dca
mov ecx, eax
call fcn.00404e20
jmp 0x406dcd
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 4]
xor esi, esi
mov edx, dword [ebp - 0x28]
mov dword [ebp + 8], eax
mov dword [ebp - 4], esi
mov ecx, dword [ecx + 8]
mov edx, dword [edx + 8]
mov dword [ebp - 8], ecx
sub ecx, edx
sub eax, edx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], eax
nop
mov eax, dword [edx + ecx]
lea edx, [edx + 4]
xor eax, dword [ebp - 0x18]
mov ecx, dword [edx - 4]
add eax, ebx
cmp eax, ebx
sbb ebx, ebx
xor ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x10]
neg ebx
cmp ecx, dword [ebp - 0x10]
sbb esi, esi
and ecx, eax
xor ecx, dword [ebp - 0xc]
neg esi
mov eax, dword [ebp - 0x28]
add ecx, edi
cmp ecx, edi
mov dword [ebp - 0x10], esi
mov esi, dword [ebp - 4]
sbb edi, edi
inc esi
neg edi
mov dword [edx + eax - 4], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 4], esi
cmp esi, dword [ebp - 0x14]
jl 0x406df0
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 4]
cmp eax, esi
jge 0x406e7b
mov edx, dword [ebp + 8]
sub dword [ebp - 8], edx
lea ecx, [edx + eax*4]
mov edx, esi
mov esi, dword [ebp - 8]
sub edx, eax
mov eax, dword [ecx + esi]
lea ecx, [ecx + 4]
xor eax, dword [ebp - 0x18]
add eax, ebx
cmp eax, ebx
sbb ebx, ebx
and eax, dword [ebp - 0x1c]
xor eax, dword [ebp - 0xc]
neg ebx
add eax, edi
cmp eax, edi
mov dword [ecx - 4], eax
sbb edi, edi
neg edi
sub edx, 1
jne 0x406e51
mov esi, dword [ebp - 0x20]
test edi, edi
je 0x406e88
mov eax, dword [ebp + 8]
mov dword [eax + esi*4], edi
inc esi
jmp 0x406ea2
test esi, esi
jle 0x406ea2
mov eax, dword [ebp + 8]
lea eax, [eax + esi*4]
add eax, 0xfffffffc
cmp dword [eax], 0
jne 0x406ea2
dec esi
sub eax, 4
test esi, esi
jg 0x406e95
mov ebx, dword [ebp - 0x24]
mov eax, esi
neg eax
cmp dword [ebp - 0xc], 0
pop edi
cmove eax, esi
pop esi
mov dword [ebx + 4], eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a5d0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
push ebx
lea eax, [ebp - 0x98]
mov dword [ebp - 0x90], 0x1000
shr eax, 8
xorps xmm0, xmm0
mov bl, al
movlpd qword [ebp - 0x98], xmm0
shr eax, 8
mov ecx, eax
mov dword [ebp - 0x7c], eax
shr ecx, 8
lea eax, [ebp - 0x90]
push esi
mov dword [ebp - 0x80], ecx
lea ecx, [ebp - 0x98]
push edi
shr eax, 8
mov byte [ebp - 0x5c], cl
mov dl, al
mov ecx, dword [ebp - 0x80]
push 0x40
shr eax, 8
mov byte [ebp - 0x59], cl
lea ecx, [ebp - 0x90]
push 0x3000
mov dword [ebp - 0x84], eax
push 0x3e8
shr eax, 8
mov byte [ebp - 0x50], cl
mov ecx, dword [ebp - 0x84]
mov byte [ebp - 0x5b], bl
mov ebx, dword [ebp - 0x7c]
push 0
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x78], 0x83e58955
mov dword [ebp - 0x74], 0x336af0e4
mov dword [ebp - 0x70], 0xe8
mov dword [ebp - 0x6c], 0x24048300
mov dword [ebp - 0x68], 0x3148cb05
mov dword [ebp - 0x64], 0xc9ff48c9
mov dword [ebp - 0x60], 0xbaca8949
mov byte [ebp - 0x5a], bl
mov dword [ebp - 0x58], 0xffffb841
mov dword [ebp - 0x54], 0xb9417ffe
mov byte [ebp - 0x4f], dl
mov byte [ebp - 0x4e], cl
mov byte [ebp - 0x4d], al
mov dword [ebp - 0x4c], 0xbf495741
mov dword [ebp - 0x48], 0x40
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0xbf495741
mov dword [ebp - 0x3c], 0x3000
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0x5f415741
mov dword [ebp - 0x30], 0x5f415f41
mov dword [ebp - 0x2c], 0x18b8
mov dword [ebp - 0x28], 0xec834800
mov dword [ebp - 0x24], 0xe8050f40
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0x42444c7
mov dword [ebp - 0x18], 0x23
mov dword [ebp - 0x14], 0xd240483
mov dword [ebp - 0x10], 0xd88c66cb
mov dword [ebp - 0xc], 0xec89d08e
mov word [ebp - 8], 0xc35d
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
test ebx, ebx
jne 0x40a754
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x16
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
call ebx
mov eax, dword [ebp - 0x98]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, 0x1c
lea esi, [ebp - 0x78]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
call ebx
mov eax, dword [ebp - 0x98]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10

Function at 0x40b2be
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40b2fd
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40b2fd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40b2fd
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40b2fd
cmp dword [ecx + 0x74], 0xe
jbe 0x40b2fd
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43200c
nop
nop
nop
pop eax
nop
nop
nop
add eax, 0x40729f
sub eax, 0x407245
nop
nop
nop
nop
mov ebx, dword [eax]
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x432030
nop
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
jne 0x43201e
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x405d6b
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x422a0c], 0
push esi
jne 0x405da2
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405d7c
mov dword [ecx*4 + 0x422a08], eax
inc ecx
cmp ecx, 0x100
jl 0x405d77
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405dd3
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x422a08]
xor eax, esi
inc ecx
dec edx
jne 0x405db5
pop edi
not eax
pop esi
ret 0xc

Function at 0x501cf0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x502328
push 0x501ef0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffff98
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 4], 0
push 2
call dword [sym.imp.MSVCRT.dll___set_app_type]
add esp, 4
mov dword [0x503424], 0xffffffff
mov dword [0x503428], 0xffffffff
call dword [sym.imp.MSVCRT.dll___p__fmode]
mov ecx, dword [0x503420]
mov dword [eax], ecx
call dword [sym.imp.MSVCRT.dll___p__commode]
mov edx, dword [0x50341c]
mov dword [eax], edx
mov eax, dword [sym.imp.MSVCRT.dll__adjust_fdiv]
mov ecx, dword [eax]
mov dword [0x50342c], ecx
call fcn.00501ee0
mov eax, dword [0x503154]
test eax, eax
jne 0x501d81
push 0x501ed0
call dword [sym.imp.MSVCRT.dll___setusermatherr]
add esp, 4
call fcn.00501eb0
push 0x50300c
push 0x503008
call sub.MSVCRT.dll__initterm
add esp, 8
mov edx, dword [0x503418]
mov dword [ebp - 0x6c], edx
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [0x503414]
push ecx
lea edx, [ebp - 0x64]
push edx
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x60]
push ecx
call dword [sym.imp.MSVCRT.dll___getmainargs]
add esp, 0x14
push 0x503004
push section..data
call sub.MSVCRT.dll__initterm
add esp, 8
call dword [sym.imp.MSVCRT.dll___p__acmdln]
mov esi, dword [eax]
mov dword [ebp - 0x74], esi
cmp byte [esi], 0x22
jne 0x501e8f
inc esi
mov dword [ebp - 0x74], esi
mov al, byte [esi]
test al, al
je 0x501df5
cmp al, 0x22
jne 0x501de7
cmp byte [esi], 0x22
jne 0x501dfe
inc esi
mov dword [ebp - 0x74], esi
mov al, byte [esi]
test al, al
je 0x501e0e
cmp al, 0x20
ja 0x501e0e
inc esi
mov dword [ebp - 0x74], esi
jmp 0x501dfe
mov dword [ebp - 0x30], 0
lea edx, [ebp - 0x5c]
push edx
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x501e2f
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x501e34
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x68], eax
push eax
call dword [sym.imp.MSVCRT.dll_exit]
jmp 0x501e74
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x501dfe
inc esi
mov dword [ebp - 0x74], esi
jmp 0x501e8f
Function at 0x78008c10
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.78008cd0
mov eax, dword [0x78040e18]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x78008c34
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x78040e14], 1
mov byte [0x78040e10], bl
jne 0x78008c8e
mov ecx, dword [0x78041718]
test ecx, ecx
je 0x78008c7c
mov esi, dword [0x78041714]
sub esi, 4
cmp esi, ecx
jb 0x78008c7c
mov eax, dword [esi]
test eax, eax
je 0x78008c75
call eax
mov ecx, dword [0x78041718]
sub esi, 4
cmp esi, ecx
jae 0x78008c67
push 0x7803c034
push 0x7803c024
call sym.MSVCRT.dll__initterm
add esp, 8
push 0x7803c040
push 0x7803c038
call sym.MSVCRT.dll__initterm
add esp, 8
test ebx, ebx
je 0x78008cad
call fcn.78008ce0
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x78040e18], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x78008d60
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x7803c0f0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x78008d84
add eax, 8
inc ebp
cmp eax, sym.MSVCRT.dll__aexit_rtn
jb 0x78008d75
cmp ecx, dword [ebp*8 + 0x7803c0f0]
jne 0x78008f2b
mov eax, dword [0x78040e34]
cmp eax, 1
je 0x78008eed
test eax, eax
jne 0x78008db0
cmp dword [0x78040e38], 1
je 0x78008eed
cmp ecx, 0xfc
je 0x78008f2b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x78008deb
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x78008e34
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x7803664c
add ebx, ecx
push ebx
call sym.MSVCRT.dll_strncpy
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x78036b20
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x7803c0f4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.7800cc10
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [sym.MSVCRT.dll___pioinfo]
test eax, eax
je 0x78008efe
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x78008f08
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x7803c0f4]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x78009910
Capabilities:
Create thread
Resume thread

Disassembly:
push esi
push edi
push 0x74
push 1
xor edi, edi
call sym.MSVCRT.dll_calloc
mov esi, eax
add esp, 8
test esi, esi
je 0x7800996f
push esi
call fcn.78009c90
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], ecx
push esi
push 4
push esi
push 0x78009990
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
test edi, edi
mov dword [esi + 4], edi
je 0x78009967
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x7800998b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call sym.MSVCRT.dll_free
add esp, 4
test edi, edi
je 0x78009985
push edi
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
ret
mov eax, edi
pop edi
pop esi
ret

Function at 0x78009a90
Capabilities:
Create thread

Disassembly:
push esi
push edi
push 0x74
push 1
xor edi, edi
call sym.MSVCRT.dll_calloc
mov esi, eax
add esp, 8
test esi, esi
je 0x78009af0
push esi
call fcn.78009c90
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
add esp, 4
mov dword [esi + 0x48], eax
mov eax, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0x10]
mov dword [esi + 0x4c], ecx
mov ecx, dword [esp + 0x14]
push eax
push esi
push 0x78009b10
push ecx
push edx
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x78009b08
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call sym.MSVCRT.dll_free
add esp, 4
test edi, edi
je 0x78009b06
push edi
call fcn.7800a850
add esp, 4
xor eax, eax
pop edi
pop esi
ret

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

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x7803c248]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x78009d1e
push 0x74
push 1
call sym.MSVCRT.dll_calloc
mov esi, eax
add esp, 8
test esi, esi
je 0x78009d14
mov ecx, dword [0x7803c248]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x78009d14
push esi
call fcn.78009c90
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call sym.MSVCRT.dll__amsg_exit
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x78009d30
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov eax, dword [0x7803c248]
cmp eax, 0xffffffff
je 0x78009ddf
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x78009d54
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x78009dd0
mov eax, dword [esi + 0x24]
test eax, eax
je 0x78009d64
push eax
call sym.MSVCRT.dll_free
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x78009d74
push eax
call sym.MSVCRT.dll_free
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x78009d84
push eax
call sym.MSVCRT.dll_free
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x78009d94
push eax
call sym.MSVCRT.dll_free
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x78009da4
push eax
call sym.MSVCRT.dll_free
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x78009db4
push eax
call sym.MSVCRT.dll_free
add esp, 4
mov eax, dword [esi + 0x50]
cmp eax, 0x7803e770
je 0x78009dc7
push eax
call sym.MSVCRT.dll_free
add esp, 4
push esi
call sym.MSVCRT.dll_free
add esp, 4
mov eax, dword [0x7803c248]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
ret

Function at 0x7800a140
Capabilities:
Enumerate files on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
test edi, edi
je 0x7800a199
mov eax, dword [0x78040fa8]
test eax, eax
jne 0x7800a164
push 0x244
call sym.MSVCRT.dll_malloc
add esp, 4
mov dword [0x78040fa8], eax
mov eax, dword [0x78040fac]
test eax, eax
je 0x7800a17e
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [0x78040fac], 0
mov eax, dword [0x78040fa8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [0x78040fac], eax
jne 0x7800a1cb
xor eax, eax
pop edi
ret
mov ecx, dword [0x78040fa8]
mov edx, dword [0x78040fac]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x7800a1cb
mov eax, dword [0x78040fac]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [0x78040fac], 0
xor eax, eax
pop edi
ret
mov ecx, dword [0x78040fa8]
pop edi
lea eax, [ecx + 0x2c]
ret

Function at 0x7800a790
Capabilities:
Enumerate files on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
test edi, edi
je 0x7800a7e9
mov eax, dword [0x780411c4]
test eax, eax
jne 0x7800a7b4
push 0x354
call sym.MSVCRT.dll_malloc
add esp, 4
mov dword [0x780411c4], eax
mov eax, dword [0x780411c8]
test eax, eax
je 0x7800a7ce
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [0x780411c8], 0
mov eax, dword [0x780411c4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [0x780411c8], eax
jne 0x7800a81b
xor eax, eax
pop edi
ret
mov ecx, dword [0x780411c4]
mov edx, dword [0x780411c8]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x7800a81b
mov eax, dword [0x780411c8]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [0x780411c8], 0
xor eax, eax
pop edi
ret
mov ecx, dword [0x780411c4]
pop edi
lea eax, [ecx + 0x2c]
ret
Function at 0x7800cfd0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x78041414]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x7800d012
call edi
mov esi, eax
test esi, esi
je 0x7800cffc
mov eax, 1
jmp 0x7800d00d
call ebp
mov ebx, eax
test ebx, ebx
je 0x7800d11f
mov eax, 2
mov dword [0x78041414], eax
cmp eax, 1
jne 0x7800d0b2
test esi, esi
jne 0x7800d02b
call edi
mov esi, eax
test esi, esi
je 0x7800d11f
cmp word [esi], 0
mov eax, esi
je 0x7800d045
add eax, 2
cmp word [eax], 0
jne 0x7800d033
add eax, 2
cmp word [eax], 0
jne 0x7800d033
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x7800d0a4
push edi
call sym.MSVCRT.dll_malloc
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x7800d0a4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x7800d096
push ebx
call sym.MSVCRT.dll_free
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x7800d11f
test ebx, ebx
jne 0x7800d0c3
call ebp
mov ebx, eax
test ebx, ebx
je 0x7800d11f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x7800d0db
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x7800d0cb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x7800d0cb
sub eax, ebx
inc eax
mov esi, eax
push esi
call sym.MSVCRT.dll_malloc
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x7800d0fd
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret