joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40ba5e
Capabilities:
Enumerate files on windows
Set current directory

Disassembly:
mov eax, 0x41756c
call fcn.0040ef50
sub esp, 0x150
push ebx
push esi
push edi
mov esi, ecx
push str.CMainFrame::DeleteUtilityShortcuts___n
call fcn.004024eb
pop ecx
lea ecx, [ebp - 0x10]
call fcn.004013e3
and dword [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.004013e3
mov eax, dword [esi + 0x78]
push 7
cmp eax, 2
mov byte [ebp - 4], 1
pop edi
je 0x40bac8
cmp eax, 3
je 0x40bac8
lea eax, [ebp - 0x18]
push edi
push eax
mov ecx, esi
call fcn.0040b9aa
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
call fcn.00401618
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x18]
jmp 0x40bae9
lea eax, [ebp - 0x18]
push 0x18
push eax
mov ecx, esi
call fcn.0040b9aa
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.00401618
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x18]
call fcn.00401563
lea eax, [ebp - 0x10]
push 0x420bb0
push eax
call fcn.00401e2f
pop ecx
test al, al
pop ecx
je 0x40bb0e
mov dword [esi + 0x70], edi
mov dword [esi + 0x74], 0x78
jmp 0x40bb5c
lea ecx, [ebp - 0x10]
call fcn.00401e04
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x40bb2d
mov dword [esi + 0x70], edi
mov dword [esi + 0x74], 0x79
jmp 0x40bb5c
lea eax, [ebp - 0x15c]
push eax
push 0x41dad8
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40bb78
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xa8], eax
mov dword [esi + 0x70], edi
mov dword [esi + 0x74], 0x7a
and byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.00401563
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00401563
xor eax, eax
jmp 0x40bbf3
test byte [ebp - 0x15c], 0x10
jne 0x40bbbf
lea eax, [ebp - 0x130]
lea ecx, [ebp - 0x14]
push eax
call fcn.00401680
push str.E_SPSU__.LNK
lea ecx, [ebp - 0x14]
call fcn.00401e04
push eax
mov ecx, esi
call fcn.0040bc02
test eax, eax
je 0x40bbbf
push ecx
lea eax, [ebp - 0x14]
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
call fcn.004013ef
mov ecx, esi
call fcn.00405f83
lea eax, [ebp - 0x15c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x40bb78
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
and byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.00401563
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00401563
push 1
pop eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x40c9b9
Capabilities:
Create process on windows

Disassembly:
mov eax, 0x41778c
call fcn.0040ef50
sub esp, 0x74
push ebx
push esi
push edi
mov esi, ecx
xor ebx, ebx
push str.CMainFrame::WinExecAsNowUser___n
mov dword [ebp - 4], ebx
call fcn.004024eb
pop ecx
lea eax, [ebp + 0xc]
push ecx
xor edi, edi
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
call fcn.004013ef
mov ecx, esi
call fcn.0040c701
test eax, eax
je 0x40ca0d
push 5
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WinExec]
cmp eax, 0x20
sbb edi, edi
inc edi
jmp 0x40cb28
push 0x20019
push ebx
push ebx
push str.softwareMicrosoftWindows_NTCurrentVersionWinlogon
push 0x80000002
lea ecx, [ebp - 0x2c]
call fcn.0040dc20
cmp dword [ebp - 0x24], ebx
mov byte [ebp - 4], 1
je 0x40cb1d
mov edi, 0x420bb0
lea ecx, [ebp - 0x10]
push edi
call fcn.00401595
mov esi, 0x100
lea eax, [ebp - 0x10]
push esi
push eax
lea eax, [ebp - 0x1c]
push str.DefaultUserName
push eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.0040df98
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.00401563
push edi
lea ecx, [ebp - 0x14]
call fcn.00401595
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x18]
push str.DefaultDomainName
push eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 5
call fcn.0040df98
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 7
call fcn.00401563
push 0x44
lea eax, [ebp - 0x80]
pop esi
push esi
push ebx
push eax
call fcn.0040ef70
add esp, 0xc
mov dword [ebp - 0x80], esi
mov word [ebp - 0x50], 1
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
call fcn.0040efd0
pop ecx
mov esi, eax
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x3c]
lea ecx, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x80]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push esi
push ebx
call fcn.00401e04
push eax
lea ecx, [ebp - 0x18]
call fcn.00401e04
push eax
call fcn.0040e8ff
add esp, 0x30
mov edi, eax
push esi
call fcn.0040eaf0
pop ecx
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x18]
call fcn.00401563
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.00401563
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.0040dcd0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00401563
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8
Function at 0x40d246
Capabilities:
Delete file
Get file size
Read file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
lea ebx, [esi + 0x28]
xor edi, edi
mov ecx, ebx
call fcn.004014c2
push dword [esp + 0x18]
mov ecx, esi
call fcn.0040d337
mov esi, eax
cmp esi, 1
jne 0x40d322
mov ecx, ebx
call fcn.00401b7a
test eax, eax
jne 0x40d322
push eax
push 0x80
push 3
push eax
push esi
push 0x80000000
mov ecx, ebx
call fcn.00401e04
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40d320
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x40d320
test edi, edi
je 0x40d2c1
push edi
call fcn.0040eaf0
pop ecx
lea eax, [esi + 1]
push eax
call fcn.0040efd0
and dword [esp + 0x1c], 0
pop ecx
mov edi, eax
lea eax, [esp + 0x18]
push 0
push eax
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40d317
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x18], esi
jne 0x40d317
mov ecx, ebx
call fcn.00401e04
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x420bb0
mov ecx, ebx
call fcn.00401680
mov ecx, dword [esp + 0x10]
push edi
jmp 0x40d263
push edi
call fcn.0040eaf0
pop ecx
xor edi, edi
xor esi, esi
test edi, edi
je 0x40d32d
push edi
call fcn.0040eaf0
pop ecx
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4

Function at 0x40dce6
Capabilities:
Query or enumerate registry key

Disassembly:
mov eax, 0x41793b
call fcn.0040ef50
sub esp, 0x20
and dword [ebp - 0x24], 0
push ebx
mov ebx, ecx
cmp dword [ebx + 8], 0
jne 0x40dd15
mov ecx, dword [ebp + 8]
push 0x420bb0
call fcn.00401595
mov eax, dword [ebp + 8]
jmp 0x40ddb7
push edi
push esi
push 0x420bb0
lea ecx, [ebp - 0x14]
call fcn.00401595
push 1
mov esi, 0x100
pop edi
push esi
mov dword [ebp - 4], edi
call fcn.0040efd0
pop ecx
mov dword [ebp - 0x10], eax
push esi
call fcn.0040efd0
pop ecx
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x20], esi
push ecx
lea ecx, [ebp - 0x1c]
push ecx
push eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [ebp - 0x1c], esi
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push dword [ebx + 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x40dd85
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40dd7a
push dword [ebp - 0x18]
call fcn.00401680
push dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
call fcn.00401680
push dword [ebp - 0x10]
call fcn.0040eaf0
pop ecx
push dword [ebp - 0x18]
call fcn.0040eaf0
pop ecx
lea eax, [ebp - 0x14]
mov ecx, dword [ebp + 8]
push eax
call fcn.004013ef
and byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x24], edi
call fcn.00401563
mov eax, dword [ebp + 8]
pop esi
pop edi
mov ecx, dword [ebp - 0xc]
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc
Function at 0x40ddc6
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x417967
call fcn.0040ef50
sub esp, 0x10
push ebx
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
cmp dword [edi + 8], ebx
jne 0x40ddf3
mov ecx, dword [ebp + 8]
push 0x420bb0
call fcn.00401595
mov eax, dword [ebp + 8]
jmp 0x40de64
push esi
push 0x420bb0
lea ecx, [ebp - 0x10]
call fcn.00401595
push 1
mov eax, 0x100
pop esi
mov dword [ebp - 0x18], eax
push eax
mov dword [ebp - 4], esi
call fcn.0040efd0
pop ecx
mov dword [ebp - 0x14], eax
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x18]
push ebx
push ecx
push eax
push dword [ebp + 0xc]
push dword [edi + 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x40de3d
push dword [ebp - 0x14]
lea ecx, [ebp - 0x10]
call fcn.00401680
push dword [ebp - 0x14]
call fcn.0040eaf0
pop ecx
lea eax, [ebp - 0x10]
mov ecx, dword [ebp + 8]
push eax
call fcn.004013ef
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], bl
call fcn.00401563
mov eax, dword [ebp + 8]
pop esi
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
pop ebx
leave
ret 8

