joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401406
Capabilities:
Allocate or change rwx memory
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
push esi
push edi
mov dword [0x40aab8], 0x10003
push 0x40aab8
mov eax, dword [ebp + 0xc]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x401437
xor eax, eax
jmp 0x401614
mov eax, dword [ebp + 0xc]
push dword [eax + 8]
call fcn.00401117
pop ecx
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x401453
xor eax, eax
jmp 0x401614
push dword [ebp - 8]
push dword [ebp + 8]
push 0
lea eax, [ebp - 0x118]
push eax
call fcn.00401054
add esp, 0x10
test eax, eax
jne 0x401475
xor eax, eax
jmp 0x401614
push 0x110
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x40ad84], eax
cmp dword [0x40ad84], 0
jne 0x401497
xor eax, eax
jmp 0x401614
push 0x40a6cc
push 0x40
push 0x110
push dword [ebp - 8]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push 0x40a6c0
push 0x110
push dword [0x40ad84]
push dword [ebp - 8]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x4014e6
push dword [0x40ad84]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x401614
push 0x40a6c8
push 0x110
lea eax, [ebp - 0x118]
push eax
push dword [ebp - 8]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x40151c
push dword [0x40ad84]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x401614
mov ecx, 0xb3
mov esi, 0x40aab8
mov edi, 0x40ad90
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 8]
mov dword [0x40ae48], eax
mov eax, dword [ebp + 0xc]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [ebp - 8]
add eax, 0xa
mov dword [0x40a9a4], eax
mov dword [0x40a6d0], 0x10003
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x40a6d0
mov eax, dword [ebp + 0xc]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov eax, dword [0x40a788]
cmp eax, dword [0x40a9a4]
jne 0x401556
mov eax, dword [0x40a780]
mov dword [0x40a6c4], eax
mov eax, dword [ebp + 0xc]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push 0x40a6c8
push 0x110
push dword [0x40ad84]
push dword [ebp - 8]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x4015c4
push dword [0x40ad84]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x401614
push dword [0x40ad84]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea eax, [ebp - 4]
push eax
push dword [0x40a6cc]
push 0x110
push dword [0x40ad88]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov eax, dword [ebp - 8]
mov dword [0x40ab70], eax
push 0x40aab8
mov eax, dword [ebp + 0xc]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x401611
xor eax, eax
jmp 0x401614
xor eax, eax
inc eax
pop edi
pop esi
leave
ret
Function at 0x401618
Capabilities:
Create thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x14], eax
push str.VirtualAllocEx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x18], eax
push str.VirtualFreeEx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40165d
cmp dword [ebp - 0x18], 0
jne 0x401676
push 0
push 0
push str.couldnt_import_virtualallocex
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x40
push 0x1000
push 0x111
push 0
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [ebp - 0x18]
mov dword [0x40ad88], eax
cmp dword [0x40ad88], 0
jne 0x4016a1
xor eax, eax
jmp 0x4017d4
push dword [0x40ad88]
push dword [ebp + 8]
lea eax, [ebp - 0x130]
push eax
push 0
call fcn.00401054
add esp, 0x10
test eax, eax
jne 0x4016de
push 0x4000
push 0x111
push dword [0x40ad88]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [ebp - 0xc]
xor eax, eax
jmp 0x4017d4
push 0x40a6c8
push 0x111
lea eax, [ebp - 0x130]
push eax
push dword [0x40ad88]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x401723
push 0x4000
push 0x111
push dword [0x40ad88]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [ebp - 0xc]
xor eax, eax
jmp 0x4017d4
mov eax, dword [0x40ad88]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 4]
push eax
push 0
push 0
push dword [ebp - 0x10]
push 0
push 0
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40176a
push 0x4000
push 0x111
push dword [0x40ad88]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [ebp - 0xc]
xor eax, eax
jmp 0x4017d4
push 0xffffffffffffffff
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x40a6c4
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
jne 0x4017a3
push 0x4000
push 0x111
push dword [0x40ad88]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [ebp - 0xc]
xor eax, eax
jmp 0x4017d4
push 0x4000
push 0x111
push dword [0x40ad88]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [ebp - 0xc]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x40a6c4], 0
je 0x4017d2
xor eax, eax
inc eax
jmp 0x4017d4
xor eax, eax
leave
ret

