joyce8/EMBER2024-capa huggingface dataset:
Function at 0x546f80
Capabilities:
Copy file
Get common file path
Parse pe header
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x240
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx], 0
je 0x546f95
call fcn.00547140
push ebp
lea eax, [esp + 0x14c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x5d4cfc
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x14c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x254]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [ebx + 4]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push esi
push 0
push 0x5d5a84
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0
lea eax, [esp + 0x150]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x5470f3
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x1c]
push 0x40
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x14], 0x5a4d
jne 0x5470ec
mov eax, dword [esp + 0x50]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push eax
push edi
call ebp
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x5c]
push 0xf8
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x54], 0x4550
jne 0x5470ec
cmp dword [esp + 0x88], 0x80000000
jbe 0x5470ec
mov eax, dword [esp + 0x50]
push 0
push 0
push eax
push edi
mov dword [esp + 0x98], 0x10000000
call ebp
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x5c]
push 0xf8
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
push 8
push 0
push esi
call edi
test eax, eax
mov dword [ebx], eax
pop ebp
je 0x547118
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x240
ret 4
mov eax, dword [esp + 0x250]
push 8
push 0
push eax
mov byte [esi], 0
call edi
xor ecx, ecx
pop edi
test eax, eax
setne cl
mov dword [ebx], eax
pop esi
mov eax, ecx
pop ebx
add esp, 0x240
ret 4
Function at 0x5480d0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x148
push ebx
push ebp
mov ebp, ecx
mov ebx, dword [ebp + 4]
cmp ebx, 0xffffffff
jne 0x5480ef
pop ebp
xor al, al
pop ebx
add esp, 0x148
ret 0xc
mov edx, dword [esp + 0x158]
mov ecx, dword [esp + 0x154]
push esi
mov esi, dword [esp + 0x160]
push edi
mov edi, dword [ebp + 0xc]
cmp edx, 0x613
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], esi
jne 0x54818a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
cmp eax, 0x104
mov dword [esp + 0x20], eax
jbe 0x548144
mov eax, 0x104
mov byte [esi + 0x103], 0
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x4c], ecx
mov ecx, eax
mov dword [esp + 0x48], edx
mov edx, ecx
lea edi, [esp + 0x54]
mov dword [esp + 0x50], eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0
and ecx, 3
add eax, 0x10
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x48]
push ecx
push eax
mov eax, dword [ebp + 4]
push edx
push eax
jmp 0x5481e5
cmp edx, 0x619
jne 0x5481d6
mov eax, 0x10
mov dword [esp + 0x2c], edx
mov edx, dword [esi + 4]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov ecx, dword [esi]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x38], edx
lea edx, [esp + 0x10]
mov dword [esp + 0x34], ecx
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x3c], eax
push 0
push edx
lea eax, [esp + 0x2c]
push 0x20
mov dword [esp + 0x34], edi
mov dword [esp + 0x4c], ecx
push eax
jmp 0x5481e4
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x1c]
push 0x10
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
test eax, eax
jne 0x548215
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x548208
cmp eax, 0xe8
je 0x548208
cmp eax, 6
jne 0x548215
pop ebp
xor al, al
pop ebx
add esp, 0x148
ret 0xc
pop ebp
mov al, 1
pop ebx
add esp, 0x148
ret 0xc
Function at 0x548320
Capabilities:
Create pipe
Create two anonymous pipes

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esi + 4]
push edi
lea eax, [esi + 4]
cmp ecx, 0xffffffff
mov dword [esp + 0x10], eax
je 0x548342
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x10
ret
mov ebp, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff5
mov dword [esp + 0x18], 0xc
mov dword [esp + 0x20], 1
mov dword [esp + 0x1c], 0
call ebp
mov dword [esi + 0x134], eax
lea eax, [esp + 0x14]
lea ebx, [esi + 0x144]
push 0
lea edi, [esi + 0x140]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x548393
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x10
ret
mov ecx, dword [ebx]
push ecx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_SetStdHandle]
test eax, eax
jne 0x5483ac
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x10
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 2
push 0
lea edx, [esi + 8]
push 0
push edx
call ebx
push eax
mov eax, dword [edi]
push eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x5483d9
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x10
ret
mov ecx, dword [edi]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xfffffffffffffff6
call ebp
lea edx, [esp + 0x14]
mov dword [esi + 0x130], eax
lea edi, [esi + 0x13c]
push 0
add esi, 0x138
push edx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x548415
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x10
ret
mov eax, dword [esi]
push eax
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_SetStdHandle]
test eax, eax
jne 0x54842e
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x10
ret
mov ecx, dword [esp + 0x10]
push 2
push 0
push 0
push ecx
call ebx
mov edx, dword [edi]
push eax
push edx
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x548456
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x10
ret
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x10
ret

