joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401130
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ecx
call fcn.00401f00
cmp eax, 1
jne 0x401172
lea eax, [esp]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x401172
mov ecx, dword [esp]
push 0x11
push str.Tally_Admin_Test
push 1
push eax
push str.AdminTest
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x401176
xor eax, eax
pop ecx
ret
mov edx, dword [esp]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
pop ecx
ret

Function at 0x401190
Capabilities:
Persist via run registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov eax, 0x110
call fcn.00401f60
lea eax, [esp]
push ebx
push ebp
push esi
push edi
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40129c
push eax
push eax
mov edx, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
push eax
push ecx
push eax
push eax
push eax
push eax
push eax
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
je 0x401204
mov eax, dword [0x40a6c4]
push str.IsInstalled:_RegQueryInfoKey_Failed_
push eax
call fcn.004010e0
mov ecx, dword [esp + 0x18]
add esp, 8
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
mov eax, dword [esp + 0x14]
xor ebx, ebx
test eax, eax
jbe 0x401284
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov ecx, dword [esp + 0x10]
push 0
push 0
push 0
lea edx, [esp + 0x24]
push 0
lea eax, [esp + 0x2c]
push edx
push eax
push ebx
push ecx
mov dword [esp + 0x38], 0x104
call ebp
test eax, eax
jne 0x401267
mov edi, 0x408218
lea esi, [esp + 0x1c]
mov ecx, 0x15
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x401253
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40127b
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x110
ret
mov edx, dword [0x40a6c4]
push str.IsInstalled:_RegEnumValue_Failed_
push edx
call fcn.004010e0
add esp, 8
mov eax, dword [esp + 0x14]
inc ebx
cmp ebx, eax
jb 0x401214
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
mov ecx, dword [0x40a6c4]
push str.IsInstalled:_RegOpenKey_Failed_
push ecx
call fcn.004010e0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
Function at 0x4012c0
Capabilities:
Delete registry key
Delete registry value
Persist via run registry key
Query or enumerate registry value

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
lea eax, [esp + 0xc]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
mov esi, ecx
mov dword [esp + 0x20], 4
xor ebx, ebx
call edi
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x40132d
mov ecx, dword [esp + 0x10]
push 0x408218
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne 0x401316
mov edx, dword [esp + 0x10]
mov ebx, 1
push edx
call ebp
jmp 0x40133b
push str.Uninstall:_RegDeleteValue__SERVICE__Failed_
push esi
call fcn.004010e0
mov edx, dword [esp + 0x18]
add esp, 8
push edx
call ebp
jmp 0x40133b
push str.Uninstall:_RegOpenKey__SERVICE__Failed_
push esi
call fcn.004010e0
add esp, 8
lea eax, [esp + 0x10]
mov dword [esi + 0xc], 0
push eax
push str.SoftwareTallyLicServer
push 0x80000001
call edi
test eax, eax
jne 0x40140d
lea ecx, [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
push edx
push eax
push eax
mov eax, dword [esp + 0x20]
push 0x4083d4
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4013cc
mov ecx, dword [esp + 0x18]
push 0x3a98
push ecx
call fcn.00401e40
cmp eax, 3
ja case.default.0x40138f
jmp dword [eax*4 + 0x401428]
push str.Uninstall:_TerminateApp_had_to_forcibly_kill_running_process_
push esi
call fcn.004010e0
add esp, 8
mov dword [esi + 0xc], 1
jmp 0x4013da
push str.Uninstall:_TerminateApp_failed_in_OpenProcess_
jmp 0x4013d1
push str.Uninstall:_TerminateApp_failed_to_shutdown_or_kill_running_process_
jmp 0x4013d1
push eax
push str.Uninstall:_TerminateApp_failed_with_Unknown_Error_Code__d
push esi
call fcn.004010e0
add esp, 0xc
jmp 0x4013da
push str.Uninstall:_RegQueryValueEx__PROCESS_ID__Failed_
push esi
call fcn.004010e0
add esp, 8
mov edx, dword [esp + 0x10]
push edx
call ebp
push str.SoftwareTallyLicServer
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
je 0x40141b
push str.Uninstall:_RegDeleteKey__PROCESS_ID__Failed_
push esi
call fcn.004010e0
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push str.Uninstall:_RegOpenKey__PROCESS_ID__Failed_
push esi
call fcn.004010e0
add esp, 8
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x401440
Capabilities:
Delete registry key
Delete registry value
Persist via run registry key
Query or enumerate registry value

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
lea eax, [esp + 0xc]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
mov ebx, ecx
mov dword [esp + 0x20], 4
mov esi, 1
call edi
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x40148e
mov ecx, dword [esp + 0x10]
push 0x408218
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov edx, dword [esp + 0x10]
push edx
call ebp
lea eax, [esp + 0x10]
push eax
push str.SoftwareTallyLicServer
push 0x80000001
call edi
test eax, eax
jne 0x401509
lea ecx, [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
push edx
push eax
push eax
mov eax, dword [esp + 0x20]
push 0x4083d4
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4014d9
mov ecx, dword [esp + 0x18]
push 0x3a98
push ecx
call fcn.00401e40
cmp eax, 1
jbe 0x4014d9
xor esi, esi
mov edx, dword [esp + 0x10]
push edx
call ebp
push str.SoftwareTallyLicServer
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
je 0x401513
xor esi, esi
push str.Tally_License_Server__9x_
push str._s_Failed_to_clean_older_version_
push ebx
call fcn.004010e0
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp esi, 1
jne 0x4014f6
push str.Tally_License_Server__9x_
push str._s_Cleaned_older_version_Successfully_
push ebx
call fcn.004010e0
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x401540
Capabilities:
Create process on windows
Delete registry key
Set registry value

Disassembly:
mov eax, 0x60
call fcn.00401f60
push esi
push edi
mov esi, ecx
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov word [esp + 0x54], ax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x24]
mov dword [esp + 0x1c], eax
push ecx
push edx
push eax
push eax
push eax
push eax
push eax
push eax
push str.Tally9.exe
push eax
mov dword [esp + 0x4c], 0x44
mov dword [esp + 0x78], 1
mov dword [esp + 0x48], eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4015c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Tally9.exe
push str.StartService:_CreateProcess___s__Failed__Error_Code:__d
push esi
call fcn.004010e0
add esp, 0x10
xor eax, eax
pop edi
pop esi
add esp, 0x60
ret
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 8]
push ecx
push str.SoftwareTallyLicServer
push 0x80000001
mov dword [esp + 0x18], eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x40160d
push str.StartService:_RegCreateKey_Failed_
push esi
call fcn.004010e0
mov edx, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 8
push edx
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
pop edi
xor eax, eax
pop esi
add esp, 0x60
ret
mov edx, dword [esp + 8]
lea ecx, [esp + 0xc]
push 4
push ecx
push 4
push 0
push 0x4083d4
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x401661
push str.StartService:_RegSetValueEx_Failed_
push esi
call fcn.004010e0
mov eax, dword [esp + 0x10]
add esp, 8
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x18]
push edx
call esi
pop edi
xor eax, eax
pop esi
add esp, 0x60
ret
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [esp + 0x10], 0x103
je 0x4016d0
push str.Tally9.exe
push str.StartService:_Process_Exe___s__has_shutdown_
push esi
call fcn.004010e0
add esp, 0xc
push str.SoftwareTallyLicServer
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x18]
push ecx
call esi
pop edi
xor eax, eax
pop esi
add esp, 0x60
ret
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
pop edi
mov eax, 1
pop esi
add esp, 0x60
ret
Function at 0x4016f0
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
mov eax, 0x108
call fcn.00401f60
push ebx
lea eax, [esp + 4]
push esi
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
mov esi, ecx
xor ebx, ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4017d8
push edi
lea ecx, [esp + 0x10]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edi, [esp + 0x10]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401734
mov edx, dword [0x4085d4]
lea eax, [esp + 0x10]
mov dword [edi], edx
pop edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40174c
mov ecx, dword [esp + 8]
sub eax, edx
push eax
lea eax, [esp + 0x10]
push eax
push 1
push 0
push 0x408218
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x4017aa
mov ecx, esi
call fcn.00401540
test eax, eax
je 0x401799
mov ecx, dword [esp + 8]
mov ebx, 1
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
pop esi
pop ebx
add esp, 0x108
ret
lea edx, [esp + 0xc]
push edx
push 0x408218
push str.Install:_StartService___s:_s__Failed_
jmp 0x4017b9
lea eax, [esp + 0xc]
push eax
push 0x408218
push str.Install:_RegSetValueEx___s:_s__Failed_
push esi
call fcn.004010e0
mov ecx, dword [esp + 0x18]
add esp, 0x10
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
pop esi
pop ebx
add esp, 0x108
ret
push str.Install:_RegOpenKey_Failed_
push esi
call fcn.004010e0
add esp, 8
mov eax, ebx
pop esi
pop ebx
add esp, 0x108
ret

