joyce8/EMBER2024-capa huggingface dataset:
Function at 0x43cbd0
Capabilities:
Delete registry key

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push edi
inc eax
push eax
mov edi, ecx
call fcn.0046b3ee
mov ecx, dword [esi]
mov edx, dword [ecx - 0xc]
mov ebx, eax
mov byte [ebx + edx], 0
mov ecx, dword [esi]
mov edx, dword [ecx - 0xc]
add esp, 4
xor eax, eax
test edx, edx
jle 0x43cc10
nop
mov cl, byte [ecx + eax]
mov byte [eax + ebx], cl
mov ecx, dword [esi]
mov edx, dword [ecx - 0xc]
inc eax
cmp eax, edx
jl 0x43cc00
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp]
push str.HKEY_CLASSES_ROOT
push eax
call fcn.00458d9e
add esp, 8
test eax, eax
jne 0x43cc61
mov al, byte [edi + 0x178]
test al, al
jne 0x43cc54
push ebx
push SysReAllocString
mov ecx, edi
call fcn.0043c970
push ebx
mov esi, eax
call fcn.0046b3f3
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 8
mov esi, dword [esi]
push esi
push SysReAllocString
jmp 0x43cd8d
mov eax, dword [ebp]
push str.HKEY_CURRENT_USER
push eax
call fcn.00458d9e
add esp, 8
test eax, eax
jne 0x43ccae
mov al, byte [edi + 0x178]
test al, al
jne 0x43cca1
push ebx
push SysReAllocString
mov ecx, edi
call fcn.0043c970
push ebx
mov esi, eax
call fcn.0046b3f3
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 8
mov esi, dword [esi]
push esi
push SysReAllocString
jmp 0x43cd8d
mov eax, dword [ebp]
push str.HKEY_LOCAL_MACHINE
push eax
call fcn.00458d9e
add esp, 8
test eax, eax
jne 0x43ccfb
mov al, byte [edi + 0x178]
test al, al
jne 0x43ccee
push ebx
push reloc.OLEAUT32.dll_SysReAllocString
mov ecx, edi
call fcn.0043c970
push ebx
mov esi, eax
call fcn.0046b3f3
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 8
mov esi, dword [esi]
push esi
push reloc.OLEAUT32.dll_SysReAllocString
jmp 0x43cd8d
mov eax, dword [ebp]
push str.HKEY_USERS
push eax
call fcn.00458d9e
add esp, 8
test eax, eax
jne 0x43cd45
mov al, byte [edi + 0x178]
test al, al
jne 0x43cd3b
push ebx
push SysStringLen
mov ecx, edi
call fcn.0043c970
push ebx
mov esi, eax
call fcn.0046b3f3
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 8
mov esi, dword [esi]
push esi
push SysStringLen
jmp 0x43cd8d
mov ebp, dword [ebp]
push str.HKEY_CURRENT_CONFIG
push ebp
call fcn.00458d9e
add esp, 8
test eax, eax
jne 0x43cda7
mov al, byte [edi + 0x178]
test al, al
jne 0x43cd85
push ebx
push OleUIBusyA
mov ecx, edi
call fcn.0043c970
push ebx
mov esi, eax
call fcn.0046b3f3
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 8
mov esi, dword [esi]
push esi
push OleUIBusyA
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push ebx
mov esi, eax
call fcn.0046b3f3
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 8
push ebx
call fcn.0046b3f3
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret 8
Function at 0x43cdc0
Capabilities:
Delete registry value

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi]
push str.HKEY_CLASSES_ROOT
push eax
call fcn.00458d9e
add esp, 8
test eax, eax
jne 0x43cdf3
mov eax, dword [esp + 0xc]
mov eax, dword [eax]
lea ecx, [esp + 8]
push ecx
push 2
push 0
push eax
push SysReAllocString
jmp 0x43ce9d
mov eax, dword [esi]
push str.HKEY_CURRENT_USER
push eax
call fcn.00458d9e
add esp, 8
test eax, eax
jne 0x43ce1e
mov edx, dword [esp + 0xc]
mov eax, dword [edx]
lea ecx, [esp + 8]
push ecx
push 2
push 0
push eax
push SysReAllocString
jmp 0x43ce9d
mov eax, dword [esi]
push str.HKEY_LOCAL_MACHINE
push eax
call fcn.00458d9e
add esp, 8
test eax, eax
jne 0x43ce49
mov edx, dword [esp + 0xc]
mov eax, dword [edx]
lea ecx, [esp + 8]
push ecx
push 2
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
jmp 0x43ce9d
mov eax, dword [esi]
push str.HKEY_USERS
push eax
call fcn.00458d9e
add esp, 8
test eax, eax
jne 0x43ce74
mov edx, dword [esp + 0xc]
mov eax, dword [edx]
lea ecx, [esp + 8]
push ecx
push 2
push 0
push eax
push SysStringLen
jmp 0x43ce9d
mov esi, dword [esi]
push str.HKEY_CURRENT_CONFIG
push esi
call fcn.00458d9e
add esp, 8
test eax, eax
jne 0x43cece
mov edx, dword [esp + 0xc]
mov eax, dword [edx]
lea ecx, [esp + 8]
push ecx
push 2
push 0
push eax
push OleUIBusyA
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x43cec8
mov edx, dword [esp + 0x10]
mov eax, dword [edx]
push eax
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ecx, dword [esp + 8]
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
ret 0xc
mov eax, 1
pop esi
ret 0xc
Function at 0x44a130
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x47b648
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push esi
push edi
mov edi, ecx
lea eax, [esp + 0x4c]
lea esi, [edi + 0x100]
push eax
mov ecx, esi
mov dword [esp + 0x44], 0
call fcn.0044c3c0
push str.registry
lea ecx, [esp + 0xc]
call fcn.00405920
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x44], 1
call fcn.0044c3f0
mov eax, dword [esp + 8]
add eax, 0xfffffff0
mov byte [esp + 0x40], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x44a1a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push 1
push 1
push 1
push esi
lea ecx, [esp + 0x1c]
call fcn.0044c530
mov eax, dword [esp + 0x48]
push eax
mov ecx, edi
call fcn.00449e80
push 1
push 1
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x1c]
call fcn.0044cad0
mov ecx, esi
call fcn.0044c270
mov ecx, dword [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0xc]
mov byte [esp + 0x40], 0
call fcn.00410870
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
mov dword [esp + 0x40], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
pop edi
pop esi
jg 0x44a21a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
add esp, 0x3c
ret 8