Function at 0x548470
Capabilities:
Create thread

Disassembly:
push ecx
push esi
mov esi, ecx
push edi
cmp dword [esi + 4], 0xffffffff
jne 0x548481
pop edi
xor eax, eax
pop esi
pop ecx
ret
mov eax, dword [esi + 0x130]
mov edi, dword [sym.imp.KERNEL32.dll_SetStdHandle]
push eax
push 0xfffffffffffffff6
call edi
test eax, eax
jne 0x54849a
pop edi
pop esi
pop ecx
ret
mov ecx, dword [esi + 0x134]
push ecx
push 0xfffffffffffffff5
call edi
test eax, eax
jne 0x5484ad
pop edi
pop esi
pop ecx
ret
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
test eax, eax
mov dword [esi + 0x10], eax
jne 0x5484c6
pop edi
pop esi
pop ecx
ret
lea edx, [esp + 8]
push edx
push 0
push esi
push 0x548570
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esp + 8]
mov dword [esi], eax
neg eax
sbb eax, eax
pop edi
and eax, ecx
pop esi
pop ecx
ret
Function at 0x5484f0
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 4], 0xffffffff
jne 0x5484fd
xor al, al
pop esi
ret
mov eax, dword [esi + 0x10]
test eax, eax
je 0x54850b
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x54853e
push 0x64
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x548533
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [esi]
push ecx
call edi
mov dword [esi], 0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x548550
push eax
call edi
mov dword [esi + 4], 0xffffffff
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
je 0x548562
push eax
call edi
mov dword [esi + 8], 0xffffffff
pop edi
mov al, 1
pop esi
ret

Function at 0x548920
Capabilities:
Encode data using xor

