joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5fda4c50
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x14
lea eax, [esp]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x5fda4c85
push 0
push 0x10
push 0
push 0
push 0x4f5
push 0
call fcn.5fda25f0
xor eax, eax
add esp, 0x14
ret
lea eax, [esp + 8]
push eax
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
lea ecx, [esp + 4]
push 0
mov edx, dword [esp + 4]
push 0
mov dword [esp + 0xc], 1
mov dword [esp + 0x18], 2
push 0
push ecx
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 0
test eax, eax
jne 0x5fda4cdd
push 0x10
push 0
push 0
push 0x4f6
push 0
call fcn.5fda25f0
xor eax, eax
add esp, 0x14
ret
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x5fda4d03
push 0
push 0x10
push 0
push 0
push 0x4f7
push 0
call fcn.5fda25f0
xor eax, eax
add esp, 0x14
ret
mov eax, 1
add esp, 0x14
ret

Function at 0x5fda4d10
Capabilities:
Shutdown system

Disassembly:
push esi
push edi
mov esi, dword [esp + 0xc]
mov edi, 2
test esi, 2
jne 0x5fda4d2a
call fcn.5fda4c10
mov edi, eax
cmp edi, 2
jne 0x5fda4d79
test esi, 4
mov eax, 6
jne 0x5fda4d53
push 4
push 0x40
push 0
push 0x5fdaf220
push 0x522
push 0
call fcn.5fda25f0
cmp eax, 6
jne 0x5fda4d79
cmp edi, 2
jne 0x5fda4d79
cmp word [0x5fdb4f34], 0
jne 0x5fda4d74
push 0
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
pop edi
pop esi
ret
call fcn.5fda4c50
pop edi
pop esi
ret

Function at 0x5fda4d80
Capabilities:
Delete registry value
Persist via run registry key

Disassembly:
sub esp, 4
cmp byte [0x5fdaf560], 0
je 0x5fda4dc7
lea eax, [esp]
push eax
push 0xf003f
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRunOnce
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x5fda4dc7
mov eax, dword [esp]
push 0x5fdaf560
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ecx, dword [esp]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 4
ret
Function at 0x5fda4dd0
Capabilities:
Persist via run registry key
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x110
lea eax, [esp + 8]
push ebx
lea ecx, [esp + 4]
push esi
push edi
push eax
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRunOnce
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x5fda4f32
xor ebx, ebx
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push ebx
push str.wextract_cleanup_d
push 0x5fdaf560
call esi
lea eax, [esp + 0x1c]
mov ecx, dword [esp + 0x18]
add esp, 0xc
push eax
push 0
push 0
push 0
push 0x5fdaf560
push ecx
call edi
test eax, eax
jne 0x5fda4e4a
inc ebx
cmp ebx, 0xc8
jl 0x5fda4e16
cmp ebx, 0xc8
jne 0x5fda4e6e
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [0x5fdaf560], 0
pop edi
pop esi
pop ebx
add esp, 0x110
ret
lea eax, [esp + 0x18]
push 0x104
push eax
mov ecx, dword [0x5fdb4f30]
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x5fda4e9e
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
add esp, 0x110
ret
push 0x5fdb3fa4
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
call ebx
mov edi, eax
lea eax, [esp + 0x18]
push eax
call ebx
add edi, eax
add edi, 0x30
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
jne 0x5fda4ef1
push 0
push 0x10
push 0
push 0
push 0x4b5
push 0
call fcn.5fda25f0
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
add esp, 0x110
ret
lea eax, [esp + 0x18]
push 0x5fdb3fa4
push eax
push str._s__D:_s
push edi
call esi
add esp, 0x10
push edi
call ebx
inc eax
mov ecx, dword [esp + 0xc]
push eax
push edi
push 1
push 0
push 0x5fdaf560
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebx
add esp, 0x110
ret
Function at 0x5fda4f40
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
sub esp, 0x244
push ebx
push esi
mov esi, dword [esp + 0x250]
push edi
push ebp
test esi, esi
je 0x5fda505f
cmp byte [esi], 0
je 0x5fda505f
lea eax, [esp + 0x10]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x10]
push 0x5fdaf5e8
push eax
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
call edi
lea ecx, [esp + 0x114]
lea eax, [esp + 0x10]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov ebp, eax
je 0x5fda505f
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpA]
lea eax, [esp + 0x10]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
test byte [esp + 0x114], 0x10
je 0x5fda5010
lea eax, [esp + 0x140]
push 0x5fdaf5e4
push eax
call ebx
test eax, eax
je 0x5fda503a
lea eax, [esp + 0x140]
push 0x5fdaf224
push eax
call ebx
test eax, eax
je 0x5fda503a
lea eax, [esp + 0x140]
lea ecx, [esp + 0x10]
push eax
push ecx
call edi
lea ecx, [esp + 0x10]
push 0x5fdaf220
push ecx
call fcn.5fda5070
lea ecx, [esp + 0x18]
add esp, 8
push ecx
call fcn.5fda4f40
add esp, 4
jmp 0x5fda503a
lea eax, [esp + 0x140]
lea ecx, [esp + 0x10]
push eax
push ecx
call edi
lea ecx, [esp + 0x10]
push pe_nt_image_headers32
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x114]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x5fda4fa4
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x244
ret

