joyce8/EMBER2024-capa huggingface dataset:
Function at 0x559552
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
cmp dword [ebp + 8], 0
je 0x5595ca
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [ebp - 4], ax
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcslen
lea ecx, [ebp - 0x20c]
add esp, 0x10
lea eax, [ecx + eax*2]
jmp 0x5595ab
movzx ecx, word [eax - 2]
cmp ecx, 0x20
je 0x5595a8
cmp ecx, 0x5c
je 0x5595a8
cmp ecx, 0x2f
jne 0x5595b5
add eax, 0xfffffffe
lea ecx, [ebp - 0x20c]
cmp eax, ecx
ja 0x559595
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x5595cc
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x559699
Capabilities:
Check if file exists

Disassembly:
xor eax, eax
push ebp
mov ebp, eax
mov eax, dword [0x7647a0]
push esi
test eax, eax
jne 0x5596be
push fcn.005597c6
push 0x10
push 0x258
call fcn.00571854
mov dword [0x7647a0], eax
push dword [esp + 0xc]
push eax
call fcn.005717d3
mov esi, eax
test esi, esi
je 0x5597bf
push edi
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x5596e0
mov edi, 0x60d40c
push ebx
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x5596f0
xor eax, eax
cmp word [ebx], ax
jne 0x5596f5
mov ebx, 0x6231dc
push edi
call sub.MSVCRT.dll_wcslen
push ebx
mov dword [esp + 0x24], eax
call sub.MSVCRT.dll_wcslen
add eax, dword [esp + 0x24]
pop ecx
pop ecx
lea eax, [eax*2 + 4]
push eax
xor eax, eax
push eax
push dword [0x760378]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x5597a6
push edi
push eax
call sub.MSVCRT.dll_wcscpy
mov eax, dword [esp + 0x24]
pop ecx
pop ecx
test eax, eax
je 0x559756
cmp word [edi + eax*2 - 2], 0x5c
mov edi, dword [esp + 0x18]
je 0x55975a
push 0x6230a0
push edi
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
jmp 0x55975a
mov edi, dword [esp + 0x18]
push ebx
push edi
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esi + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x55977e
xor eax, eax
mov ebp, esi
mov dword [esi + 4], eax
jmp 0x559794
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x559792
mov dword [esi + 4], 1
mov ebp, esi
xor eax, eax
push edi
push eax
push dword [0x760378]
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebp, ebp
jne 0x5597bd
cmp dword [esp + 0x14], 0xffffffff
je 0x5597b1
mov esi, dword [esp + 0x14]
push esi
push dword [0x7647a0]
call fcn.00571771
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
ret 0xc
Function at 0x559a5c
Capabilities:
Check os version