Function at 0x401958
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
push esi
push 0x186
lea eax, [ebp - 0x190]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov eax, dword [ebp + 8]
movsx eax, byte [eax + 1]
cmp eax, 0x3a
jne 0x4019b1
movsx eax, byte [ebp - 0x18f]
cmp eax, 0x3a
jne 0x4019b1
mov eax, dword [ebp + 8]
movsx eax, byte [eax]
push eax
call fcn.00402090
pop ecx
mov esi, eax
movsx eax, byte [ebp - 0x190]
push eax
call fcn.00402090
pop ecx
cmp esi, eax
jne 0x4019b1
mov al, 1
jmp 0x4019b3
xor al, al
pop esi
leave
ret
Function at 0x4019b6
Capabilities:
Get common file path
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
push 0x186
lea eax, [ebp - 0x190]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.Applog
lea eax, [ebp - 0x190]
push eax
call fcn.00401f40
pop ecx
pop ecx
push 0x80
lea eax, [ebp - 0x190]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
leave
ret
Function at 0x4023c7
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x408448
call fcn.00404428
mov edi, 0x94
mov eax, edi
call fcn.00404480
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 [0x40b120], ecx
mov eax, dword [esi + 4]
mov dword [0x40b12c], eax
mov edx, dword [esi + 8]
mov dword [0x40b130], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40b124], esi
cmp ecx, 2
je 0x402427
or esi, 0x8000
mov dword [0x40b124], esi
shl eax, 8
add eax, edx
mov dword [0x40b128], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x402462
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402462
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40247a
cmp eax, 0x20b
je 0x402467
mov dword [ebp - 0x1c], esi
jmp 0x40248e
cmp dword [ecx + 0x84], 0xe
jbe 0x402462
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x402488
cmp dword [ecx + 0x74], 0xe
jbe 0x402462
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.004043d6
pop ecx
test eax, eax
jne 0x4024ba
cmp dword [0x40b0e4], 1
jne 0x4024a7
call fcn.00403b7f
push 0x1c
call fcn.00403a08
push 0xff
call fcn.004037ff
pop ecx
pop ecx
call fcn.00404334
mov dword [ebp - 4], esi
call fcn.00404189
test eax, eax
jge 0x4024d3
push 0x1b
call fcn.004023a2
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40c634], eax
call fcn.00404067
mov dword [0x40b0dc], eax
call fcn.00403fc5
test eax, eax
jge 0x4024f9
push 8
call fcn.004023a2
pop ecx
call fcn.00403d92
test eax, eax
jge 0x40250a
push 9
call fcn.004023a2
pop ecx
call fcn.0040382f
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x40251d
push eax
call fcn.004023a2
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00403d29
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x40253e
movzx eax, word [ebp - 0x34]
jmp 0x402541
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.00401a6a
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40255f
push edi
call fcn.00403956
call fcn.00403978
jmp 0x402591
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00404463
ret
Function at 0x403894
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40b160], esi
push edi
jne 0x4038b4
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 [0x40b15c], esi
mov byte [0x40b158], al
jne 0x40391a
mov ecx, dword [0x40c628]
test ecx, ecx
je 0x4038fb
mov eax, dword [0x40c624]
sub eax, 4
cmp eax, ecx
jmp 0x4038f4
mov eax, dword [eax]
test eax, eax
je 0x4038e6
call eax
mov eax, dword [0x40c624]
sub eax, 4
cmp eax, dword [0x40c628]
mov dword [0x40c624], eax
jae 0x4038de
mov eax, 0x40a020
mov esi, 0x40a028
cmp eax, esi
mov edi, eax
jae 0x40391a
mov eax, dword [edi]
test eax, eax
je 0x403913
call eax
add edi, 4
cmp edi, esi
jb 0x40390b
mov eax, 0x40a02c
mov esi, 0x40a030
cmp eax, esi
mov edi, eax
jae 0x403939
mov eax, dword [edi]
test eax, eax
je 0x403932
call eax
add edi, 4
cmp edi, esi
jb 0x40392a
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x403954
push dword [ebp + 8]
mov dword [0x40b160], 1
call fcn.004037ff
pop ecx
pop ebp
ret