Disassembly:
push edi
mov edi, dword [esp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x5489b7
mov ecx, edi
push ebx
and ecx, 0xff
push esi
mov byte [0x878b49], cl
mov byte [0x878b48], 1
lea edx, [ecx + ecx*2 + 0x65]
lea ecx, [ecx + ecx*2 + 1]
mov dword [esp + 0x10], edx
mov esi, 4
lea ecx, [ecx + ecx*2]
lea edx, [ecx + 0x65]
inc ecx
test eax, eax
jle 0x54898c
push ebp
sub edi, 0x878b4c
mov ebp, eax
mov bl, byte [edi + esi + 0x878b48]
lea ecx, [ecx + ecx*2]
mov al, cl
add al, 0x65
xor bl, al
mov byte [esi + 0x878b48], bl
inc esi
inc ecx
dec ebp
jne 0x548970
pop ebp
mov bl, byte [esp + 0x10]
lea ecx, [esi - 4]
mov eax, ecx
mov byte [esi + 0x878b48], 0
sar eax, 8
xor al, bl
xor dl, cl
pop esi
mov byte [0x878b4a], al
pop ebx
mov byte [0x878b4b], dl
mov eax, 0x878b48
pop edi
ret
mov eax, 0x878b48
pop edi
ret

Function at 0x5489c0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x5489c9
ret
cmp byte [eax], 1
jne 0x548a24
movsx ecx, byte [eax + 1]
push ebx
mov bl, byte [eax + 2]
lea ecx, [ecx + ecx*2]
push esi
mov dl, cl
push edi
add dl, 0x65
lea ecx, [ecx + ecx*2 + 3]
xor bl, dl
mov dl, cl
mov byte [eax + 2], bl
mov bl, byte [eax + 3]
add dl, 0x65
xor esi, esi
xor bl, dl
xor edx, edx
mov dh, byte [eax + 2]
inc ecx
mov dl, bl
mov byte [eax + 3], bl
mov edi, edx
test edi, edi
jle 0x548a1d
mov bl, byte [esi + eax + 4]
lea ecx, [ecx + ecx*2]
mov dl, cl
add dl, 0x65
xor bl, dl
inc ecx
mov byte [esi + eax], bl
inc esi
cmp esi, edi
jl 0x548a06
mov byte [edi + eax], 0
pop edi
pop esi
pop ebx
ret
Function at 0x548a30
Capabilities:
Encode data using xor

Disassembly:
mov al, byte [0x878b40]
sub esp, 0x40c
test al, 1
push ebx
push edi
jne 0x548a64
mov bl, al
push 0x878ac0
or bl, 1
mov byte [0x878b40], bl
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x548c00
call fcn.00549335
add esp, 4
mov edi, dword [esp + 0x418]
test edi, edi
jne 0x548a7a
pop edi
xor eax, eax
pop ebx
add esp, 0x40c
ret
push ebp
push esi
push 0x878ac0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [edi], 1
jne 0x548adc
movsx eax, byte [edi + 1]
mov dl, byte [edi + 2]
mov bl, byte [edi + 3]
lea eax, [eax + eax*2]
xor esi, esi
mov cl, al
add cl, 0x65
lea eax, [eax + eax*2 + 3]
xor dl, cl
xor ecx, ecx
mov byte [edi + 2], dl
mov ch, byte [edi + 2]
mov dl, al
add dl, 0x65
xor bl, dl
inc eax
mov cl, bl
mov byte [edi + 3], bl
mov ebp, ecx
test ebp, ebp
jle 0x548ad8
mov cl, byte [esi + edi + 4]
lea eax, [eax + eax*2]
mov dl, al
add dl, 0x65
xor cl, dl
inc eax
mov byte [esi + edi], cl
inc esi
cmp esi, ebp
jl 0x548ac1
mov byte [edi + ebp], 0
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, 1
mov ecx, 0x878adc
cmp dword [ecx], eax
je 0x548b00
add ecx, 4
inc edx
cmp ecx, 0x878b00
jl 0x548aee
jmp 0x548b06
test edx, edx
mov ebx, edx
jne 0x548b21
mov ecx, dword [0x878f48]
cmp ecx, 9
jae 0x548b21
inc ecx
mov dword [0x878f48], ecx
mov ebx, ecx
mov dword [ecx*4 + 0x878ad8], eax
mov esi, dword [ebx*4 + 0x878b00]
mov dword [ebx*4 + 0x878b00], edi
test esi, esi
je 0x548bdb
cmp esi, edi
je 0x548bdb
cmp byte [edi], 1
je 0x548bdb
cmp byte [esi], 1
je 0x548bdb
lea edx, [esp + 0x1c]
push esi
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
mov dword [esp + 0x18], eax
je 0x548bdb
lea ecx, [esp + 0x1c]
mov byte [esi], 1
and ecx, 0xff
mov ebp, 4
mov byte [esi + 1], cl
lea edx, [ecx + ecx*2 + 0x65]
lea ecx, [ecx + ecx*2 + 1]
mov dword [esp + 0x14], edx
xor edx, edx
lea ecx, [ecx + ecx*2]
lea ebx, [ecx + 0x65]
inc ecx
test eax, eax
mov dword [esp + 0x10], ebx
jle 0x548bc1
mov bl, byte [esp + edx + 0x1c]
lea ecx, [ecx + ecx*2]
mov al, cl
add al, 0x65
xor bl, al
mov eax, dword [esp + 0x18]
mov byte [esi + ebp], bl
inc ebp
inc ecx
inc edx
cmp edx, eax
jl 0x548ba2
mov ebx, dword [esp + 0x10]
mov dl, byte [esp + 0x14]
lea eax, [ebp - 4]
mov ecx, eax
mov byte [esi + ebp], 0
sar ecx, 8
xor cl, dl
xor bl, al
mov byte [esi + 2], cl
mov byte [esi + 3], bl
push 0x878ac0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
mov eax, edi
pop ebp
pop edi
pop ebx
add esp, 0x40c
ret

Function at 0x548e90
Capabilities:
Hash data with crc32

Disassembly:
push ebx
push esi
mov eax, ecx
push edi
xor esi, esi
mov edi, eax
mov edx, esi
mov ebx, 8
test dl, 1
je 0x548eaf
shr edx, 1
xor edx, 0xedb88320
jmp 0x548eb1
shr edx, 1
dec ebx
jne 0x548ea0
mov dword [edi], edx
inc esi
add edi, 4
cmp esi, 0x100
jl 0x548e99
pop edi
pop esi
pop ebx
ret
Function at 0x548ed0
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
mov eax, 0x1004
call fcn.0054d230
mov eax, dword [esp + 0x1008]
push ebp
push esi
mov esi, dword [esp + 0x1014]
test eax, eax
push edi
mov ebp, ecx
mov dword [esi], 0xffffffff
je 0x548fd5
cmp byte [eax], 0
je 0x548fd5
push 0
push 0x80
push 3
push 0
push 3
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x548f3c
pop edi
mov dword [ebp + 0x400], 2
pop esi
xor al, al
pop ebp
add esp, 0x1004
ret 8
push ebx
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x1c]
push 0x1000
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x548faf
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x548fab
lea ecx, [esp + ecx + 0x14]
lea edx, [esp + 0x14]
cmp edx, ecx
lea eax, [esp + 0x14]
jae 0x548f8d
xor edx, edx
xor ebx, ebx
mov dl, byte [esi]
mov bl, byte [eax]
xor edx, ebx
mov ebx, dword [esi]
shr ebx, 8
mov edx, dword [ebp + edx*4]
xor edx, ebx
inc eax
cmp eax, ecx
mov dword [esi], edx
jb 0x548f71
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x1c]
push 0x1000
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x548f59
jmp 0x548faf
test eax, eax
jne 0x548fb9
mov dword [ebp + 0x400], 3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi]
pop ebx
not edx
mov dword [esi], edx
pop edi
pop esi
mov al, 1
pop ebp
add esp, 0x1004
ret 8
pop edi
mov dword [ebp + 0x400], 1
pop esi
xor al, al
pop ebp
add esp, 0x1004
ret 8

Function at 0x549172
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.0054d230
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x54920d
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x879470]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x54920d
cmp eax, 1
je 0x54922e
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x54920d
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x5491da
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x549209
xor eax, eax
inc eax
jmp 0x54924d
cmp edi, eax
jae 0x549211
xor eax, eax
jmp 0x54924d
cmp eax, esi
jae 0x549218
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x879470]
jmp 0x549231
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x54a9e5
Capabilities:
Create thread
Resume thread

Disassembly:
push ebx
push edi
mov edi, dword [esp + 0xc]
xor ebx, ebx
test edi, edi
jne 0x54aa01
call fcn.0054b875
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x54aa73
push esi
push 0x8c
push 1
call fcn.00550554
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x54aa59
push esi
call fcn.0054f630
mov eax, dword [esp + 0x1c]
pop ecx
push esi
push 4
push esi
push 0x54a953
push dword [esp + 0x24]
mov dword [esi + 0x4c], edi
push 0
mov dword [esi + 0x50], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
test edi, edi
mov dword [esi + 4], edi
je 0x54aa51
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x54aa70
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.00549048
test ebx, ebx
pop ecx
je 0x54aa6b
push ebx
call fcn.0054b887
pop ecx
or eax, 0xffffffff
jmp 0x54aa72
mov eax, edi
pop esi
pop edi
pop ebx
ret

Function at 0x54bb1f
Capabilities:
Terminate process

