joyce8/EMBER2024-capa huggingface dataset:
Function at 0x224910
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x265417
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, dword [esp + 0x3c]
lea eax, [esp + 0x18]
xor ebx, ebx
push edi
mov esi, ecx
push eax
mov dword [esp + 0x14], ebx
call fcn.002247c0
lea ecx, [esp + 0x10]
lea edx, [esp + 0x18]
push ecx
push 0x64
push edx
push esi
mov dword [esp + 0x40], 1
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ebx
call fcn.002249d0
mov esi, dword [esp + 0x48]
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
push eax
push ecx
mov byte [esp + 0x48], 2
mov dword [esi + 0xc], 0x40
call fcn.00224620
mov edx, dword [esp + 0x38]
mov dword [esi], eax
neg eax
sbb eax, eax
mov dword [esp + 0x24], 1
and eax, edx
mov dword [esi + 8], eax
mov dword [esi + 4], eax
mov edx, dword [esp + 0x30]
mov byte [esp + 0x48], bl
push edx
mov dword [esp + 0x3c], ebx
call fcn.00253f01
mov ecx, dword [esp + 0x44]
add esp, 0x1c
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x28
ret 8
Function at 0x22d270
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0x363eb8]
xor edx, edx
cmp eax, edx
jne 0x22d296
xor eax, eax
mov byte [eax + 0x363db8], al
inc eax
cmp eax, 0x100
jl 0x22d27e
mov dword [0x363eb8], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0x363db8
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x22d327
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x22d2fa
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x22d2c8
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x22d3a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x22d3f3
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x22d3da
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x233d70
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x2657be
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.00234690
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0x30e6f4
call fcn.00253ed8
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x233e03
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.00253ed8
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x233dfc
push 0
mov ecx, eax
call fcn.0022aea0
mov dword [esi + 0xc], eax
jmp 0x233e05
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x233e05
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x256577
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x2565af
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.002545f2
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.002545ca
jmp 0x2565bb
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x257d7a
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x257dbc
call fcn.0025dfa2
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x257dbc
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x257db3
xor eax, eax
jmp 0x257dc4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00257dca
pop edi
pop esi
pop ebx
ret 4

Function at 0x25e4d2
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x25e500
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x25e51e
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0025e438
jmp 0x25e51e
mov eax, dword [esi + 0x14]
test eax, eax
je 0x25e51e
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0025e438
test edi, edi
mov eax, edi
jne 0x25e508
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4062c8
Capabilities:
Get file size

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
test esi, esi
mov dword [0x4265e8], 0x55004e
mov dword [0x4265ec], 0x4c
mov edi, 0x400
mov ebp, 0x4265e8
je 0x40631e
push 1
push 0
push esi
call fcn.00406172
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x40643d
cmp eax, edi
jg 0x40643d
mov esi, 0x426de8
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x40643d
cmp eax, edi
jg 0x40643d
push esi
push ebp
push 0x40a5c0
push 0x4261e8
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x429a70]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.004066bf
push 4
push 0xc0000000
push esi
call fcn.00406172
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x18], ebp
je 0x40643d
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x406436
push edi
push esi
push ebp
call fcn.004061f5
test eax, eax
je 0x406436
push 0x40a5b4
push esi
call fcn.004060d7
test eax, eax
jne 0x4063d4
lea eax, [esi + edi]
push 0x40a5b4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x406409
add eax, 0xa
push 0x40a5b0
push eax
call fcn.004060d7
mov ebp, eax
test ebp, ebp
je 0x406405
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x4063f6
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x4063f0
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x18]
jmp 0x40640b
mov ebp, dword [esp + 0x18]
mov eax, edi
push ebx
add eax, esi
push 0x4261e8
push eax
call fcn.0040612d
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add edi, ebx
push edi
push esi
push ebp
call fcn.00406224
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x406442
Capabilities:
Move file

Disassembly:
push 5
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x406465
push dword [esp + 8]
push dword [esp + 8]
call fcn.004062c8
pop ecx
pop ecx
inc dword [0x429af0]
ret 8
Function at 0x406a06
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
lea eax, [ebp - 0x23c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x406a2a
xor eax, eax
test eax, eax
je 0x406a3d
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x406a3d
xor ecx, ecx
jmp 0x406a40
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x40a014]
lea eax, [ebp + eax*2 - 0x23c]
push ecx
push 0x40a5e0
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x23c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