Disassembly:
sub esp, 0x350
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x114
xor ebx, ebx
mov esi, 0xc8
and dword [esp + 0x10], ebx
xor edi, edi
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x559bd2
mov eax, dword [esp + 0x24]
dec eax
je 0x559bb5
dec eax
jne 0x559bd2
lea eax, [esp + 0x128]
xor ebp, ebp
push eax
call fcn.00559a15
pop ecx
test eax, eax
je 0x559b13
mov ebx, dword [esp + 0x12c]
mov edi, dword [esp + 0x130]
mov eax, dword [esp + 0x134]
cmp byte [esp + 0x242], 1
jne 0x559ad6
xor ebp, ebp
inc ebp
sub ebx, 3
je 0x559bb1
dec ebx
je 0x559bad
dec ebx
je 0x559b8c
dec ebx
je 0x559b46
sub ebx, 4
jne 0x559bd2
test edi, edi
jne 0x559bd2
cmp eax, 0x55f0
sbb esi, esi
and esi, 0xfffffff6
add esi, 0x78
jmp 0x559bd2
lea eax, [esp + 0x244]
mov dword [esp + 0x244], 0x11c
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
mov eax, dword [esp + 0x10]
je 0x559ad6
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
cmp byte [esp + 0x35e], 1
jmp 0x559ad1
sub edi, 0
je 0x559b7e
dec edi
je 0x559b70
dec edi
je 0x559b62
dec edi
jne 0x559bd2
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x69
jmp 0x559bd2
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x5f
jmp 0x559bd2
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x55
jmp 0x559bd2
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x4b
jmp 0x559bd2
sub edi, 0
je 0x559ba9
dec edi
je 0x559ba5
dec edi
jne 0x559bd2
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x41
jmp 0x559bd2
push 0x3c
jmp 0x559bd1
push 0x32
jmp 0x559bd1
push 0x14
jmp 0x559bd1
push 5
jmp 0x559bd1
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x559bcf
cmp eax, 0xa
je 0x559bcb
cmp eax, 0x5a
jne 0x559bd2
push 0x28
jmp 0x559bd1
push 0x1e
jmp 0x559bd1
push 0xa
pop esi
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x350
ret
Function at 0x55a31b
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
push dword [0x765a2c]
call fcn.005717ab
mov esi, eax
test esi, esi
je 0x55a3f5
cmp dword [ebp + 0xc], 0
je 0x55a367
push 4
push dword [esi]
call dword [sym.imp.USER32.dll_GetWindow]
test eax, eax
je 0x55a358
cmp dword [esi + 0x1c], 0
jne 0x55a358
push eax
call dword [sym.imp.USER32.dll_SetActiveWindow]
push 0
push dword [esi]
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x55a3f5
test byte [ebp + 0x10], 3
je 0x55a382
push 4
push dword [esi]
call dword [sym.imp.USER32.dll_GetWindow]
push eax
push dword [ebp + 0x10]
push dword [esi]
call fcn.0055b7f7
cmp dword [esi + 0x3c], 0xffffffff
push ebx
je 0x55a3a7
xor ebx, ebx
cmp dword [esi + 0x3c], 0x1000000
sete bl
xor ecx, ecx
cmp dword [esi + 0x3c], 0x20000000
sete cl
or dword [esi + 0x3c], 0xffffffff
jmp 0x55a3bb
push dword [esi]
call dword [sym.imp.USER32.dll_IsZoomed]
push dword [esi]
mov ebx, eax
call dword [sym.imp.USER32.dll_IsIconic]
mov ecx, eax
test dword [ebp + 0x10], 0x2000000
je 0x55a3d8
test ebx, ebx
je 0x55a3cc
push 8
jmp 0x55a3de
neg ecx
sbb ecx, ecx
and ecx, 3
add ecx, 4
jmp 0x55a3eb
test ebx, ebx
je 0x55a3e1
push 3
pop ecx
jmp 0x55a3eb
xor eax, eax
test ecx, ecx
setne al
lea ecx, [eax + 1]
push ecx
push dword [esi]
call dword [sym.imp.USER32.dll_ShowWindow]
pop ebx
pop esi
pop ebp
ret 0xc

Function at 0x55a933
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
push dword [esp + 0xc]
xor esi, esi
push dword [0x765a2c]
call fcn.005717ab
mov edi, eax
test edi, edi
je 0x55a956
push dword [edi]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov esi, eax
push dword [esp + 0x10]
push esi
call fcn.00572d00
test esi, esi
je 0x55a973
lea ecx, [esi + 1]
push ecx
push eax
push dword [edi]
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x55a978
xor ecx, ecx
mov word [eax], cx
pop edi
pop esi
ret 8
Function at 0x55b98a
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
xor edi, edi
call dword [sym.imp.USER32.dll_GetFocus]
mov ebp, dword [esp + 0x3c]
mov ebx, eax
and dword [esp + 0x10], edi
push str.PB_WindowID
push ebp
call dword [sym.imp.USER32.dll_GetPropW]
mov esi, eax
push 9
pop eax
test esi, esi
je 0x55ba22
lea eax, [esp + 0x14]
push eax
push ebp
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
je 0x55ba1f
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x14], eax
jne 0x55ba1f
lea eax, [esi - 1]
push eax
push dword [0x765a2c]
call fcn.005717ab
mov edi, eax
mov dword [esp + 0x10], 1
xor eax, eax
push 9
cmp dword [edi + 0x10], eax
jle 0x55ba21
mov edx, dword [edi + 4]
xor ecx, ecx
pop esi
cmp word [ecx + edx + 2], si
jne 0x55ba16
mov esi, 0xfa01
push 9
cmp word [ecx + edx + 4], si
je 0x55bb09
pop esi
inc eax
add ecx, 6
cmp eax, dword [edi + 0x10]
jl 0x55b9fc
push 9
pop eax
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
test ebx, ebx
je 0x55bac8
push eax
call esi
test al, al
jns 0x55bac8
push 0x11
call esi
test al, al
js 0x55bac8
push 0x10
call esi
test al, al
js 0x55bac8
push 0x12
call esi
test al, al
js 0x55bac8
push 0x10
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClassNameW]
cmp dword [esp + 0x10], 0
jne 0x55bac8
push 5
lea eax, [esp + 0x1c]
push str.RichE
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
je 0x55ba9c
push 4
lea eax, [esp + 0x1c]
push str.RICHE
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x55bab3
push 0
push 0
push 0x44e
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, 0x800
je 0x55bb13
lea eax, [esp + 0x18]
push 0x60e078
push eax
call sub.MSVCRT.dll_wcscmp
pop ecx
pop ecx
test eax, eax
je 0x55bb13
test ebp, ebp
je 0x55baec
push 0x11
call esi
test al, al
js 0x55bae4
push 0x10
call esi
test al, al
js 0x55bae4
push 0x12
call esi
test al, al
jns 0x55baec
push 1
push ebp
call fcn.0055bb1f
test ebx, ebx
je 0x55bb00
push str.PB_Hotkey
push ebx
call dword [sym.imp.USER32.dll_GetPropW]
test eax, eax
jne 0x55bb13
test edi, edi
je 0x55bb13
mov eax, dword [edi + 8]
jmp 0x55bb15
and dword [esp + 0x14], 0
jmp 0x55ba21
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 4
Function at 0x55d7e3
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push edi
xor edi, edi
push edi
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x55d858
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x55d801
mov esi, 0x60d40c
push esi
call sub.MSVCRT.dll_wcslen
pop ecx
lea ebp, [eax*2 + 2]
push ebp
push 0x2002
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x55d84f
call dword [sym.imp.USER32.dll_EmptyClipboard]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x55d84f
push ebp
push esi
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
push 0xd
call dword [sym.imp.USER32.dll_SetClipboardData]
mov edi, eax
call dword [sym.imp.USER32.dll_CloseClipboard]
pop esi
pop ebp
pop ebx
mov eax, edi
pop edi
ret 4

Function at 0x55d85e
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor esi, esi
push esi
mov ebx, esi
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x55d89f
push 0xd
call dword [sym.imp.USER32.dll_GetClipboardData]
mov edi, eax
test edi, edi
je 0x55d897
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
test esi, esi
je 0x55d897
push esi
call sub.MSVCRT.dll_wcslen
pop ecx
mov ebx, eax
call dword [sym.imp.USER32.dll_CloseClipboard]
jmp 0x55d8a2
mov edi, dword [ebp + 8]
push dword [ebp + 8]
push ebx
call fcn.00572d00
test esi, esi
je 0x55d8ca
lea ecx, [ebx*2 + 2]
push ecx
push esi
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x55d8cf
xor ecx, ecx
mov word [eax], cx
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x55ddd1
Capabilities:
Set thread local storage value

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
xor ebx, ebx
push edi
mov edi, ebx
test esi, esi
je 0x55de2e
push esi
call dword [esi + 0x58]
mov ecx, dword [esi + 0x80]
mov edi, eax
mov dword [esi + 0x94], ecx
mov ecx, dword [esi + 0x84]
mov dword [esi + 0x98], ecx
test edi, edi
jne 0x55de2e
mov eax, dword [esi + 0x70]
test eax, eax
je 0x55de0d
push ebx
push esi
call eax
push esi
push ebx
push dword [0x760378]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push dword [0x765bc4]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [0x765bc0], ebx
mov eax, edi
pop edi
pop esi
pop ebx
ret 4
Function at 0x55e9f8
Capabilities:
Set thread local storage value