Function at 0x40de74
Capabilities:
Delete registry key

Disassembly:
mov eax, 0x41798c
call fcn.0040ef50
sub esp, 0x1c
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi + 8], ebx
je 0x40df3c
push ebx
lea ecx, [ebp - 0x28]
push dword [esi + 0xc]
push ebx
push dword [ebp + 8]
push dword [esi + 4]
call fcn.0040dc20
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], ebx
call fcn.004013e3
push ebx
lea eax, [ebp - 0x18]
push ebx
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.0040dce6
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.00401618
mov edi, 0x420bb0
lea eax, [ebp - 0x14]
push edi
push eax
call fcn.00401e9b
pop ecx
mov byte [ebp - 0xd], al
pop ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x18]
call fcn.00401563
cmp byte [ebp - 0xd], bl
je 0x40df40
lea ecx, [ebp - 0x14]
call fcn.00401e04
push eax
lea ecx, [ebp - 0x28]
call fcn.0040de74
test eax, eax
je 0x40df25
push ebx
lea eax, [ebp - 0x18]
push ebx
push eax
lea ecx, [ebp - 0x28]
call fcn.0040dce6
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.00401618
jmp 0x40ded3
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call fcn.00401563
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.0040dcd0
xor eax, eax
jmp 0x40df68
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call fcn.00401563
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.0040dcd0
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
neg eax
sbb eax, eax
inc eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4

Function at 0x40e104
Capabilities:
Set registry value

Disassembly:
cmp dword [ecx + 8], 0
jne 0x40e10e
xor eax, eax
jmp 0x40e12c
push dword [esp + 0xc]
push dword [esp + 0xc]
push 3
push 0
push dword [esp + 0x14]
push dword [ecx + 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
neg eax
sbb eax, eax
inc eax
ret 0xc
Function at 0x40e8ff
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x5522c
call fcn.0040fe30
push ebx
push esi
push edi
lea eax, [ebp - 0x5522c]
push 0x400
push eax
xor edi, edi
xor esi, esi
call fcn.0040e5e8
pop ecx
cmp eax, edi
pop ecx
mov dword [ebp - 0x20], eax
je 0x40ea88
cmp eax, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], edi
jle 0x40ea88
mov ebx, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x5522c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push dword [eax]
push 1
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, edi
mov dword [ebp - 0x14], eax
je 0x40ea72
lea ecx, [ebp - 4]
push ecx
push 0x2000f
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov esi, eax
cmp esi, edi
je 0x40ea69
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
push edi
push edi
push 1
push dword [ebp - 4]
call ebx
cmp dword [ebp - 8], edi
mov esi, eax
je 0x40ea60
push dword [ebp - 8]
call fcn.0040efd0
mov edi, eax
pop ecx
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push edi
push 1
push dword [ebp - 4]
call ebx
mov esi, eax
mov eax, 0x104
test esi, esi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
je 0x40ea57
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x128]
push eax
push dword [edi]
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
mov esi, eax
test esi, esi
je 0x40ea57
push dword [ebp + 8]
lea eax, [ebp - 0x22c]
push eax
call fcn.0040fa00
pop ecx
test eax, eax
pop ecx
jne 0x40ea57
push dword [ebp + 0xc]
lea eax, [ebp - 0x128]
push eax
call fcn.0040fa00
pop ecx
test eax, eax
pop ecx
jne 0x40ea57
xor esi, esi
cmp dword [ebp - 4], esi
je 0x40ea57
push dword [ebp + 0x34]
push dword [ebp + 0x30]
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
mov esi, eax
test esi, esi
jne 0x40ea8f
push edi
call fcn.0040eaf0
pop ecx
xor edi, edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 0x10]
add dword [ebp - 0xc], 0x154
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x20]
jl 0x40e94e
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret
push edi
call fcn.0040eaf0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
push dword [ebp - 4]
call esi
push dword [ebp - 0x14]
call esi
push 1
pop eax
jmp 0x40ea8a
Function at 0x410870
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x420d2c]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x41088f
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x420d28], 1
mov byte [0x420d24], bl
jne 0x4108e9
mov ecx, dword [0x4222f0]
test ecx, ecx
je 0x4108d7
mov esi, dword [0x4222ec]
sub esi, 4
cmp esi, ecx
jb 0x4108d7
mov eax, dword [esi]
test eax, eax
je 0x4108d0
call eax
mov ecx, dword [0x4222f0]
sub esi, 4
cmp esi, ecx
jae 0x4108c2
push 0x41c02c
push 0x41c024
call fcn.00410920
add esp, 8
push 0x41c038
push 0x41c030
call fcn.00410920
add esp, 8
test ebx, ebx
jne 0x410910
push ebp
mov dword [0x420d2c], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x413d80
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x4210b8]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x413dc2
call edi
mov esi, eax
test esi, esi
je 0x413dac
mov eax, 1
jmp 0x413dbd
call ebp
mov ebx, eax
test ebx, ebx
je 0x413ecf
mov eax, 2
mov dword [0x4210b8], eax
cmp eax, 1
jne 0x413e62
test esi, esi
jne 0x413ddb
call edi
mov esi, eax
test esi, esi
je 0x413ecf
cmp word [esi], 0
mov eax, esi
je 0x413df5
add eax, 2
cmp word [eax], 0
jne 0x413de3
add eax, 2
cmp word [eax], 0
jne 0x413de3
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x413e54
push edi
call fcn.00411490
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x413e54
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x413e46
push ebx
call fcn.004107b0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x413ecf
test ebx, ebx
jne 0x413e73
call ebp
mov ebx, eax
test ebx, ebx
je 0x413ecf
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x413e8b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x413e7b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x413e7b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00411490
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x413ead
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x414120
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x420570
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x414144
add eax, 8
inc ebp
cmp eax, 0x420600
jb 0x414135
cmp ecx, dword [ebp*8 + 0x420570]
jne 0x4142eb
mov eax, dword [0x420ce0]
cmp eax, 1
je 0x4142ad
test eax, eax
jne 0x414170
cmp dword [0x41e184], 1
je 0x4142ad
cmp ecx, 0xfc
je 0x4142eb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4141ab
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x4141f4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x418ab8
add ebx, ecx
push ebx
call fcn.00414380
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x418a98
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x420574]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00414ae0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x4221e0]
test eax, eax
je 0x4142be
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x4142c8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x420574]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor 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 edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x414540
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x4222e0]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x4146ed
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x4221e0]
lea edi, [ecx*4 + 0x4221e0]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x4146ed
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x4145ae
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x4145bf
push 2
push ebp
push eax
call fcn.00414480
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x41471e
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x414669
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x41461a
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x414607
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x4145ea
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41470f
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x414665
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x4145e6
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4146de
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4146b2
cmp eax, 5
jne 0x41469b
mov dword [0x420ce8], eax
mov dword [0x420ce4], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00414d40
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x4146d2
cmp byte [ebp], 0x1a
jne 0x4146d2
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x420ce4], 0x1c
jmp 0x4146f7
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x420ce4], 9
pop edi
pop esi
pop ebp
mov dword [0x420ce8], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x414665
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41474f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x414669
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x414669