Function at 0x406b63
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x4275ec], 0
push esi
jne 0x406b9a
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 0x406b74
mov dword [ecx*4 + 0x4275e8], eax
inc ecx
cmp ecx, 0x100
jl 0x406b6f
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406bcb
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 + 0x4275e8]
xor eax, esi
inc ecx
dec edx
jne 0x406bad
pop edi
not eax
pop esi
ret 0xc
Function at 0x401e40
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, dword [ebx - 0x7d]
in al, dx
js 0x401e9d
and dh, byte [ebp + 0xc]
push esi
lea eax, [ebp - 0x78]
push 0x78
push eax
push esi
call 0x47d8a9e0
mov ecx, dword [ebp + 8]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
pop edi
popal
add edx, 0x40
lodsb al, byte [si]
aam 0x40
add byte [0xa18015ff], bh
inc eax
add byte [ecx + 0x4102ac], ah
add esp, 0x14
test eax, eax
je 0x401eaa
push eax
push 0x402d54
call dword [0x57f6e464]
add esp, 8
push esi
call dword [sym.imp.WSOCK32.dll_WSAStartup]
pop esi
nop
nop
nop
nop
nop
nop
dec ebx
nop
nop
nop
xor eax, 0x568bce90
adc ecx, 0x14
test byte [esi - 0x29], dl
jne 0x401eb3
or byte [edi - 0x75], dl
inc esi
popal
push edi
mov eax, dword [esi + 0x61]
xchg ebp, eax
xor al, 8
call fcn.004069b7
mov dword [0x410ba0], eax
add byte [ebx], cl
add byte [ebx + 0x410ba0], ah
mov dword [0x4157a4], edx
mov ebx, eax
invalid

Function at 0x405f20
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
cmp dword [eax - 0x24b7fe68], 0x410388a1
add byte [ebx - 0x36a7bf38], cl
mov dword [0x417f88], eax
je 0x405f40
xor eax, eax
mov esp, ebp
add dword [edx - 0x17], esp
push ebp
adc dl, byte [edx - 0x18]
xlatb
inc edi
add ah, dh
add esp, 4
test eax, eax
jne 0x575fd6
jmp 0xe892719a
popfd
sbb dword [eax + 0x1d], esp
inc eax
xor eax, 0x9b0954a3
mov edx, 0xffe9bc20
inc dword [ebp + 0x507345c0]
outsb dx, byte [esi]
push eax
lea esp, [ebp - 4]
push eax
call fcn.00404ec0
test eax, eax
je 0x405f81
mov eax, 0x4e3d
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
push 0x37407c24
push ecx
call 0xc140564b
lea edx, [ebp - 0x860198]
push edx
push 0xffffffffffffffba
call dword [sym.imp.WSOCK32.dll_WSAStartup]
and eax, eax
jne 0x405fdb
mov bp, dx
push 0x3cff06fe
add dh, byte [ebp - 0x3e]
xor ecx, ecx
mov al, dl
test cl, cl
jne 0x405ffa
mov edx, dword [ebp - 4]
push edx
call 0x6ba436
mov eax, dword [ebp + 0x50]
push eax
call fcn.0040a411
add esp, 8
xor eax, eax
pop ebx
in eax, 0x1c
ret
mov esp, dword [edi + 0x5d]
mov ah, byte [ecx - 0x6df0fc78]
dec eax
mov dword [0xc00388], eax
test al, 0x17
call fcn.00404a20
call dword [0xc1edb3]
mov eax, dword [0x410954]
or dword [ecx], eax
push ebx
call dword [0xee8d64]
ret
Function at 0x4089d0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov esi, 0x5d8b53ec
or al, 0xc7
mov esi, dword [ebp + 8]
push edi
lcall 0x6d53, 0x6a107d
push 0x200400
push edi
push 0x4c
push 0x1200
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
test eax, eax
jne 0x408a3e
mov ecx, dword [str.Interrupted_system_call]
test ecx, ecx
je 0x408a5f
cmp dword [ebp + eax*8 + 0x40c318], esp
je 0x408a1b
mov ecx, dword [eax*8 + 0x40c324]
inc eax
test ecx, ecx
jne 0x408a04
jmp 0x408a5f
mov esp, dword [ebp + 0x40ba1cc5]
add byte [ebx + 0x50], dl
and ch, al
sub al, 0x1b
add byte [eax], al
inc esp
inc byte [ebx - 0x3fcc0037]
repne scasb al, byte es:[edi]
not ecx
dec ecx
xchg edi, eax
sar dword [esi + 0x74c08522], 0x31
mov cl, byte [eax + esi + 0x3f]
dec eax
cmp cl, 0xd
je 0x408a4d
cmp cl, 0xa
jne 0x408a51
imul eax, dword [eax + esi], 0x7b
test dword [esi*2 + 0x5fc68b28], esi
pop bx
pop ebp
ret
push edi
push 0x41008f
push ebx
sbb al, ch
adc al, 0xfc
invalid