Function at 0x5fda5160
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 8
lea eax, [esp + 4]
push esi
mov dword [esp + 4], 0
push eax
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x5fda51b7
lea eax, [esp + 4]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 8]
push eax
push 0
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x5fda51ac
mov dword [esp + 4], 0
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret

Function at 0x5fda51c0
Capabilities:
Query or enumerate registry key

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 8
lea eax, [esp + 4]
push esi
mov dword [esp + 4], 0
push eax
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x5fda5220
lea eax, [esp + 4]
push 0
push 0
push 0
push 0
push eax
mov ecx, dword [esp + 0x1c]
push 0
push 0
push 0
push 0
push 0
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
je 0x5fda5215
mov dword [esp + 4], 0
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret
Function at 0x5fda5230
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
push edi
xor esi, esi
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x5fda5147
lea eax, [esp + 8]
push str.wininit.ini
push eax
call fcn.5fda5070
lea eax, [esp + 0x10]
add esp, 8
push 0x40
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
cmp eax, 0xffffffff
mov edi, eax
je 0x5fda5147
push 2
push esi
push edi
call dword [sym.imp.KERNEL32.dll__llseek]
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, esi
pop edi
pop esi
add esp, 0x104
ret
xor eax, eax
mov ecx, dword [esp + 4]
and ecx, 0xffff
je 0x5fda5249
cmp ecx, 1
je 0x5fda524e
cmp ecx, 2
je 0x5fda525c
ret
jmp 0x5fda50f0
push str.SystemCurrentControlSetControlSession_ManagerFileRenameOperations
call fcn.5fda51c0
add esp, 4
ret
push str.PendingFileRenameOperations
push str.SystemCurrentControlSetControlSession_Manager
call fcn.5fda5160
add esp, 8
ret

Function at 0x5fda5290
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x5fda52ac
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop esi
ret
and eax, 0x10
pop esi
ret

Function at 0x5fda52c0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x5fda52ee
push 0
push 0x10
push 0
push 0
push 0x4f0
push 0
call fcn.5fda25f0
mov eax, dword [esp + 0x108]
mov al, byte [eax]
sub al, byte [esp]
cmp al, 1
sbb eax, eax
add esp, 0x104
neg eax
ret