Disassembly:
push esi
push 0x184
push 8
push dword [0x760378]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
push esi
push dword [0x765bc4]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [esp + 8]
mov dword [0x765bc0], esi
and dword [esi + 0xa8], 0
or dword [esi + 0xac], 0xffffffff
or dword [esi + 0xb0], 0xffffffff
push esi
mov dword [esi + 0xa4], 0xffffff
mov dword [esi + 0x74], 2
mov dword [esi + 0x78], 0x3f
call fcn.0056162b
mov dword [esi + 0x58], 0x55f60b
mov eax, esi
mov dword [esi + 0x5c], 0x55f657
mov dword [esi + 0x10], fcn.0055f1ac
mov dword [esi + 0x30], 0x55f09e
mov dword [esi + 0x64], 0x55f6e1
mov dword [esi + 0x60], 0x55f699
mov dword [esi + 0x34], 0x55ed4e
mov dword [esi + 0x24], 0x55ed25
mov dword [esi + 0x28], 0x55ecfa
mov dword [esi + 0x2c], 0x55ec4c
mov dword [esi + 0x44], 0x55f411
pop esi
ret 4
Function at 0x5648f5
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
mov edx, dword [esp + 0x2c]
push esi
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0xd4]
mov dword [esp + 4], eax
test edx, edx
je 0x5649ab
imul eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
imul ecx, dword [esp + 0x28]
push ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
neg eax
add ecx, dword [esp + 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x28]
push ebp
push edi
lea edi, [ecx + eax*4]
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + 0xcc]
mov ebp, edi
imul ecx, ebx
add ecx, dword [esi + 0xc8]
add ecx, eax
cmp dword [esp + 0x38], 0
jle 0x56498b
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x10]
mov al, byte [ebp + 2]
xor byte [ecx + 2], al
mov al, byte [ebp + 1]
xor byte [ecx + 1], al
mov al, byte [ebp]
lea ebp, [ebp + 4]
xor byte [ecx], al
add ecx, esi
dec edx
jne 0x564966
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
dec edx
inc ebx
cmp dword [esi + 0xe8], 0
mov dword [esp + 0x3c], edx
jne 0x5649a0
add edi, dword [esp + 0x14]
jmp 0x5649a4
add edi, dword [esp + 0x24]
test edx, edx
jne 0x564944
pop edi
pop ebp
pop ebx
pop esi
pop ecx
pop ecx
ret 0x24

Function at 0x564cb6
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
push ecx
imul edx, dword [esp + 0x28], 3
push ebx
mov ebx, dword [esp + 0x30]
mov dword [esp + 8], edx
test ebx, ebx
je 0x564d90
imul eax, dword [esp + 0x1c], 3
mov ecx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x24]
neg ecx
push esi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
imul eax, dword [esp + 0x30]
push edi
imul edi, dword [esp + 0x30], 3
mov dword [esp + 0x10], ecx
add eax, dword [esp + 0x20]
add edi, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x38], edi
mov esi, dword [eax + 0xcc]
imul esi, ebp
mov dword [esp + 0x34], edi
add esi, dword [eax + 0xc8]
add esi, dword [esp + 0x28]
test edx, edx
jle 0x564d66
mov ebp, dword [esp + 0x34]
mov ebx, 0xff
sub ebx, dword [esp + 0x40]
mov edi, edx
movzx eax, byte [esi]
movzx ecx, byte [ebp]
imul ecx, dword [esp + 0x40]
imul eax, ebx
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
inc ebp
mov byte [esi], al
inc esi
dec edi
jne 0x564d2e
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
dec ebx
inc ebp
cmp dword [eax + 0xe8], 0
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x2c], ebp
jne 0x564d7d
add edi, ecx
jmp 0x564d81
add edi, dword [esp + 0x24]
mov dword [esp + 0x38], edi
test ebx, ebx
jne 0x564d04
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret 0x28
Function at 0x5653b0
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
push esi
mov esi, dword [esp + 0x30]
push edi
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 0xd4]
mov dword [esp + 8], eax
test esi, esi
je 0x565465
imul eax, dword [esp + 0x20]
imul edx, dword [esp + 0x28], 3
push ebx
mov ebx, dword [esp + 0x28]
push ebp
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x24]
neg eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x24]
imul eax, dword [esp + 0x34]
add eax, dword [esp + 0x20]
add edx, eax
mov eax, dword [esp + 0x28]
mov ecx, dword [edi + 0xcc]
mov ebp, edx
imul ecx, ebx
add ecx, dword [edi + 0xc8]
add ecx, eax
cmp dword [esp + 0x38], 0
jle 0x565446
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x10]
mov al, byte [ebp + 2]
xor byte [ecx + 2], al
mov al, byte [ebp + 1]
xor byte [ecx + 1], al
mov al, byte [ebp]
lea ebp, [ebp + 3]
xor byte [ecx], al
add ecx, edi
dec esi
jne 0x565421
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
dec esi
inc ebx
cmp dword [edi + 0xe8], 0
mov dword [esp + 0x3c], esi
jne 0x56545b
add edx, dword [esp + 0x14]
jmp 0x56545f
add edx, dword [esp + 0x24]
test esi, esi
jne 0x5653ff
pop ebp
pop ebx
pop edi
pop esi
pop ecx
pop ecx
ret 0x24
Function at 0x567739
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
push esi
push edi
xor edi, edi
push edi
push pe_nt_image_headers32
push 3
push edi
push 1
push closesocket
push dword [esp + 0x2c]
mov ebp, edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x5677bd
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
push edi
push dword [0x760378]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x5677b5
push ebp
lea eax, [esp + 0x1c]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5677a6
cmp dword [esp + 0x18], ebx
jne 0x5677a6
push ebx
push edi
push dword [esp + 0x1c]
call fcn.005675a1
mov ebp, eax
push edi
push 0
push dword [0x760378]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
ret 0xc

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