Function at 0x40a340
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x8b4a084d]
inc ecx
adc eax, 0x1175c985
pushal
push cs
or al, 0x51
sbb al, 0x15
sub al, 0xc0
inc eax
insd dword es:[edi], dx
invalid

Function at 0x40a3a0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push 0x25a280
fmul qword [ebx + 0x74e85000]
mov bl, 0xff
sub dword [ebp - 0x3e], ebx
add al, 0
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, 0x4c2c0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
push ebp
dec esi
in al, dx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
add dword [eax], 0x74
xor ecx, dword [ebx + 0x50510c4d]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test dword [esi + 0x75], edi
push ds
push esi
mov ebx, dword [ebx]
cwde
shl byte [ebp + edi - 0x3f88da01], 0x75
add eax, 0x8c25d5e

Function at 0x40b2d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov dh, 0xec
push ecx
push esi
mov esp, ecx
or byte [edx - 0x3f7bd3ba], cl
je 0x8940b344
xor cl, byte [esi + 0x48]
xor eax, eax
push ebx
xor dword [edi + 1], 0x57
mov dword [ebp - 4], eax
mov dword [ebp + 8], eax
push fs
pushfd
add byte [eax], al
xor byte [ebx - 0x7c4c382], cl
je 0x40b3e0
ror byte [esi], cl
cmp byte [ebx + 0x976ff4c], al
or eax, 0xffffffff
add eax, 0x3cc78b02
push esi
add al, 0x8d
dec ebp
cld
push 0xffffffffffffffbc
push ecx
push eax
ja 0x40b371
call dword [sym.imp.KERNEL32.dll_WriteFile]
test dword [ebx + 0x458b2f74], ebp
cld
scasd eax, dword es:[edi]
push esi
push eax
mov ecx, dword [esi + 0x54]
add edx, eax
dec ebx
rol dword [eax], 1
retf 0x3f8
inc ebp
inc edi
mov eax, dword [ebp - 4]
mov edx, dword [esi + 0x50]
mov ecx, dword [esi + 0x54]
add edx, eax
mov ebx, dword [ecx]
or byte [ecx - 0x3c74afaa], cl
add byte [ebp + 0x544e89c0], al
pop esp
pop es
invalid
Function at 0x401497
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
mov eax, dword [0x4705f0]
or eax, 8
push eax
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x40152c
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov edi, 0x105
jmp 0x4014e9
cmp dword [ebp + 0x10], ebx
jne 0x401520
push ebx
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 4]
call fcn.00401497
test eax, eax
jne 0x4014fb
push edi
lea eax, [ebp - 0x210]
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x4014d0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.00405d5c
cmp eax, ebx
je 0x401533
push ebx
push dword [0x4705f0]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x40152c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp dword [0x4705f0], ebx
jne 0x401529
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x401529
jmp 0x40152c
Function at 0x402f53
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [0x42e19c]
sub esi, dword [0x4321a8]
push edi
add esi, dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x1f4
xor edi, edi
mov dword [0x470560], eax
cmp esi, edi
jle 0x4030fd
push dword [0x4321a4]
call fcn.00402f3c
push edi
push edi
push dword [0x4321a8]
push dword [0x40a014]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x42e198], esi
mov dword [0x41e10c], edi
mov eax, dword [0x4321a0]
sub eax, dword [0x4321a4]
mov ebx, 0x4000
cmp eax, ebx
jg 0x402fc5
mov ebx, eax
push ebx
mov esi, 0x42e1a0
push esi
call fcn.00402f0a
test eax, eax
je 0x40310e
add dword [0x4321a4], ebx
mov dword [0x426128], esi
mov dword [0x42612c], ebx
cmp dword [0x47050c], edi
je 0x40301b
cmp dword [0x4705e0], edi
jne 0x40301b
mov eax, dword [0x42e198]
sub eax, dword [0x42e19c]
push edi
sub eax, dword [ebp + 8]
add eax, dword [0x4321a8]
mov dword [0x41e10c], eax
call fcn.00402e68
pop ecx
mov ecx, 0x426110
mov dword [0x426130], 0x426198
mov dword [0x426134], 0x8000
call fcn.00406d01
test eax, eax
js 0x403113
mov esi, dword [0x426130]
mov ecx, 0x426198
sub esi, ecx
je 0x4030ca
mov ax, word [0x470512]
mov byte [ebp - 4], ah
mov byte [ebp - 3], al
mov eax, dword [0x470510]
mov edx, eax
sar edx, 8
mov byte [ebp - 1], al
xor eax, eax
mov byte [ebp - 2], dl
cmp esi, edi
jle 0x40309a
mov edx, dword [0x4321ac]
and edx, 0x80000003
jns 0x403085
dec edx
or edx, 0xfffffffc
inc edx
mov dl, byte [ebp + edx - 4]
xor byte [eax + 0x426198], dl
inc dword [0x4321ac]
inc eax
cmp eax, esi
jl 0x403072
push edi
lea eax, [ebp - 8]
push eax
push esi
push ecx
push dword [0x40a014]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403118
cmp esi, dword [ebp - 8]
jne 0x403118
add dword [0x4321a8], esi
cmp dword [0x42612c], edi
jne 0x402feb
jmp 0x4030d6
cmp dword [0x42612c], edi
jne 0x403113
cmp ebx, edi
je 0x403113
mov eax, dword [0x42e19c]
mov ecx, eax
sub ecx, dword [0x4321a8]
add ecx, dword [ebp + 8]
test ecx, ecx
jg 0x402faf
push edi
push edi
push eax
push dword [0x40a014]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
call fcn.00402e68
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
or eax, 0xffffffff
jmp 0x403107
push 0xfffffffffffffffd
pop eax
jmp 0x403107
push 0xfffffffffffffffe
jmp 0x403115
Function at 0x40311c
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x403146
add eax, dword [0x470558]
push edi
push edi
push eax
push dword [0x40a014]
mov dword [0x42e19c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.00402f53
cmp eax, edi
jl 0x40323f
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp + 8]
push eax
push dword [0x40a014]
call ebx
test eax, eax
je 0x40323b
cmp dword [ebp - 4], esi
jne 0x40323b
push dword [ebp + 8]
add dword [0x42e19c], esi
call fcn.00402f53
mov dword [ebp - 8], eax
cmp eax, edi
jl 0x40323e
cmp dword [ebp + 0x10], edi
jne 0x40320a
cmp dword [ebp + 8], edi
jle 0x403236
mov esi, 0x42e1a0
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x4031ba
mov edi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [0x40a014]
call ebx
test eax, eax
je 0x40323b
cmp edi, dword [ebp - 4]
jne 0x40323b
push 0
lea eax, [ebp + 0x14]
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403206
cmp dword [ebp + 0x14], edi
jne 0x403206
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x42e19c], eax
cmp dword [ebp + 8], 0
jg 0x4031ad
jmp 0x403236
push 0xfffffffffffffffe
jmp 0x40323d
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403215
mov eax, dword [ebp + 0x14]
push edi
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x40a014]
call ebx
test eax, eax
je 0x40323b
mov eax, dword [ebp - 4]
add dword [0x42e19c], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x40323e
push 0xfffffffffffffffd
pop eax
pop ebx
pop edi
pop esi
leave
ret 0x10
Function at 0x40588d
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
push eax
push 0x4561f8
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push dword [ebp + 8]
mov dword [0x4561f8], 0x44
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x4058c8
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x405a7e
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x405a9b
and eax, 0xfffffffe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
ret 4

Function at 0x405a9e
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea ecx, [eax + 1]
push 0
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
ret 0xc

Function at 0x405acd
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
mov eax, dword [0x4088f4]
mov dword [ebp - 8], eax
mov eax, dword [0x4088f8]
dec edi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
pop ecx
xor edx, edx
div ecx
push esi
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
add word [ebp - 4], dx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x405b1d
test edi, edi
jne 0x405ada
mov word [esi], ax
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x405b17

Function at 0x405b21
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x14]
xor eax, eax
mov word [esi], ax
lea eax, [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405b9a
lea eax, [ebp + 0xc]
push eax
push esi
lea eax, [ebp + 0x14]
push eax
push 0
push dword [ebp + 0x10]
mov dword [ebp + 0xc], 0x4000
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405b83
cmp dword [ebp + 0x14], 1
je 0x405b88
cmp dword [ebp + 0x14], 2
je 0x405b88
xor eax, eax
mov word [esi], ax
push dword [ebp + 0x18]
xor eax, eax
mov word [esi + 0x3ffe], ax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
ret 0x14
Function at 0x4061de
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x456240
push esi
call fcn.00405c57
push esi
call fcn.004059a7
mov edi, eax
test edi, edi
jne 0x4061ff
xor eax, eax
jmp 0x40625c
push edi
call fcn.00405c86
test byte [0x470568], 0x80
je 0x40621b
movzx eax, word [edi]
test ax, ax
je 0x4061fb
cmp eax, 0x5c
je 0x4061fb
sub edi, esi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
sar edi, 1
jmp 0x40623d
push esi
call fcn.00405d35
test eax, eax
je 0x406237
test byte [eax], 0x10
je 0x406261
push esi
call fcn.004061b1
push esi
call ebx
cmp eax, edi
jg 0x406228
push esi
call fcn.00406182
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop ebx
pop edi
pop esi
ret 4
xor eax, eax
jmp 0x40625b