Function at 0x5fda6a70
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
push esi
push edi
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov ecx, edi
shr ecx, 2
mov edx, ecx
dec ecx
test edx, edx
jle 0x5fda6abb
xor edx, edx
inc esi
xor ebx, ebx
inc esi
inc esi
mov dl, byte [esi - 3]
mov bl, byte [esi - 2]
inc esi
shl ebx, 8
or edx, ebx
xor ebx, ebx
mov bl, byte [esi - 2]
shl ebx, 0x10
or edx, ebx
xor ebx, ebx
mov bl, byte [esi - 1]
shl ebx, 0x18
or edx, ebx
xor eax, edx
mov edx, ecx
dec ecx
test edx, edx
jg 0x5fda6a8b
xor ecx, ecx
and edi, 3
cmp edi, 1
je 0x5fda6adf
cmp edi, 2
je 0x5fda6ad5
cmp edi, 3
jne 0x5fda6ae5
mov cl, byte [esi]
inc esi
shl ecx, 0x10
xor edx, edx
mov dl, byte [esi]
inc esi
shl edx, 8
or ecx, edx
xor edx, edx
mov dl, byte [esi]
or ecx, edx
xor eax, ecx
pop edi
pop esi
pop ebx
ret
Function at 0x5fda9b40
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
call fcn.5fda9bd0
mov dword [0x5fdafaec], 1
cmp dword [esp + 0x10], 0
mov ebx, dword [esp + 0x14]
mov byte [0x5fdafae8], bl
jne 0x5fda9ba1
cmp dword [0x5fdb746c], 0
je 0x5fda9b8f
mov esi, dword [0x5fdb7464]
sub esi, 4
cmp esi, dword [0x5fdb746c]
jb 0x5fda9b8f
mov eax, dword [esi]
test eax, eax
je 0x5fda9b84
call eax
sub esi, 4
cmp esi, dword [0x5fdb746c]
jae 0x5fda9b7c
push 0x5fdaf01c
push 0x5fdaf014
call fcn.5fda9bf0
add esp, 8
push 0x5fdaf024
push 0x5fdaf020
call fcn.5fda9bf0
add esp, 8
test ebx, ebx
je 0x5fda9bbf
call fcn.5fda9be0
pop esi
pop ebx
ret
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x5fda9c90
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x5fdabdb0
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x5fdafab4], eax
xor eax, eax
mov al, byte [0x5fdafab5]
mov dword [0x5fdafac0], eax
mov eax, dword [0x5fdafab4]
shr dword [0x5fdafab4], 0x10
and eax, 0xff
mov dword [0x5fdafabc], eax
shl eax, 8
add eax, dword [0x5fdafac0]
mov dword [0x5fdafab8], eax
call fcn.5fdabd90
call fcn.5fdabca0
test eax, eax
jne 0x5fda9d09
push 0x10
call fcn.5fda9e30
add esp, 4
mov dword [ebp - 4], 0
call fcn.5fdabac0
call fcn.5fdabab0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x5fdb7460], eax
call fcn.5fdab600
mov dword [0x5fdafaf0], eax
test eax, eax
je 0x5fda9d3c
cmp dword [0x5fdb7460], 0
jne 0x5fda9d46
push 0xffffffffffffffff
call fcn.5fda9b00
add esp, 4
call fcn.5fdab380
call fcn.5fdab2a0
call fcn.5fda9ad0
mov esi, dword [0x5fdb7460]
mov al, byte [esi]
cmp al, 0x22
je 0x5fda9d6d
cmp al, 0x20
jbe 0x5fda9d9a
inc esi
cmp byte [esi], 0x20
ja 0x5fda9d65
jmp 0x5fda9d9a
inc esi
cmp byte [esi], 0x22
je 0x5fda9d99
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x5fda9d94
xor eax, eax
mov al, bl
push eax
call fcn.5fdab240
add esp, 4
test eax, eax
je 0x5fda9d8e
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x5fda9d76
cmp byte [esi], 0x22
jne 0x5fda9d9a
inc esi
cmp byte [esi], 0
je 0x5fda9daa
cmp byte [esi], 0x20
ja 0x5fda9daa
inc esi
cmp byte [esi], 0
jne 0x5fda9d9f
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x5fda9dce
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.5fda9b00
jmp 0x5fda9e0f
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x5fdab600
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
cmp dword [0x5fdafcbc], 0
push ebx
push esi
push edi
push ebp
jne 0x5fdab650
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
call esi
mov edi, eax
test edi, edi
je 0x5fdab62e
mov dword [0x5fdafcbc], 1
mov ebx, dword [esp + 0x10]
jmp 0x5fdab65e
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x5fdab646
mov dword [0x5fdafcbc], 2
jmp 0x5fdab65e
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x5fdafcbc], 1
jne 0x5fdab70d
test edi, edi
jne 0x5fdab681
call esi
mov edi, eax
test edi, edi
jne 0x5fdab681
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x5fdab69b
add esi, 2
cmp word [esi], 0
jne 0x5fdab689
add esi, 2
cmp word [esi], 0
jne 0x5fdab689
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x5fdab6fc
push ebp
call fcn.5fdac8f0
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x5fdab6fc
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x5fdab6eb
push ebx
call fcn.5fdac780
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x5fdafcbc], 2
jne 0x5fdab791
test ebx, ebx
jne 0x5fdab730
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x5fdab730
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x5fdab745
inc ebp
cmp byte [ebp], 0
jne 0x5fdab737
inc ebp
cmp byte [ebp], 0
jne 0x5fdab737
sub ebp, ebx
inc ebp
push ebp
call fcn.5fdac8f0
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x5fdab76a
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x5fdabca0
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.5fdaabd0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x5fdafefc], eax
cmp eax, 0xffffffff
jne 0x5fdabcba
xor eax, eax
pop esi
ret
push 0x74
push 1
call fcn.5fdac970
add esp, 8
mov esi, eax
test esi, esi
je 0x5fdabcfc
push esi
mov eax, dword [0x5fdafefc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x5fdabcfc
push esi
call fcn.5fdabd00
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov eax, 1
mov dword [esi + 4], 0xffffffff
pop esi
ret
xor eax, eax
pop esi
ret

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

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x5fdafefc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x5fdabd83
push 0x74
push 1
call fcn.5fdac970
add esp, 8
mov edi, eax
test edi, edi
je 0x5fdabd79
push edi
mov eax, dword [0x5fdafefc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x5fdabd79
push edi
call fcn.5fdabd00
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [edi], eax
mov dword [edi + 4], 0xffffffff
jmp 0x5fdabd83
push 0x10
call fcn.5fda9e30
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
ret
Function at 0x5fdabed0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor eax, eax
mov ecx, 0x5fdb0168
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [ecx], edx
je 0x5fdabef8
add ecx, 8
inc eax
cmp ecx, 0x5fdb01f0
jb 0x5fdabee8
cmp dword [eax*8 + 0x5fdb0168], edx
lea ebx, [eax*8]
jne 0x5fdac0b3
cmp dword [0x5fdafafc], 1
je 0x5fdac078
cmp dword [0x5fdafafc], 0
jne 0x5fdabf2f
cmp dword [0x5fdafb00], 1
je 0x5fdac078
cmp edx, 0xfc
je 0x5fdac0b3
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x5fdabf6c
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x5fdabfb0
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x5fdb023c
push ebp
call fcn.5fdac9d0
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x5fdb021c
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x5fdb016c]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.5fdaca00
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x5fdb7360]
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x5fdac08f
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x5fdb016c]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x5fdac140
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x418
push ebx
push esi
push edi
push ebp
xor edi, edi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], edi
cmp ebp, edi
jne 0x5fdac168
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov edx, dword [esp + 0x42c]
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x5fdb7360
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ebx, dword [esp + 0x18]
shl eax, 2
lea ecx, [eax + eax*8]
mov eax, dword [ebx]
mov dword [esp + 0x1c], ecx
test byte [eax + ecx + 4], 0x20
je 0x5fdac1a9
push 2
push 0
push edx
call fcn.5fdac3c0
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x5fdac245
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x5fdac27e
lea esi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x5fdac20c
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x5fdac1fa
mov byte [esi], 0xd
inc edi
inc esi
mov byte [esi], al
inc esi
mov eax, esi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x5fdac1e1
lea eax, [esp + 0x24]
push 0
sub esi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push esi
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5fdac274
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, esi
jge 0x5fdac1cc
jmp 0x5fdac27e
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5fdac274
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x5fdac27e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x5fdac32a
cmp dword [esp + 0x10], 0
je 0x5fdac2da
cmp dword [esp + 0x10], 5
jne 0x5fdac2bd
call fcn.5fdacb20
mov dword [eax], 9
call fcn.5fdacb30
mov ecx, dword [esp + 0x10]
pop ebp
pop edi
mov dword [eax], ecx
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov ecx, dword [esp + 0x10]
push ecx
call fcn.5fdacaa0
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x5fdac304
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x5fdac304
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
call fcn.5fdacb20
mov dword [eax], 0x1c
call fcn.5fdacb30
pop ebp
mov dword [eax], 0
mov eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, edi
pop edi
pop esi
pop ebx
add esp, 0x418
ret