Function at 0x401e40
Capabilities:
Enumerate gui resources
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
jne 0x401e64
pop edi
mov eax, 2
pop esi
ret 8
push esi
push 0x401e00
call dword [sym.imp.USER32.dll_EnumWindows]
mov eax, dword [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x401ea3
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov esi, eax
push edi
neg esi
sbb esi, esi
and esi, 0xfffffffe
add esi, 3
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
ret 8
push edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
ret 8
Function at 0x402282
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4087d0
call fcn.00404994
mov edi, 0x94
mov eax, edi
call fcn.00401f60
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 [0x40a6e8], ecx
mov eax, dword [esi + 4]
mov dword [0x40a6f4], eax
mov edx, dword [esi + 8]
mov dword [0x40a6f8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40a6ec], esi
cmp ecx, 2
je 0x4022e2
or esi, 0x8000
mov dword [0x40a6ec], esi
shl eax, 8
add eax, edx
mov dword [0x40a6f0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40231d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40231d
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x402335
cmp eax, 0x20b
je 0x402322
mov dword [ebp - 0x1c], esi
jmp 0x402349
cmp dword [ecx + 0x84], 0xe
jbe 0x40231d
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x402343
cmp dword [ecx + 0x74], 0xe
jbe 0x40231d
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00402475
pop ecx
test eax, eax
jne 0x402375
cmp dword [0x40a6d0], 1
jne 0x402362
call fcn.00404156
push 0x1c
call fcn.00403fdf
push 0xff
call fcn.00403c24
pop ecx
pop ecx
call fcn.0040490b
mov dword [ebp - 4], esi
call fcn.00404760
test eax, eax
jge 0x40238e
push 0x1b
call fcn.0040225d
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40bc58], eax
call fcn.0040463e
mov dword [0x40a6c8], eax
call fcn.0040459c
test eax, eax
jge 0x4023b4
push 8
call fcn.0040225d
pop ecx
call fcn.00404369
test eax, eax
jge 0x4023c5
push 9
call fcn.0040225d
pop ecx
call fcn.00403c54
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x4023d8
push eax
call fcn.0040225d
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00404300
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x4023f9
movzx eax, word [ebp - 0x34]
jmp 0x4023fc
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.00401000
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40241a
push edi
call fcn.00403d7b
call fcn.00403d9d
jmp 0x40244c
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004049cf
ret
Function at 0x403cb9
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40a728], esi
push edi
jne 0x403cd9
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x40a724], esi
mov byte [0x40a720], al
jne 0x403d3f
mov ecx, dword [0x40bc28]
test ecx, ecx
je 0x403d20
mov eax, dword [0x40bc24]
sub eax, 4
cmp eax, ecx
jmp 0x403d19
mov eax, dword [eax]
test eax, eax
je 0x403d0b
call eax
mov eax, dword [0x40bc24]
sub eax, 4
cmp eax, dword [0x40bc28]
mov dword [0x40bc24], eax
jae 0x403d03
mov eax, 0x40a020
mov esi, 0x40a028
cmp eax, esi
mov edi, eax
jae 0x403d3f
mov eax, dword [edi]
test eax, eax
je 0x403d38
call eax
add edi, 4
cmp edi, esi
jb 0x403d30
mov eax, 0x40a02c
mov esi, 0x40a030
cmp eax, esi
mov edi, eax
jae 0x403d5e
mov eax, dword [edi]
test eax, eax
je 0x403d57
call eax
add edi, 4
cmp edi, esi
jb 0x403d4f
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x403d79
push dword [ebp + 8]
mov dword [0x40a728], 1
call fcn.00403c24
pop ecx
pop ebp
ret

Function at 0x403fdf
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x40a590]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x40a058]
je 0x40400c
inc eax
cmp eax, 0x12
jb 0x403ffd
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40a058]
jne 0x404140
mov eax, dword [0x40a6d0]
cmp eax, 1
je 0x40411b
cmp eax, edx
jne 0x40403c
cmp dword [0x40a044], 1
je 0x40411b
cmp ecx, 0xfc
je 0x404140
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x404075
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.00405c10
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.00405240
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4040b7
lea eax, [ebp - 0x10c]
push eax
call fcn.00405240
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x408bb8
push edi
call fcn.00405d10
add esp, 0x10
push edi
call fcn.00405240
push dword [esi + 0x40a05c]
mov ebx, eax
call fcn.00405240
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00401f60
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00405c10
push edi
push ebx
call fcn.00405c20
push 0x408b98
push ebx
call fcn.00405c20
push dword [esi + 0x40a05c]
push ebx
call fcn.00405c20
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00405b14
add esp, 0x2c
jmp 0x404140
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x40a05c]
push dword [esi]
call fcn.00405240
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.00405362
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404f46
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x40a590]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x40bb04]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
jae 0x4050d6
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40bb20]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x18], ebx
je 0x4050d6
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
jne 0x404fa5
xor eax, eax
jmp 0x4050ea
test al, 0x20
je 0x404fb6
push 2
push edi
push edi
push ecx
call fcn.00406690
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x405072
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov dword [ebp + 8], edi
jbe 0x4050aa
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
cmp ecx, dword [ebp + 0x10]
jae 0x40500c
mov edx, dword [ebp - 8]
inc dword [ebp - 8]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x404ffd
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x18]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x404fe2
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x10]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40504c
mov eax, dword [ebp - 0x10]
add dword [ebp - 0xc], eax
cmp eax, edi
jl 0x405055
mov eax, dword [ebp - 8]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x404fd6
jmp 0x405057
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
xor edi, edi
mov eax, dword [ebp - 0xc]
cmp eax, edi
jne 0x4050d1
cmp dword [ebp + 8], edi
je 0x4050aa
push 5
pop eax
cmp dword [ebp + 8], eax
jne 0x40509f
mov dword [0x40a6e0], eax
jmp 0x4050dd
push edi
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405094
mov eax, dword [ebp - 0x10]
mov dword [ebp + 8], edi
mov dword [ebp - 0xc], eax
jmp 0x405057
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x405057
push dword [ebp + 8]
call fcn.00404d1d
pop ecx
jmp 0x4050e7
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4050bf
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
je 0x404f9e
mov dword [0x40a6dc], 0x1c
mov dword [0x40a6e0], edi
jmp 0x4050e7
sub eax, dword [ebp - 0x14]
jmp 0x4050ea
and dword [0x40a6e0], 0
mov dword [0x40a6dc], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
pop ebx
call fcn.00405362
leave
ret
Function at 0x405b14
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x40a878], ebx
push esi
push edi
jne 0x405b94
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x405bcf
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x409088
push edi
call esi
test eax, eax
mov dword [0x40a878], eax
je 0x405bcf
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40a87c], eax
call esi
cmp dword [0x40a6e8], 2
mov dword [0x40a880], eax
jne 0x405b94
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x40a888], eax
je 0x405b94
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x40a884], eax
mov eax, dword [0x40a884]
test eax, eax
je 0x405bd9
call eax
test eax, eax
je 0x405bc0
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x40a888]
test eax, eax
je 0x405bc0
test byte [ebp - 8], 1
jne 0x405bd9
cmp dword [0x40a6f4], 4
jb 0x405bd3
or byte [ebp + 0x12], 0x20
jmp 0x405bf8
xor eax, eax
jmp 0x405c08
or byte [ebp + 0x12], 4
jmp 0x405bf8
mov eax, dword [0x40a87c]
test eax, eax
je 0x405bf8
call eax
mov ebx, eax
test ebx, ebx
je 0x405bf8
mov eax, dword [0x40a880]
test eax, eax
je 0x405bf8
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x40a878]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4069ab
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00401f60
mov eax, dword [0x40a590]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x40bb04]
mov dword [ebp - 4], eax
jae 0x406aeb
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x40bb20]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x406aeb
push 1
push esi
push ebx
call fcn.00405791
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x406af5
push 2
push esi
push ebx
call fcn.00405791
add esp, 0xc
cmp eax, 0xffffffff
je 0x406af5
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x406a98
push 0x1000
lea eax, [ebp - 0x1008]
push esi
push eax
call fcn.00407a00
push 0x8000
push ebx
call fcn.00407a60
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x406a57
mov eax, edi
push eax
lea eax, [ebp - 0x1008]
push eax
push ebx
call fcn.00404f46
add esp, 0xc
cmp eax, 0xffffffff
je 0x406a75
sub edi, eax
test edi, edi
jg 0x406a4c
jmp 0x406a8b
cmp dword [0x40a6e0], 5
jne 0x406a88
mov dword [0x40a6dc], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.00407a60
pop ecx
pop ecx
jmp 0x406ad8
jge 0x406ad8
push 0
push dword [ebp + 0xc]
push ebx
call fcn.00405791
push ebx
call fcn.00404f0a
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x406ad8
mov dword [0x40a6dc], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x40a6e0], eax
push 0
push dword [ebp - 8]
push ebx
call fcn.00405791
add esp, 0xc
mov eax, esi
pop edi
jmp 0x406af8
mov dword [0x40a6dc], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.00405362
leave
ret