Function at 0x403a08
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x40a438]
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 + 0x40a078]
je 0x403a35
inc eax
cmp eax, 0x12
jb 0x403a26
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40a078]
jne 0x403b69
mov eax, dword [0x40b0e4]
cmp eax, 1
je 0x403b44
cmp eax, edx
jne 0x403a65
cmp dword [0x40a054], 1
je 0x403b44
cmp ecx, 0xfc
je 0x403b69
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 0x403a9e
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.00401f30
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.00402170
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x403ae0
lea eax, [ebp - 0x10c]
push eax
call fcn.00402170
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x408c68
push edi
call fcn.00406320
add esp, 0x10
push edi
call fcn.00402170
push dword [esi + 0x40a07c]
mov ebx, eax
call fcn.00402170
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00404480
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00401f30
push edi
push ebx
call fcn.00401f40
push 0x408c48
push ebx
call fcn.00401f40
push dword [esi + 0x40a07c]
push ebx
call fcn.00401f40
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040621c
add esp, 0x2c
jmp 0x403b69
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x40a07c]
push dword [esi]
call fcn.00402170
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.00404c72
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404759
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.00404480
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4047ee
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x40b120]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x4047ee
cmp eax, 1
je 0x404806
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4047ee
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x4047c3
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x4047ea
xor eax, eax
inc eax
jmp 0x404822
cmp esi, ebx
jae 0x4047f2
xor eax, eax
jmp 0x404822
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x40b120]
jmp 0x404808
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405a61
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x40a438]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x40c50c]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
jae 0x405bf1
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40c520]
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 0x405bf1
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
jne 0x405ac0
xor eax, eax
jmp 0x405c05
test al, 0x20
je 0x405ad1
push 2
push edi
push edi
push ecx
call fcn.0040735d
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x405b8d
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov dword [ebp + 8], edi
jbe 0x405bc5
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
cmp ecx, dword [ebp + 0x10]
jae 0x405b27
mov edx, dword [ebp - 8]
inc dword [ebp - 8]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x405b18
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 0x405afd
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 0x405b67
mov eax, dword [ebp - 0x10]
add dword [ebp - 0xc], eax
cmp eax, edi
jl 0x405b70
mov eax, dword [ebp - 8]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x405af1
jmp 0x405b72
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
xor edi, edi
mov eax, dword [ebp - 0xc]
cmp eax, edi
jne 0x405bec
cmp dword [ebp + 8], edi
je 0x405bc5
push 5
pop eax
cmp dword [ebp + 8], eax
jne 0x405bba
mov dword [0x40b118], eax
jmp 0x405bf8
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 0x405baf
mov eax, dword [ebp - 0x10]
mov dword [ebp + 8], edi
mov dword [ebp - 0xc], eax
jmp 0x405b72
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x405b72
push dword [ebp + 8]
call fcn.00405838
pop ecx
jmp 0x405c02
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x405bda
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
je 0x405ab9
mov dword [0x40b114], 0x1c
mov dword [0x40b118], edi
jmp 0x405c02
sub eax, dword [ebp - 0x14]
jmp 0x405c05
and dword [0x40b118], 0
mov dword [0x40b114], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
pop ebx
call fcn.00404c72
leave
ret
Function at 0x405c6c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x40c50c]
push edi
jae 0x405e33
mov eax, esi
sar eax, 5
lea ebx, [eax*4 + 0x40c520]
mov eax, dword [ebx]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x405e33
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov edi, dword [ebp + 0xc]
mov ecx, edi
je 0x405d12
test dl, 2
jne 0x405d12
test dl, 0x48
je 0x405cdc
mov al, byte [eax + 5]
cmp al, 0xa
je 0x405cdc
dec dword [ebp + 0x10]
mov byte [edi], al
mov eax, dword [ebx]
lea ecx, [edi + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [ebx]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405d25
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x405d0d
mov dword [0x40b118], ecx
jmp 0x405e3a
cmp eax, 0x6d
jne 0x405d19
xor eax, eax
jmp 0x405e47
push eax
call fcn.00405838
pop ecx
jmp 0x405e44
mov eax, dword [ebx]
mov edx, dword [ebp - 0x10]
add dword [ebp - 0xc], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x405e2e
test edx, edx
je 0x405d48
cmp byte [edi], 0xa
jne 0x405d48
or al, 4
jmp 0x405d4a
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x405e28
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x405e18
cmp al, 0xd
je 0x405d7e
mov byte [edi], al
inc edi
inc dword [ebp - 8]
jmp 0x405e0a
dec ecx
cmp dword [ebp - 8], ecx
jae 0x405d98
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x405d93
add dword [ebp - 8], 2
jmp 0x405dec
mov dword [ebp - 8], eax
jmp 0x405e06
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405dc0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x405e06
cmp dword [ebp - 0x10], 0
je 0x405e06
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x48
je 0x405de1
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x405dec
mov byte [edi], 0xd
mov ecx, dword [ebx]
mov byte [ecx + esi + 5], al
jmp 0x405e09
cmp edi, dword [ebp + 0xc]
jne 0x405df1
cmp byte [ebp - 1], 0xa
jne 0x405df1
mov byte [edi], 0xa
jmp 0x405e09
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00406de6
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x405e0a
mov byte [edi], 0xd
inc edi
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x405d62
jmp 0x405e28
mov eax, dword [ebx]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x405e28
or al, 2
mov byte [esi], al
sub edi, dword [ebp + 0xc]
mov dword [ebp - 0xc], edi
mov eax, dword [ebp - 0xc]
jmp 0x405e47
and dword [0x40b118], 0
mov dword [0x40b114], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40621c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x40b288], ebx
push esi
push edi
jne 0x40629c
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4062d7
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x408d2c
push edi
call esi
test eax, eax
mov dword [0x40b288], eax
je 0x4062d7
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40b28c], eax
call esi
cmp dword [0x40b120], 2
mov dword [0x40b290], eax
jne 0x40629c
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x40b298], eax
je 0x40629c
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x40b294], eax
mov eax, dword [0x40b294]
test eax, eax
je 0x4062e1
call eax
test eax, eax
je 0x4062c8
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x40b298]
test eax, eax
je 0x4062c8
test byte [ebp - 8], 1
jne 0x4062e1
cmp dword [0x40b12c], 4
jb 0x4062db
or byte [ebp + 0x12], 0x20
jmp 0x406300
xor eax, eax
jmp 0x406310
or byte [ebp + 0x12], 4
jmp 0x406300
mov eax, dword [0x40b28c]
test eax, eax
je 0x406300
call eax
mov ebx, eax
test ebx, ebx
je 0x406300
mov eax, dword [0x40b290]
test eax, eax
je 0x406300
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x40b288]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4073fc
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00404480
mov eax, dword [0x40a438]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x40c50c]
mov dword [ebp - 4], eax
jae 0x40753c
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x40c520]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x40753c
push 1
push esi
push ebx
call fcn.00406de6
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x407546
push 2
push esi
push ebx
call fcn.00406de6
add esp, 0xc
cmp eax, 0xffffffff
je 0x407546
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x4074e9
push 0x1000
lea eax, [ebp - 0x1008]
push esi
push eax
call fcn.00402030
push 0x8000
push ebx
call fcn.004078b4
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x4074a8
mov eax, edi
push eax
lea eax, [ebp - 0x1008]
push eax
push ebx
call fcn.00405a61
add esp, 0xc
cmp eax, 0xffffffff
je 0x4074c6
sub edi, eax
test edi, edi
jg 0x40749d
jmp 0x4074dc
cmp dword [0x40b118], 5
jne 0x4074d9
mov dword [0x40b114], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.004078b4
pop ecx
pop ecx
jmp 0x407529
jge 0x407529
push 0
push dword [ebp + 0xc]
push ebx
call fcn.00406de6
push ebx
call fcn.00405a25
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 0x407529
mov dword [0x40b114], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x40b118], eax
push 0
push dword [ebp - 8]
push ebx
call fcn.00406de6
add esp, 0xc
mov eax, esi
pop edi
jmp 0x407549
mov dword [0x40b114], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.00404c72
leave
ret