Disassembly:
push 8
push 0x568828
call fcn.0054cc10
push 8
call fcn.0054e016
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x8794b0], esi
jne 0x54bb53
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x8794ac], esi
mov al, byte [ebp + 0x10]
mov byte [0x8794a8], al
cmp dword [ebp + 0xc], edi
jne 0x54bb9d
cmp dword [0x9029f0], edi
je 0x54bb8d
mov eax, dword [0x9029ec]
sub eax, 4
mov dword [0x9029ec], eax
cmp eax, dword [0x9029f0]
jb 0x54bb8d
mov eax, dword [eax]
cmp eax, edi
je 0x54bb6e
call eax
jmp 0x54bb6e
push 0x592948
mov eax, 0x592940
call fcn.0054ba9d
pop ecx
push 0x592954
mov eax, 0x59294c
call fcn.0054ba9d
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x54bbce
cmp dword [ebp + 0x10], edi
jne 0x54bbdc
mov dword [0x8794b0], esi
push dword [ebp + 8]
call fcn.0054ba5b
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x54bbdb
push 8
call fcn.0054df61
pop ecx
ret
call fcn.0054cc4b
ret
Function at 0x54bc6b
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x568838
call fcn.0054cc10
mov edi, 0x94
mov eax, edi
call fcn.0054d230
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x879470], ecx
mov eax, dword [esi + 4]
mov dword [0x87947c], eax
mov edx, dword [esi + 8]
mov dword [0x879480], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x879474], esi
cmp ecx, 2
je 0x54bccb
or esi, 0x8000
mov dword [0x879474], esi
shl eax, 8
add eax, edx
mov dword [0x879478], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x54bd06
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x54bd06
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x54bd1e
cmp eax, 0x20b
je 0x54bd0b
mov dword [ebp - 0x1c], esi
jmp 0x54bd32
cmp dword [ecx + 0x84], 0xe
jbe 0x54bd06
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x54bd2c
cmp dword [ecx + 0x74], 0xe
jbe 0x54bd06
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0054de72
pop ecx
test eax, eax
jne 0x54bd46
push 0x1c
call fcn.0054bc47
pop ecx
call fcn.0054f82a
test eax, eax
jne 0x54bd57
push 0x10
call fcn.0054bc47
pop ecx
call fcn.00552a2a
mov dword [ebp - 4], esi
call fcn.00551f93
test eax, eax
jge 0x54bd70
push 0x1b
call fcn.0054bc22
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x9029e4], eax
call fcn.00552f94
mov dword [0x8794b4], eax
call fcn.00552ef2
test eax, eax
jge 0x54bd96
push 8
call fcn.0054bc22
pop ecx
call fcn.00552cbf
test eax, eax
jge 0x54bda7
push 9
call fcn.0054bc22
pop ecx
push 1
call fcn.0054bab5
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x54bdbd
push eax
call fcn.0054bc22
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00552c62
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x54bdde
movzx eax, word [ebp - 0x40]
jmp 0x54bde1
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0040c180
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x54bdff
push edi
call fcn.0054bbe2
call fcn.0054bc04
jmp 0x54be31
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0054cc4b
ret

Function at 0x54d1e5
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x54d205
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0054b887
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x54d228
test byte [esp + 8], 2
je 0x54d228
call fcn.0054b875
mov dword [eax], 0xd
call fcn.0054b87e
mov dword [eax], 5
jmp 0x54d201
xor eax, eax
ret
Function at 0x55186a
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x5d7064]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x55189b
xor eax, eax
jmp 0x551a24
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x902680]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x5518d7
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00557207
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x5519b2
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x5519f0
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x55193b
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x55192c
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x55190c
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x55197b
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x551984
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x5518fd
jmp 0x551986
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x551a1f
cmp dword [ebp - 0x6c], edi
je 0x5519f0
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x5519e5
call fcn.0054b875
mov dword [eax], 9
call fcn.0054b87e
mov dword [eax], esi
jmp 0x551a1a
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5519da
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x551986
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x551986
push dword [ebp - 0x6c]
call fcn.0054b887
pop ecx
jmp 0x551a1a
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x551a08
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x551a08
xor eax, eax
jmp 0x551a22
call fcn.0054b875
mov dword [eax], 0x1c
call fcn.0054b87e
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x551a22
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.0054bec8
add ebp, 0x3a0
leave
ret