Disassembly:
sub esp, 0x50
push ebx
mov ebx, dword [esp + 0x5c]
push ebp
xor ebp, ebp
push esi
test ebx, ebx
je 0x56798e
mov esi, ebx
jmp 0x567998
push 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov esi, eax
test esi, esi
je 0x567a89
lea eax, [esp + 0x18]
push eax
push 0x18
pop eax
push eax
push dword [esp + 0x68]
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x567a7e
mov ebp, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push edi
mov edi, dword [esp + 0x24]
push 0x2c
push 0
push eax
mov dword [esp + 0x20], ebp
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [esp + 0x34], 0x28
xor eax, eax
mov dword [esp + 0x38], ebp
inc eax
mov dword [esp + 0x3c], edi
mov word [esp + 0x40], ax
xor ecx, ecx
push 0x18
pop eax
push ecx
push ecx
mov word [esp + 0x4a], ax
lea eax, [esp + 0x18]
push eax
push ecx
lea eax, [esp + 0x44]
mov dword [esp + 0x54], ecx
push eax
push esi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebp, eax
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x567a7d
push 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x18]
push edi
push 0
push dword [esp + 0x78]
push esi
call dword [sym.imp.GDI32.dll_GetDIBits]
imul edi, dword [esp + 0x14]
test edi, edi
jle 0x567a7d
mov ebx, dword [esp + 0x10]
push 3
pop ebp
movzx ecx, byte [ebx + 1]
movzx eax, byte [ebx + 2]
add eax, ecx
movzx ecx, byte [ebx]
add eax, ecx
cdq
idiv ebp
mov byte [ebx], al
mov ecx, dword [esp + 0x10]
mov byte [ecx + 1], al
mov ecx, dword [esp + 0x10]
mov byte [ecx + 2], al
mov ebx, dword [esp + 0x10]
add ebx, ebp
mov dword [esp + 0x10], ebx
dec edi
jne 0x567a46
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x18]
pop edi
test ebx, ebx
jne 0x567a89
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x50
ret 8
Function at 0x569c90
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x569cc2
push 0
lea ecx, [esp + 0x10]
push ecx
push esi
push dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x569cbd
cmp dword [esp + 0xc], esi
je 0x569cd9
pop edi
xor eax, eax
pop esi
ret
mov eax, dword [edi + 4]
add eax, dword [edi + 8]
push esi
push dword [esp + 0x14]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add dword [edi + 8], esi
pop edi
mov eax, 1
pop esi
ret

Function at 0x5732e0
Capabilities:
Query environment variable

Disassembly:
push str.EXPAT_ENTROPY_DEBUG
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x573344
mov ecx, 0x623fe8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x573317
test dl, dl
je 0x573313
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x573317
add eax, 2
add ecx, 2
test dl, dl
jne 0x5732f7
xor eax, eax
jmp 0x57331c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x573344
push 4
push dword [esp + 0xc]
push 8
push dword [esp + 0x10]
push str.Entropy:__s_____0x_0lx___lu_bytes__n
call dword [sym.imp.MSVCRT.dll___p__iob]
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x18
mov eax, dword [esp + 8]
ret
Function at 0x5776b0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
sub esp, 0xc
push esi
xor esi, esi
jmp 0x5776c0
push 4
lea eax, [esp + 8]
mov dword [esp + 8], 0
push eax
call sub.ADVAPI32.dll_SystemFunction036
test al, al
je 0x577711
mov edx, dword [esp + 4]
xor ecx, ecx
mov edi, edi
cmp esi, 4
jae 0x5776fb
mov eax, edx
shr eax, cl
add ecx, 8
mov byte [esp + esi + 8], al
inc esi
cmp ecx, 0x20
jb 0x5776e0
cmp esi, 4
jb 0x5776c0
push dword [esp + 8]
push str.rand_s
call fcn.005732e0
add esp, 8
pop esi
add esp, 0xc
ret
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov esi, dword [esp + 8]
xor esi, dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor eax, esi
imul eax, eax, 0x7fffffff
push eax
push str.fallback_4_
call fcn.005732e0
add esp, 8
pop esi
add esp, 0xc
ret

Function at 0x57b080
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
cmp dword [esp + 0x10], 0
jle 0x57b182
mov eax, dword [esp + 0xc]
push ebx
push ebp
push esi
mov ecx, dword [eax]
mov edx, dword [eax + 4]
push edi
jmp 0x57b0a0
mov edi, dword [eax + 8]
add ecx, edi
mov esi, dword [eax + 0xc]
adc edx, esi
mov dword [eax], ecx
mov dword [eax + 4], edx
xor ecx, ecx
mov edx, esi
shld esi, edi, 0xd
shr edx, 0x13
or ecx, esi
shl edi, 0xd
mov esi, dword [eax]
or edx, edi
mov edi, dword [eax + 0x18]
mov dword [eax + 8], edx
xor dword [eax + 8], esi
mov edx, dword [eax + 4]
mov dword [eax + 0xc], ecx
xor ecx, ecx
xor dword [eax + 0xc], edx
or ecx, esi
add dword [eax + 0x10], edi
mov esi, dword [eax + 0x1c]
adc dword [eax + 0x14], esi
mov ebp, dword [eax + 0x10]
mov ebx, dword [eax + 0x14]
mov dword [eax], edx
mov edx, esi
shld esi, edi, 0x10
mov dword [eax + 4], ecx
xor ecx, ecx
or ecx, esi
shr edx, 0x10
shl edi, 0x10
or edx, edi
mov dword [eax + 0x1c], ecx
xor dword [eax + 0x1c], ebx
mov esi, dword [eax + 0x1c]
mov dword [eax + 0x18], edx
mov edx, esi
xor dword [eax + 0x18], ebp
mov edi, dword [eax + 0x18]
add dword [eax], edi
adc dword [eax + 4], esi
xor ecx, ecx
shld esi, edi, 0x15
shr edx, 0xb
or ecx, esi
shl edi, 0x15
mov esi, dword [eax + 0xc]
or edx, edi
mov edi, dword [eax + 8]
mov dword [eax + 0x18], edx
mov edx, dword [eax + 4]
mov dword [eax + 0x1c], ecx
xor dword [eax + 0x1c], edx
mov edx, esi
mov ecx, dword [eax]
xor dword [eax + 0x18], ecx
add ebp, edi
adc ebx, esi
xor ecx, ecx
shld esi, edi, 0x11
shr edx, 0xf
or ecx, esi
shl edi, 0x11
or edx, edi
mov dword [eax + 0xc], ecx
xor ecx, ecx
mov dword [eax + 8], edx
mov esi, ebp
mov edx, ebx
xor dword [eax + 0xc], edx
or ecx, esi
xor dword [eax + 8], esi
dec dword [esp + 0x20]
mov dword [eax + 0x10], edx
mov edx, dword [eax + 4]
mov dword [eax + 0x14], ecx
mov ecx, dword [eax]
jne 0x57b0a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret