joyce8/EMBER2024-capa huggingface dataset:
Function at 0x501900
Capabilities:
Encrypt data using salsa20 or chacha

Disassembly:
mov edx, dword [ecx]
mov dword [eax + 0x14], edx
mov edx, dword [ecx + 4]
mov dword [eax + 0x28], edx
mov edx, dword [ecx + 8]
mov dword [eax + 0x3c], edx
mov edx, dword [ecx + 0xc]
mov dword [eax + 0x30], edx
mov edx, dword [ecx + 0x10]
mov dword [eax + 0x1c], edx
mov edx, dword [ecx + 0x14]
mov dword [eax + 0x10], edx
mov edx, dword [ecx + 0x18]
mov dword [eax + 0x24], edx
mov ecx, dword [ecx + 0x1c]
mov dword [eax + 0x38], ecx
mov dword [eax], 0x61707865
mov dword [eax + 4], 0x3320646e
mov dword [eax + 8], 0x79622d32
mov dword [eax + 0xc], 0x6b206574
ret
Function at 0x509e20
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
push ebx
mov bl, byte [ebp + 0xc]
push edi
mov al, bl
call fcn.00509d80
mov byte [ebp + 0xc], al
neg al
and al, bl
add al, al
sub bl, al
mov eax, esi
call fcn.00509d00
mov cl, 1
mov al, bl
call fcn.00509d70
mov edi, dword [ebp + 8]
movzx eax, al
push eax
push esi
call fcn.00509d90
mov cl, 2
mov al, bl
call fcn.00509d70
movzx ecx, al
push ecx
add edi, 0x78
push esi
call fcn.00509d90
mov cl, 3
mov al, bl
call fcn.00509d70
mov edi, dword [ebp + 8]
movzx edx, al
push edx
add edi, 0xf0
push esi
call fcn.00509d90
mov cl, 4
mov al, bl
call fcn.00509d70
mov edi, dword [ebp + 8]
movzx eax, al
push eax
add edi, 0x168
push esi
call fcn.00509d90
mov cl, 5
mov al, bl
call fcn.00509d70
mov edi, dword [ebp + 8]
movzx ecx, al
push ecx
add edi, 0x1e0
push esi
call fcn.00509d90
mov cl, 6
mov al, bl
call fcn.00509d70
mov edi, dword [ebp + 8]
movzx edx, al
push edx
add edi, 0x258
push esi
call fcn.00509d90
mov cl, 7
mov al, bl
call fcn.00509d70
mov edi, dword [ebp + 8]
movzx eax, al
push eax
add edi, 0x2d0
push esi
call fcn.00509d90
mov cl, 8
mov al, bl
call fcn.00509d70
mov edi, dword [ebp + 8]
movzx ecx, al
push ecx
add edi, 0x348
push esi
call fcn.00509d90
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x2c]
mov dword [ebp - 0x78], edx
mov edx, dword [esi + 0x34]
mov dword [ebp - 0x70], ecx
mov ecx, dword [esi + 0x3c]
mov dword [ebp - 0x6c], edx
mov edx, dword [esi + 0x40]
mov dword [ebp - 0x74], eax
mov eax, dword [esi + 0x38]
mov dword [ebp - 0x64], ecx
mov ecx, dword [esi + 0x48]
mov dword [ebp - 0x60], edx
mov edx, dword [esi + 0x4c]
mov dword [ebp - 0x68], eax
mov eax, dword [esi + 0x44]
mov dword [ebp - 0x58], ecx
mov ecx, dword [esi + 4]
mov dword [ebp - 0x54], edx
mov edx, dword [esi + 8]
mov dword [ebp - 0x5c], eax
mov eax, dword [esi]
mov dword [ebp - 0x4c], ecx
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x48], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x50], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x40], ecx
mov ecx, dword [esi + 0x1c]
mov dword [ebp - 0x3c], edx
mov edx, dword [esi + 0x20]
mov dword [ebp - 0x44], eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x34], ecx
mov ecx, dword [esi + 0x50]
mov dword [ebp - 0x30], edx
mov edx, dword [esi + 0x54]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0x24]
neg ecx
neg edx
mov dword [ebp - 0x2c], eax
mov eax, dword [esi + 0x58]
mov dword [ebp - 0x28], ecx
mov ecx, dword [esi + 0x5c]
mov dword [ebp - 0x24], edx
mov edx, dword [esi + 0x60]
neg eax
neg ecx
neg edx
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x64]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [esi + 0x68]
mov dword [ebp - 0x18], edx
mov edx, dword [esi + 0x6c]
neg eax
neg ecx
neg edx
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x70]
mov dword [ebp - 0x10], ecx
mov ecx, dword [esi + 0x74]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 0xc]
add esp, 0x40
push edx
neg eax
neg ecx
push esi
lea edi, [ebp - 0x78]
mov dword [ebp - 8], eax
mov dword [ebp - 4], ecx
call fcn.00509d90
add esp, 8
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x50abc0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x67018c]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
push ebx
push esi
mov byte [ebp - 0xc], al
mov dword [ebp - 0xb], eax
mov word [ebp - 7], ax
mov eax, dword [ebp + 8]
mov esi, 0x634870
push edi
sub esi, eax
mov edi, 0x1f
mov edi, edi
mov cl, byte [eax]
movzx edx, byte [esi + eax - 0x20]
xor dl, cl
or byte [ebp - 0xc], dl
movzx edx, byte [esi + eax]
xor dl, cl
or byte [ebp - 0xb], dl
movzx edx, byte [esi + eax + 0x20]
xor dl, cl
or byte [ebp - 0xa], dl
movzx edx, byte [esi + eax + 0x40]
xor dl, cl
or byte [ebp - 9], dl
movzx edx, byte [esi + eax + 0x60]
xor dl, cl
or byte [ebp - 8], dl
movzx edx, byte [esi + eax + 0x80]
xor dl, cl
or byte [ebp - 7], dl
movzx edx, byte [esi + eax + 0xa0]
xor dl, cl
or byte [ebp - 6], dl
inc eax
dec edi
jne 0x50abf0
mov eax, dword [ebp + 8]
mov al, byte [eax + 0x1f]
mov cl, byte [ebp - 0xc]
and al, 0x7f
or byte [ebp - 0xb], al
mov dl, al
mov bl, al
or cl, al
xor dl, 5
or byte [ebp - 0xa], dl
mov dl, byte [ebp - 9]
xor al, 0x7f
or byte [ebp - 8], al
or byte [ebp - 7], al
movzx esi, byte [ebp - 7]
xor bl, 0x7a
or dl, bl
mov bl, byte [ebp - 6]
or bl, al
movzx eax, bl
dec eax
dec esi
or eax, esi
movzx esi, byte [ebp - 8]
movzx edx, dl
dec edx
dec esi
or eax, esi
or eax, edx
movzx edx, byte [ebp - 0xa]
dec edx
or eax, edx
movzx edx, byte [ebp - 0xb]
movzx ecx, cl
dec edx
or eax, edx
dec ecx
or eax, ecx
mov ecx, dword [ebp - 4]
pop edi
shr eax, 8
pop esi
xor ecx, ebp
and eax, 1
pop ebx
call fcn.005230e3
mov esp, ebp
pop ebp
ret
Function at 0x513f60
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
xor dl, dl
mov cl, 1
mov eax, 0x20
push edi
nop
mov esi, dword [ebp + 8]
movzx esi, byte [eax + esi - 1]
movzx edi, byte [eax + 0x63492f]
dec eax
mov ebx, esi
sub ebx, edi
sar ebx, 8
and bl, cl
or dl, bl
mov ebx, edi
xor ebx, esi
dec ebx
sar ebx, 8
and cl, bl
test eax, eax
jne 0x513f70
pop edi
test dl, dl
pop esi
setne al
pop ebx
pop ebp
ret

Function at 0x515210
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp + 0xc], ecx
mov dword [ebp + 8], eax
mov edx, dword [ebp + 0xc]
movzx edx, byte [edx + eax]
mov ecx, dword [ebp - 4]
movzx ecx, byte [ecx + eax]
xor ecx, edx
or dword [ebp + 8], ecx
inc eax
cmp eax, 0x10
jl 0x515225
mov eax, dword [ebp + 8]
dec eax
shr eax, 8
and eax, 1
dec eax
mov esp, ebp
pop ebp
ret

Function at 0x515250
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp + 0xc], ecx
mov dword [ebp + 8], eax
mov edx, dword [ebp + 0xc]
movzx edx, byte [edx + eax]
mov ecx, dword [ebp - 4]
movzx ecx, byte [ecx + eax]
xor ecx, edx
or dword [ebp + 8], ecx
inc eax
cmp eax, 0x20
jl 0x515265
mov eax, dword [ebp + 8]
dec eax
shr eax, 8
and eax, 1
dec eax
mov esp, ebp
pop ebp
ret
Function at 0x523839
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x6724a0], 0
push ebx
push esi
mov esi, 0x6724a8
jne 0x523865
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0x6724c0], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x6724a0], 1
push dword [0x6724c0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x523902
push 0x14
push 8
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x52392c
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x6724a4]
test eax, eax
je 0x5238a7
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0x6724a4], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x523931
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0x6724c0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x52392c
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8
Function at 0x5243a4
Capabilities:
Get file size
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 0xc]
push ebx
xor ebx, ebx
push esi
mov esi, ebx
test eax, eax
je 0x52454a
cmp word [eax], bx
je 0x52454a
push ebx
push pe_nt_image_headers32
push 3
push ebx
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 8], eax
cmp eax, 0xffffffff
je 0x524546
push ebp
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
test ebp, ebp
jle 0x52453b
push edi
push dword [esp + 0x20]
call fcn.005267d6
mov edi, eax
test edi, edi
je 0x52453a
cmp dword [esp + 0x20], 0xffffffff
mov ebx, dword [esp + 0x18]
jne 0x52441a
push 2
jmp 0x52441e
push dword [esp + 0x20]
push ebx
call fcn.00523c8e
mov esi, eax
test esi, esi
je 0x524533
cmp ebx, 0xffffffff
jne 0x524435
mov ebx, esi
mov eax, dword [esi + 4]
mov dword [esi + 0x30], ebx
lea ebx, [ebp + 8]
mov dword [esi + 0x38], eax
xor eax, eax
push ebx
push eax
mov dword [esi + 0x2c], edi
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], eax
mov dword [esi + 0x14], eax
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi + 0x28], eax
test eax, eax
je 0x524476
mov dword [eax + 4], ebx
mov eax, dword [esi + 0x28]
and dword [eax], 0
mov eax, dword [esi + 0x28]
add eax, 8
mov dword [esi + 0x44], eax
cmp dword [esp + 0x20], 0xffffffff
je 0x524484
mov dword [esi + 0x34], 1
push esi
push edi
call fcn.00561ae0
pop ecx
pop ecx
xor ebx, ebx
mov ecx, 0x4000
mov dword [esp + 0x20], ecx
test ebp, ebp
jle 0x52452f
lea eax, [ecx + ebx]
cmp eax, ebp
jle 0x5244af
mov ecx, ebp
sub ecx, ebx
mov dword [esp + 0x20], ecx
push ecx
push edi
call fcn.00561470
mov dword [esp + 0x20], eax
pop ecx
pop ecx
test eax, eax
je 0x524521
push 0
lea ecx, [esp + 0x20]
push ecx
push dword [esp + 0x28]
push eax
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x1c]
add ebx, eax
cmp dword [esi + 0x14], 0
jne 0x5244f3
push eax
push dword [esp + 0x1c]
call fcn.00526881
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0x1c]
cmp ebx, ebp
jl 0x5244fb
push 1
jmp 0x5244fd
push 0
push eax
push edi
call fcn.00561740
add esp, 0xc
test eax, eax
je 0x524515
mov ecx, dword [esp + 0x20]
cmp ebx, ebp
jl 0x5244a0
jmp 0x52452f
push edi
call fcn.00561720
pop ecx
mov dword [esi + 0x18], eax
jmp 0x524528
mov dword [esi + 0x18], 1
push edi
push esi
call fcn.0052693b
and dword [esi + 0x2c], 0
push edi
call fcn.00561880
pop ecx
pop edi
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
mov eax, esi
jmp 0x52454c
xor eax, eax
pop esi
pop ebx
pop ecx
ret 0xc

Function at 0x52548a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp + 8]
push edi
push 0
push eax
mov edi, 0x1000
mov eax, edi
sub eax, dword [esi + 4]
push eax
push dword [esi + 0x10]
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, edi
sub eax, dword [esi + 4]
cmp dword [ebp + 8], eax
jne 0x5254c6
mov eax, dword [esi + 0x10]
mov dword [esi], eax
xor eax, eax
mov dword [esi + 4], edi
inc eax
jmp 0x5254c8
xor eax, eax
pop edi
pop esi
pop ebp
ret
Function at 0x526eac
Capabilities:
Create thread

Disassembly:
push ecx
push ebp
push esi
lea eax, [esp + 8]
xor esi, esi
push eax
push esi
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebp, eax
test ebp, ebp
je 0x526f44
push edi
push 0x673e2c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x6724cc]
test edi, edi
je 0x526f18
push ebx
push esi
lea ebx, [edi + 8]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x526f11
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
push ebx
push 0x6724cc
call fcn.00559cec
pop ecx
pop ecx
jmp 0x526f13
mov edi, dword [edi]
test edi, edi
jne 0x526ee8
pop ebx
mov eax, dword [0x66edd4]
mov esi, eax
inc eax
push 0x10
push 0x6724cc
mov dword [0x66edd4], eax
call fcn.00559d2c
pop ecx
pop ecx
push 0x673e2c
mov dword [eax], ebp
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebp
pop ecx
ret 8

Function at 0x526f71
Capabilities:
Terminate thread

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
push 0
push edi
call fcn.00526d50
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ebx, 0x673e2c
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x6724cc]
jmp 0x526fa2
cmp dword [esi + 0xc], edi
je 0x526fa8
mov esi, dword [esi]
test esi, esi
jne 0x526f9b
jmp 0x526fc0
add esi, 8
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push 0x6724cc
call fcn.00559cec
pop ecx
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
ret 4

Function at 0x529731
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
je 0x529786
push dword [esp + 0x10]
push 0x5296b0
call dword [sym.imp.USER32.dll_EnumWindows]
mov esi, dword [0x6724d4]
test esi, esi
je 0x5297df
xor edi, edi
mov ebx, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x52977e
cmp byte [esi + 0x10], 0
je 0x52977e
push 3
push edi
push edi
push edi
push edi
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov esi, ebx
test ebx, ebx
jne 0x52975a
jmp 0x5297df
mov esi, dword [0x6724d4]
test esi, esi
je 0x5297df
xor edi, edi
push ebp
mov ebx, dword [esi]
lea ebp, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp], eax
jne 0x5297d8
cmp byte [esi + 0x11], 0
je 0x5297b4
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp byte [esi + 0x10], 0
je 0x5297cb
push 3
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
push ebp
push 0x6724d4
call fcn.00559cec
pop ecx
pop ecx
mov esi, ebx
test ebx, ebx
jne 0x529793
pop ebp
pop edi
pop esi
pop ebx
ret 4
Function at 0x544426
Capabilities:
Accept command line arguments

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
push edi
push dword [0x673e5c]
call fcn.00559421
mov ebp, eax
or ebx, 0xffffffff
xor eax, eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, dword [esp + 0x1c]
movzx edx, word [eax]
test dx, dx
je 0x544526
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], 0x20
mov dword [esp + 0x14], 0x22
cmp dx, word [esp + 0x10]
jne 0x54447c
push 0x20
pop edx
add eax, 2
cmp word [eax], dx
je 0x544474
movzx edx, word [eax]
mov dword [esp + 0x1c], 1
cmp dx, word [esp + 0x14]
jne 0x5444bc
add eax, 2
mov esi, eax
movzx ecx, word [eax]
test cx, cx
je 0x5444fe
push 0x22
pop edx
cmp cx, dx
je 0x5444ae
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x54449e
xor ecx, ecx
cmp word [eax], cx
je 0x5444fe
mov ecx, eax
add eax, 2
jmp 0x544500
test dx, dx
je 0x544506
push 0x20
mov esi, eax
pop ecx
cmp dx, cx
je 0x5444ae
add eax, 2
push 0x22
pop edx
cmp word [eax], dx
jne 0x5444f4
add eax, 2
movzx ecx, word [eax]
test cx, cx
je 0x5444fe
cmp cx, dx
je 0x5444f1
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x5444e1
push 0x20
pop ecx
movzx edx, word [eax]
test dx, dx
jne 0x5444c6
jmp 0x5444ae
mov ecx, eax
mov edx, dword [esp + 0x1c]
jmp 0x544508
xor edx, edx
cmp dword [ebp], ebx
jne 0x544511
test edi, edi
jne 0x54452e
test edx, edx
je 0x544516
inc ebx
xor edx, edx
mov esi, edx
movzx edx, word [eax]
test dx, dx
jne 0x54446a
test edi, edi
jne 0x54453f
mov eax, ebx
jmp 0x544543
test esi, esi
je 0x54453f
sub ecx, esi
mov eax, esi
sar ecx, 1
mov dword [edi], ecx
inc dword [ebp]
jmp 0x544543
xor ecx, ecx
mov dword [edi], ecx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret

Function at 0x544664
Capabilities:
Query environment variable

Disassembly:
push ebp
push esi
push edi
push dword [0x673e5c]
xor esi, esi
call fcn.00559421
mov ebp, eax
cmp dword [ebp + 8], esi
je 0x54468e
push dword [ebp + 8]
push esi
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp + 8], esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov edi, eax
test edi, edi
je 0x5446e7
push ebx
mov ebx, edi
cmp word [edi], si
je 0x5446b4
push ebx
call sub.MSVCRT.dll_wcslen
pop ecx
lea ebx, [ebx + eax*2]
add ebx, 2
cmp word [ebx], si
jne 0x5446a2
sub ebx, edi
add ebx, 2
push ebx
push esi
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp + 8], eax
test eax, eax
je 0x5446df
push ebx
push edi
push eax
call sub.MSVCRT.dll_memcpy
mov dword [ebp + 0xc], esi
add esp, 0xc
xor esi, esi
inc esi
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
pop ebx
pop edi
mov eax, esi
pop esi
pop ebp
ret
Function at 0x544748
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov eax, 0x1000
push ebx
push ebp
push esi
push edi
xor edi, edi
xor ebp, ebp
cmp dword [esp + 0x24], 0x18
mov ebx, eax
je 0x544807
cmp dword [esp + 0x24], 2
je 0x544807
push 0x2000
push ebp
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
jmp 0x5447d6
cmp dword [esp + 0x18], 2
jne 0x5447f2
cmp dword [esp + 0x28], 0xffffffff
je 0x54479a
cmp ebp, dword [esp + 0x28]
jae 0x5447f2
add ebp, 2
test ebx, ebx
jne 0x5447bf
lea eax, [edi*2 + 0x2000]
push eax
push esi
push 8
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov esi, eax
mov ebx, 0x1000
mov ax, word [esp + 0x14]
cmp ax, 0xa
je 0x5447f2
cmp ax, 0xd
je 0x5447d6
mov word [esi + edi*2], ax
inc edi
dec ebx
push 0
lea eax, [esp + 0x1c]
push eax
push 2
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x544786
push dword [esp + 0x2c]
xor eax, eax
push esi
mov word [esi + edi*2], ax
call fcn.005f70b0
jmp 0x544899
push eax
push 0
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp dword [esp + 0x28], 0xffffffff
je 0x544825
cmp ebp, dword [esp + 0x28]
jae 0x54487d
push 0
lea eax, [esp + 0x1c]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x54487d
cmp dword [esp + 0x18], 1
jne 0x54487d
inc ebp
test ebx, ebx
jne 0x54486a
lea eax, [edi + 0x1000]
push eax
push esi
push 8
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov esi, eax
mov ebx, 0x1000
mov al, byte [esp + 0x13]
cmp al, 0xa
je 0x54487d
cmp al, 0xd
je 0x544818
mov byte [esi + edi], al
inc edi
dec ebx
jmp 0x544818
cmp dword [esp + 0x24], 0x18
push dword [esp + 0x2c]
mov byte [esi + edi], 0
push esi
jne 0x544894
call fcn.005f6db0
jmp 0x544899
call fcn.005f6fe0
push esi
push 0
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
Function at 0x545044
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [0x673e7c]
call fcn.00559421
mov edi, dword [eax + 0x24]
test edi, edi
je 0x545102
cmp dword [edi + 8], 1
je 0x545102
mov edi, dword [edi + 0xc]
test edi, edi
je 0x545102
mov al, byte [edi]
cmp al, 0x20
je 0x54507d
cmp al, 9
jne 0x545080
inc edi
jmp 0x545073
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
push eax
push eax
push 0xffffffffffffffff
push edi
push eax
push 0xfde9
call esi
push dword [esp + 0x14]
mov ebx, eax
lea ecx, [ebx - 1]
push ecx
call fcn.0055add0
push ebx
mov ebp, eax
push ebp
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call esi
test ebx, ebx
jle 0x5450d1
push 9
pop edx
lea eax, [ebp - 2]
lea eax, [eax + ebx*2]
movzx ecx, word [eax]
push 0x20
pop esi
cmp cx, si
je 0x5450ed
cmp cx, dx
je 0x5450ed
pop edi
pop esi
pop ebp
pop ebx
ret 4
movzx ecx, word [eax]
cmp cx, si
je 0x5450e5
cmp cx, dx
jne 0x5450f1
xor ecx, ecx
mov word [eax], cx
sub eax, 2
cmp eax, ebp
jae 0x5450d8
push ebp
call sub.MSVCRT.dll_wcslen
pop ecx
sub ebx, eax
push ebx
call fcn.0055b180
jmp 0x5450d1
pop edi
pop esi
pop ebp
pop ebx
jmp fcn.0055b150
Function at 0x545db9
Capabilities:
Delete file

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
xor edi, edi
test esi, esi
je 0x545e1b
cmp word [esi], di
je 0x545e1b
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.00581d00
push dword [esp + 0x1c]
mov ebx, eax
push ebx
call dword [esp + 0x20]
push esi
push ebx
call fcn.00581f10
add esp, 0x10
test eax, eax
jne 0x545e1a
push 0x24
push 8
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov eax, dword [esp + 0x10]
mov dword [ecx + 0x14], edi
mov edi, ecx
mov dword [ecx], ebx
mov dword [ecx + 8], 1
mov dword [ecx + 0x20], eax
mov dword [eax + 4], ecx
pop ebx
mov eax, edi
pop edi
pop esi
ret 0x10

Function at 0x5468b0
Capabilities:
Get thread local storage value

Disassembly:
cmp dword [0x6726fc], 0
jne 0x5468be
call fcn.00546830
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
push dword [0x672700]
call esi
test eax, eax
jne 0x5468e1
call fcn.00546830
push dword [0x672700]
call esi
mov edx, dword [esp + 0x14]
lea esi, [eax + 8]
mov edi, 0x11
lea ecx, [ecx]
imul ecx, edx, 0x53a9b4fb
lea esi, [esi + 4]
mov edx, 1
sub edx, ecx
imul ecx, edx, 0x53a9b4fb
mov dword [esi + 0x40], edx
mov edx, 1
sub edx, ecx
mov dword [esi - 4], edx
dec edi
jne 0x5468f0
mov dword [eax], edi
lea ebp, [edi + 0x1f]
mov dword [eax + 4], 0xa
mov ebx, dword [eax]
mov edi, dword [eax + 4]
mov edx, dword [eax + ebx*4 + 8]
mov ecx, dword [eax + ebx*4 + 0x4c]
mov esi, dword [eax + edi*4 + 8]
ror ecx, 0xd
add ecx, dword [eax + edi*4 + 0x4c]
dec edi
ror edx, 5
add edx, esi
mov dword [eax + ebx*4 + 8], ecx
mov dword [eax + ebx*4 + 0x4c], edx
dec ebx
jns 0x546950
mov ebx, 0x10
test edi, edi
jns 0x546959
mov edi, 0x10
mov dword [eax], ebx
mov dword [eax + 4], edi
dec ebp
jne 0x546922
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x54b413
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push dword [0x673f00]
xor edi, edi
call fcn.00559421
mov ebx, eax
cmp dword [ebp + 8], edi
je 0x54b4ca
cmp dword [ebp + 0xc], edi
je 0x54b4ca
push esi
push 0x60
push 8
push dword [0x6720e4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push dword [ebp + 8]
mov esi, eax
or dword [esi + 4], 0xffffffff
mov dword [esi], edi
call sub.MSVCRT.dll__wcsdup
push dword [ebp + 0xc]
mov dword [esi + 8], eax
call sub.MSVCRT.dll__wcsdup
push dword [ebp + 0x14]
mov dword [esi + 0xc], eax
call sub.MSVCRT.dll__wcsdup
mov dword [esi + 0x40], eax
add esp, 0xc
mov eax, dword [ebx]
mov dword [esi + 0x28], eax
mov eax, dword [ebx + 4]
mov dword [esi + 0x2c], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x24], eax
test al, 1
je 0x54b4b9
lea eax, [ebp + 8]
push eax
push edi
push esi
push 0x54b66c
push 0x10000
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x54b4b1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, esi
jmp 0x54b4c9
push esi
call fcn.0054ae32
jmp 0x54b4c8
push esi
call fcn.0054b4e4
push esi
mov edi, eax
call fcn.0054ae32
pop ecx
pop ecx
pop esi
mov eax, edi
pop edi
pop ebx
pop ebp
ret 0x10