Function at 0x44a250
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
push edi
mov esi, ecx
xor edi, edi
mov dword [esi + 8], edi
mov ecx, dword [esi + 0x48]
test ecx, ecx
jne 0x44a272
xor eax, eax
jmp 0x44a27a
mov eax, dword [esi + 0x4c]
sub eax, ecx
sar eax, 3
cmp edi, eax
jge 0x44a2ad
mov eax, dword [esi + 0x48]
mov ecx, dword [eax + edi*8]
push 0x80
push ecx
call ebp
mov edx, dword [esi + 0x48]
mov cl, byte [edx + edi*8 + 4]
test cl, cl
lea eax, [edx + edi*8]
jne 0x44a2aa
mov eax, dword [eax]
push eax
call ebx
test eax, eax
je 0x44a2aa
inc dword [esi + 8]
mov byte [esi + 0x28], 1
inc edi
jmp 0x44a267
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x44df0f
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x44df62
call fcn.00472326
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
je 0x44df62
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x44df58
xor eax, eax
jmp 0x44e077
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
je 0x44df91
mov eax, dword [edi]
push ebx
push dword [ebp - 4]
mov ecx, edi
push dword [ebp + 8]
call dword [eax + 0x1c]
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x44df91
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x48]
test eax, eax
je 0x44e074
mov edi, dword [eax + 0x40]
and dword [ebp + 0x10], 0
xor eax, eax
cmp edi, eax
mov dword [ebp + 0xc], edi
mov dword [ebp - 8], edi
je 0x44dfc0
mov ecx, dword [edi]
mov dword [ebp + 0xc], ecx
mov ecx, dword [edi + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp + 0x10], ecx
cmp dword [ebx + 8], eax
mov dword [ebp - 4], eax
jbe 0x44e074
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x44dffe
mov ecx, dword [ecx + 4]
mov edx, dword [ebx + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x44dffe
test edi, edi
mov dword [ebp - 8], edi
je 0x44dff8
mov eax, dword [edi]
mov dword [ebp + 0xc], eax
mov eax, dword [edi + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
jmp 0x44e064
and dword [ebp + 0x10], 0
jmp 0x44e064
mov ecx, dword [ebx + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x44e064
push 0xc
call fcn.0046b3c3
mov esi, eax
test esi, esi
pop ecx
je 0x44e043
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1c]
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x10]
add eax, edx
push dword [eax]
mov edi, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
and dword [esi + 4], 0
mov dword [esi + 8], edi
mov edi, dword [ebp + 0xc]
mov dword [esi], eax
jmp 0x44e045
xor esi, esi
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x44e05f
push dword [ebp - 8]
call fcn.004662f5
jmp 0x44e064
call fcn.004662cc
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [ebx + 8]
mov dword [ebp - 4], eax
jb 0x44dfcc
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x457166
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x457183
call fcn.0045a427
mov dword [eax], 0x16
xor eax, eax
jmp 0x4571ed
push esi
push 0x88
push 1
call fcn.0045b6e4
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x4571d8
push esi
call fcn.0045c08a
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x4571b6
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x4570c2
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x4571ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.00457e74
test ebx, ebx
pop ecx
je 0x4571ea
push ebx
call fcn.0045a439
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x457c15
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 8
call fcn.0045d2de
xor esi, esi
inc esi
cmp dword [0x49c40c], esi
pop ecx
jne 0x457c3d
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 [0x49c408], esi
mov byte [0x49c404], al
jne 0x457ca3
mov ecx, dword [0x49dc6c]
test ecx, ecx
je 0x457c84
mov eax, dword [0x49dc68]
sub eax, 4
cmp eax, ecx
jmp 0x457c7d
mov eax, dword [eax]
test eax, eax
je 0x457c6f
call eax
mov eax, dword [0x49dc68]
sub eax, 4
cmp eax, dword [0x49dc6c]
mov dword [0x49dc68], eax
jae 0x457c67
mov eax, 0x498094
mov esi, 0x49809c
cmp eax, esi
mov edi, eax
jae 0x457ca3
mov eax, dword [edi]
test eax, eax
je 0x457c9c
call eax
add edi, 4
cmp edi, esi
jb 0x457c94
mov eax, 0x4980a0
mov esi, 0x4980a8
cmp eax, esi
mov edi, eax
jae 0x457cc2
mov eax, dword [edi]
test eax, eax
je 0x457cbb
call eax
add edi, 4
cmp edi, esi
jb 0x457cb3
cmp dword [ebp + 0x10], 0
pop edi
pop esi
je 0x457cd3
push 8
call fcn.0045d24a
jmp 0x457ce5
push dword [ebp + 8]
mov dword [0x49c40c], 1
call fcn.00457b6e
pop ecx
pop ebp
ret

Function at 0x4591c6
Capabilities:
Set current directory

Disassembly:
push 0x10
push 0x4897c0
call fcn.0045a014
mov ebx, dword [ebp + 8]
cmp ebx, 1
jl 0x459235
cmp ebx, 0x1f
jg 0x459235
push 7
call fcn.0045d2de
pop ecx
and dword [ebp - 4], 0
add ebx, 0x40
mov byte [ebp - 0x1c], bl
mov byte [ebp - 0x1b], 0x3a
and byte [ebp - 0x1a], 0
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x45920d
and dword [ebp - 0x20], 0
jmp 0x45921e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0045a439
pop ecx
or dword [ebp - 0x20], 0xffffffff
or dword [ebp - 4], 0xffffffff
call fcn.0045922c
mov eax, dword [ebp - 0x20]
jmp 0x45924e
call fcn.0045a427
mov dword [eax], 0xd
call fcn.0045a430
mov dword [eax], 0xf
or eax, 0xffffffff
call fcn.0045a04f
ret
Function at 0x459617
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x459637
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0045a439
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x45965a
test byte [esp + 8], 2
je 0x45965a
call fcn.0045a427
mov dword [eax], 0xd
call fcn.0045a430
mov dword [eax], 5
jmp 0x459633
xor eax, eax
ret

Function at 0x459727
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x489828
call fcn.0045a014
mov edi, 0x94
mov eax, edi
call fcn.00457240
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 [0x49c3cc], ecx
mov eax, dword [esi + 4]
mov dword [0x49c3d8], eax
mov edx, dword [esi + 8]
mov dword [0x49c3dc], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x49c3d0], esi
cmp ecx, 2
je 0x459787
or esi, 0x8000
mov dword [0x49c3d0], esi
shl eax, 8
add eax, edx
mov dword [0x49c3d4], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4597c2
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4597c2
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4597da
cmp eax, 0x20b
je 0x4597c7
mov dword [ebp - 0x1c], esi
jmp 0x4597ee
cmp dword [ecx + 0x84], 0xe
jbe 0x4597c2
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4597e8
cmp dword [ecx + 0x74], 0xe
jbe 0x4597c2
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0045e2b1
pop ecx
test eax, eax
jne 0x459802
push 0x1c
call fcn.00459703
pop ecx
call fcn.0045c279
test eax, eax
jne 0x459813
push 0x10
call fcn.00459703
pop ecx
call fcn.0045e20f
mov dword [ebp - 4], esi
call fcn.004615d7
test eax, eax
jge 0x45982c
push 0x1b
call fcn.004596de
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x49dc60], eax
call fcn.004614b5
mov dword [0x49c418], eax
call fcn.00461413
test eax, eax
jge 0x459852
push 8
call fcn.004596de
pop ecx
call fcn.004611e0
test eax, eax
jge 0x459863
push 9
call fcn.004596de
pop ecx
call fcn.00457bb0
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x459876
push eax
call fcn.004596de
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00461177
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x459897
movzx eax, word [ebp - 0x34]
jmp 0x45989a
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.00464bbc
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4598b8
push edi
call fcn.00457ce8
call fcn.00457d0a
jmp 0x4598ea
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0045a04f
ret
Function at 0x45f31e
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.00457240
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x45f3b3
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 [0x49c3cc]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x45f3b3
cmp eax, 1
je 0x45f3cb
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 0x45f3b3
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x45f388
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x45f3af
xor eax, eax
inc eax
jmp 0x45f3e7
cmp esi, ebx
jae 0x45f3b7
xor eax, eax
jmp 0x45f3e7
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x49c3cc]
jmp 0x45f3cd
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 0x46061c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x4994a0]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x460645
xor eax, eax
jmp 0x4607b3
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x49c8e0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x460678
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.00462fc0
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x46074a
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x460785
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x4606d3
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4606c4
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x4606a7
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x460713
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x46071c
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x460698
jmp 0x46071e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x4607ae
cmp dword [ebp - 8], edi
je 0x460785
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x460777
call fcn.0045a427
mov dword [eax], 9
call fcn.0045a430
mov dword [eax], esi
jmp 0x460780
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46076c
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x46071e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x46071e
push dword [ebp - 8]
call fcn.0045a439
pop ecx
or eax, 0xffffffff
jmp 0x4607b1
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x46079a
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x46079a
xor eax, eax
jmp 0x4607b1
call fcn.0045a427
mov dword [eax], 0x1c
call fcn.0045a430
mov dword [eax], edi
jmp 0x460780
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.00456aa7
leave
ret
Function at 0x460fc7
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4994a0]
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 + 0x499f40]
je 0x460ff4
inc eax
cmp eax, 0x12
jb 0x460fe5
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x499f40]
jne 0x461128
mov eax, dword [0x49c420]
cmp eax, 1
je 0x461103
cmp eax, edx
jne 0x461024
cmp dword [0x4995a4], 1
je 0x461103
cmp ecx, 0xfc
je 0x461128
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 0x46105d
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.0045cf50
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.00459cc0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x46109f
lea eax, [ebp - 0x10c]
push eax
call fcn.00459cc0
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x4899c8
push edi
call fcn.00458ef0
add esp, 0x10
push edi
call fcn.00459cc0
push dword [esi + 0x499f44]
mov ebx, eax
call fcn.00459cc0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00457240
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0045cf50
push edi
push ebx
call fcn.0045cf60
push 0x4899c4
push ebx
call fcn.0045cf60
push dword [esi + 0x499f44]
push ebx
call fcn.0045cf60
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004620dd
add esp, 0x2c
jmp 0x461128
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x499f44]
push dword [esi]
call fcn.00459cc0
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.00456aa7
pop edi
pop esi
pop ebx
leave
ret
Function at 0x461a34
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x461bfa
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x49c8e0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x461bfa
test cl, 0x48
je 0x461a9a
mov al, byte [eax + 5]
cmp al, 0xa
je 0x461a9a
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x461aec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x461ad4
call fcn.0045a427
mov dword [eax], 9
call fcn.0045a430
mov dword [eax], esi
jmp 0x461ae4
cmp eax, 0x6d
je 0x461bfa
push eax
call fcn.0045a439
pop ecx
or eax, 0xffffffff
jmp 0x461bfc
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x461bf5
test edx, edx
je 0x461b0f
cmp byte [ebx], 0xa
jne 0x461b0f
or al, 4
jmp 0x461b11
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x461bef
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x461bdf
cmp al, 0xd
je 0x461b45
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x461bd1
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x461b5f
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x461b5a
add dword [ebp + 0x10], 2
jmp 0x461bb3
mov dword [ebp + 0x10], eax
jmp 0x461bcd
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x461b87
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x461bcd
cmp dword [ebp - 0xc], 0
je 0x461bcd
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x461ba8
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x461bb3
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x461bd0
cmp ebx, dword [ebp + 0xc]
jne 0x461bb8
cmp byte [ebp - 1], 0xa
jne 0x461bb8
mov byte [ebx], 0xa
jmp 0x461bd0
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00461cac
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x461bd1
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x461b29
jmp 0x461bef
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x461bef
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x461bfc
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret