joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47bda0
Capabilities:
Check if file exists
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b58e2
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x4f52c0]
xor eax, esp
mov dword [esp + 0x24], eax
push esi
push edi
mov eax, dword [0x4f52c0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
test eax, eax
je 0x47be82
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x47be82
mov dword [esp + 0xc], 0
mov dword [esp + 0x40], 1
lea eax, [esp + 0x1c]
push eax
push str.Microsoft.XMLDOM
call dword [sym.imp.ole32.dll_CLSIDFromProgID]
mov esi, dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x47be3d
lea ecx, [esp + 0xc]
push ecx
push 0x4d90c8
push 0x17
push 0
lea edx, [esp + 0x2c]
push edx
call esi
test eax, eax
jns 0x47bea7
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.DOMDOCUMENT:_Create_Failed_with_Microsoft.XMLDOM_n
call edi
lea eax, [esp + 0xc]
push eax
push 0x4d90c8
push 0x17
push 0
push 0x4c87c8
call esi
test eax, eax
jns 0x47bea3
push str.DOMDOCUMENT:_Create_Failed_with_CLSID_DOMDocument2_n
call edi
mov dword [esp + 0x40], 0xffffffff
mov eax, dword [esp + 0xc]
test eax, eax
je 0x47be82
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
xor al, al
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0049908b
mov esp, ebp
pop ebp
ret 4
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x47be6a
mov ecx, dword [eax]
mov edx, dword [ecx + 0xfc]
push 0
push eax
call edx
lea esi, [esp + 0x1c]
call fcn.0040ff90
mov byte [esp + 0x40], 3
mov edi, dword [eax]
mov edx, dword [esp + 0xc]
mov esi, dword [edx]
lea ecx, [esp + 0x10]
push ecx
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edi
mov edi, dword [eax + 4]
mov dword [ecx + 4], edi
mov edi, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ecx + 8], edi
mov dword [ecx + 0xc], eax
mov ecx, dword [esi + 0xe8]
push edx
call ecx
mov byte [esp + 0x40], 1
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
cmp word [esp + 0x10], 0
jne 0x47bf28
mov dword [esp + 0x40], 0xffffffff
lea eax, [esp + 0xc]
push eax
call fcn.00461bf0
jmp 0x47be82
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0xc], 0
mov dword [ecx], eax
mov dword [esp + 0x40], 0xffffffff
lea edx, [esp + 0xc]
push edx
call fcn.00461bf0
mov al, 1
jmp 0x47be84
Function at 0x47c280
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b6c10
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x4f52c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0xc]
mov ecx, dword [eax + 0x14]
movzx eax, word [eax + 0x10]
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x47c3e8
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push esi
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x47c3e8
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x47c3e8
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x47c3e8
cmp dword [eax], 0x2e66622e
jne 0x47c3e8
mov edx, 0x10000
cmp dword [eax + 0x3c], edx
jne 0x47c3e8
cmp dword [eax + 0x40], edx
jne 0x47c3e8
lea edi, [ebx + 0x14]
mov dword [ebx + 0x30], ecx
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x34], eax
call fcn.0047cbf0
xor edi, edi
mov dword [ebp + 8], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], edi
mov byte [ebp - 4], 1
mov eax, dword [ebx + 4]
lea ecx, [ebp + 8]
push ecx
push eax
lea edx, [ebx + 0x14]
call fcn.0047cd40
test al, al
je 0x47c3ce
mov ecx, dword [ebx + 0xc]
cmp dword [ecx - 0xc], edi
je 0x47c369
lea edx, [ebx + 0x6c]
push edx
push ecx
lea edx, [ebx + 0x14]
call fcn.0047cd40
test al, al
je 0x47c3ce
mov ecx, dword [ebx + 8]
cmp dword [ecx - 0xc], edi
je 0x47c382
lea eax, [ebx + 0x70]
push eax
push ecx
lea edx, [ebx + 0x14]
call fcn.0047cd40
test al, al
je 0x47c3ce
add ebx, 0x60
cmp ebx, edi
je 0x47c3ce
push ebx
mov ebx, dword [ebp + 8]
mov edi, ebx
call fcn.0047bf60
test al, al
je 0x47c3ca
mov byte [ebp - 4], 0
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push 0
call esi
mov dword [ebp - 4], 0xffffffff
push ebx
call esi
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor edi, edi
jmp 0x47c3d1
mov ebx, dword [ebp + 8]
mov byte [ebp - 4], 0
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push edi
call esi
mov dword [ebp - 4], 0xffffffff
push ebx
call esi
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x47cb00
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
mov edi, eax
mov eax, dword [edi + 0x14]
xor esi, esi
cmp eax, esi
je 0x47cb1f
push eax
call fcn.00499080
add esp, 4
mov dword [edi + 0x14], esi
mov eax, dword [ebp + 8]
push esi
push esi
push 3
push esi
push 1
push SysReAllocStringLen
push eax
mov dword [edi + 0x18], esi
mov dword [edi + 0x1c], esi
mov dword [edi + 0x20], esi
mov dword [edi + 0x34], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x47cb53
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 4
push ebx
push esi
push eax
mov byte [ebp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
call fcn.00499075
mov edx, dword [ebp - 8]
add esp, 4
push 0
lea ecx, [ebp - 4]
push ecx
push ebx
mov esi, eax
push esi
push edx
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x47cbc1
cmp dword [ebp - 4], ebx
jne 0x47cbc1
cmp dword [esi], 0x2e66622e
jne 0x47cbc1
mov eax, 0x10000
cmp dword [esi + 0x3c], eax
jne 0x47cbc1
cmp dword [esi + 0x40], eax
jne 0x47cbc1
cmp dword [esi + 0x64], 0
je 0x47cbc1
mov dword [edi + 0x14], esi
mov dword [edi + 0x1c], ebx
mov dword [edi + 0x18], esi
mov dword [edi + 0x20], esi
call fcn.0047cbf0
mov bl, 1
jmp 0x47cbc4
mov bl, byte [ebp + 0xb]
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
jne 0x47cbdb
push esi
call fcn.0049a88f
add esp, 4
mov al, bl
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x47e500
Capabilities:
Encode data using xor

Disassembly:
mov dword [esp + 0xc], edi
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
mov esi, dword [edi + 0xf0]
lea esi, [esi + esi - 2]
lea esi, [edi + esi*8]
mov dword [esp + 0x10], esi
mov esi, eax
and esi, 0xff
mov esi, dword [ebp + esi*8]
movzx edi, bh
xor esi, dword [ebp + edi*8 + 3]
mov edi, ecx
shr edi, 0x10
and edi, 0xff
xor esi, dword [ebp + edi*8 + 2]
mov edi, edx
shr edi, 0x18
xor esi, dword [ebp + edi*8 + 1]
mov dword [esp + 4], esi
mov esi, ebx
and esi, 0xff
shr ebx, 0x10
mov esi, dword [ebp + esi*8]
movzx edi, ch
xor esi, dword [ebp + edi*8 + 3]
mov edi, edx
shr edi, 0x10
and edi, 0xff
xor esi, dword [ebp + edi*8 + 2]
mov edi, eax
shr edi, 0x18
xor esi, dword [ebp + edi*8 + 1]
mov dword [esp + 8], esi
mov esi, ecx
and esi, 0xff
shr ecx, 0x18
mov esi, dword [ebp + esi*8]
movzx edi, dh
xor esi, dword [ebp + edi*8 + 3]
mov edi, eax
shr edi, 0x10
and edx, 0xff
and edi, 0xff
xor esi, dword [ebp + edi*8 + 2]
movzx edi, bh
xor esi, dword [ebp + edi*8 + 1]
mov edi, dword [esp + 0xc]
mov edx, dword [ebp + edx*8]
movzx eax, ah
xor edx, dword [ebp + eax*8 + 3]
mov eax, dword [esp + 4]
and ebx, 0xff
xor edx, dword [ebp + ebx*8 + 2]
mov ebx, dword [esp + 8]
xor edx, dword [ebp + ecx*8 + 1]
mov ecx, esi
add edi, 0x10
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
cmp edi, dword [esp + 0x10]
mov dword [esp + 0xc], edi
jb 0x47e520
mov esi, eax
and esi, 0xff
mov esi, dword [ebp + esi*8 + 2]
and esi, 0xff
movzx edi, bh
mov edi, dword [ebp + edi*8]
and edi, 0xff00
xor esi, edi
mov edi, ecx
shr edi, 0x10
and edi, 0xff
mov edi, dword [ebp + edi*8]
and edi, 0xff0000
xor esi, edi
mov edi, edx
shr edi, 0x18
mov edi, dword [ebp + edi*8 + 2]
and edi, 0xff000000
xor esi, edi
mov dword [esp + 4], esi
mov esi, ebx
and esi, 0xff
shr ebx, 0x10
mov esi, dword [ebp + esi*8 + 2]
and esi, 0xff
movzx edi, ch
mov edi, dword [ebp + edi*8]
and edi, 0xff00
xor esi, edi
mov edi, edx
shr edi, 0x10
and edi, 0xff
mov edi, dword [ebp + edi*8]
and edi, 0xff0000
xor esi, edi
mov edi, eax
shr edi, 0x18
mov edi, dword [ebp + edi*8 + 2]
and edi, 0xff000000
xor esi, edi
mov dword [esp + 8], esi
mov esi, ecx
and esi, 0xff
shr ecx, 0x18
mov esi, dword [ebp + esi*8 + 2]
and esi, 0xff
movzx edi, dh
mov edi, dword [ebp + edi*8]
and edi, 0xff00
xor esi, edi
mov edi, eax
shr edi, 0x10
and edx, 0xff
and edi, 0xff
mov edi, dword [ebp + edi*8]
and edi, 0xff0000
xor esi, edi
movzx edi, bh
mov edi, dword [ebp + edi*8 + 2]
and edi, 0xff000000
xor esi, edi
mov edi, dword [esp + 0xc]
and edx, 0xff
mov edx, dword [ebp + edx*8 + 2]
and edx, 0xff
movzx eax, ah
mov eax, dword [ebp + eax*8]
and eax, 0xff00
xor edx, eax
mov eax, dword [esp + 4]
and ebx, 0xff
mov ebx, dword [ebp + ebx*8]
and ebx, 0xff0000
xor edx, ebx
mov ebx, dword [esp + 8]
mov ecx, dword [ebp + ecx*8 + 2]
and ecx, 0xff000000
xor edx, ecx
mov ecx, esi
add edi, 0x10
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
ret
Function at 0x47f018
Capabilities:
Encode data using xor

Disassembly:
mov dword [esp + 0xc], edi
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
mov esi, dword [edi + 0xf0]
lea esi, [esi + esi - 2]
lea esi, [edi + esi*8]
mov dword [esp + 0x10], esi
mov esi, eax
and esi, 0xff
mov esi, dword [ebp + esi*8]
movzx edi, dh
xor esi, dword [ebp + edi*8 + 3]
mov edi, ecx
shr edi, 0x10
and edi, 0xff
xor esi, dword [ebp + edi*8 + 2]
mov edi, ebx
shr edi, 0x18
xor esi, dword [ebp + edi*8 + 1]
mov dword [esp + 4], esi
mov esi, ebx
and esi, 0xff
mov esi, dword [ebp + esi*8]
movzx edi, ah
xor esi, dword [ebp + edi*8 + 3]
mov edi, edx
shr edi, 0x10
and edi, 0xff
xor esi, dword [ebp + edi*8 + 2]
mov edi, ecx
shr edi, 0x18
xor esi, dword [ebp + edi*8 + 1]
mov dword [esp + 8], esi
mov esi, ecx
and esi, 0xff
mov esi, dword [ebp + esi*8]
movzx edi, bh
xor esi, dword [ebp + edi*8 + 3]
mov edi, eax
shr edi, 0x10
and edi, 0xff
xor esi, dword [ebp + edi*8 + 2]
mov edi, edx
shr edi, 0x18
xor esi, dword [ebp + edi*8 + 1]
mov edi, dword [esp + 0xc]
and edx, 0xff
mov edx, dword [ebp + edx*8]
movzx ecx, ch
xor edx, dword [ebp + ecx*8 + 3]
mov ecx, esi
shr ebx, 0x10
and ebx, 0xff
xor edx, dword [ebp + ebx*8 + 2]
mov ebx, dword [esp + 8]
shr eax, 0x18
xor edx, dword [ebp + eax*8 + 1]
mov eax, dword [esp + 4]
add edi, 0x10
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
cmp edi, dword [esp + 0x10]
mov dword [esp + 0xc], edi
jb 0x47f038
mov esi, eax
and esi, 0xff
movzx esi, byte [ebp + esi + 0x800]
movzx edi, dh
movzx edi, byte [ebp + edi + 0x800]
shl edi, 8
xor esi, edi
mov edi, ecx
shr edi, 0x10
and edi, 0xff
movzx edi, byte [ebp + edi + 0x800]
shl edi, 0x10
xor esi, edi
mov edi, ebx
shr edi, 0x18
movzx edi, byte [ebp + edi + 0x800]
shl edi, 0x18
xor esi, edi
mov dword [esp + 4], esi
mov esi, ebx
and esi, 0xff
movzx esi, byte [ebp + esi + 0x800]
movzx edi, ah
movzx edi, byte [ebp + edi + 0x800]
shl edi, 8
xor esi, edi
mov edi, edx
shr edi, 0x10
and edi, 0xff
movzx edi, byte [ebp + edi + 0x800]
shl edi, 0x10
xor esi, edi
mov edi, ecx
shr edi, 0x18
movzx edi, byte [ebp + edi + 0x800]
shl edi, 0x18
xor esi, edi
mov dword [esp + 8], esi
mov esi, ecx
and esi, 0xff
movzx esi, byte [ebp + esi + 0x800]
movzx edi, bh
movzx edi, byte [ebp + edi + 0x800]
shl edi, 8
xor esi, edi
mov edi, eax
shr edi, 0x10
and edi, 0xff
movzx edi, byte [ebp + edi + 0x800]
shl edi, 0x10
xor esi, edi
mov edi, edx
shr edi, 0x18
movzx edi, byte [ebp + edi + 0x800]
shl edi, 0x18
xor esi, edi
mov edi, dword [esp + 0xc]
and edx, 0xff
movzx edx, byte [ebp + edx + 0x800]
movzx ecx, ch
movzx ecx, byte [ebp + ecx + 0x800]
shl ecx, 8
xor edx, ecx
mov ecx, esi
shr ebx, 0x10
and ebx, 0xff
movzx ebx, byte [ebp + ebx + 0x800]
shl ebx, 0x10
xor edx, ebx
mov ebx, dword [esp + 8]
shr eax, 0x18
movzx eax, byte [ebp + eax + 0x800]
shl eax, 0x18
xor edx, eax
mov eax, dword [esp + 4]
add edi, 0x10
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
ret
Function at 0x483f00
Capabilities:
Access the windows event log

Disassembly:
mov eax, 0x108
call fcn.0049d400
mov eax, dword [0x4f52c0]
xor eax, esp
mov dword [esp + 0x104], eax
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x483f65
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
je 0x483f65
mov ecx, dword [esp + 0x10c]
lea eax, [esp + 0x110]
push eax
push ecx
call fcn.0049d916
add eax, 0x40
push eax
call fcn.0049eae0
add esp, 0xc
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.0049908b
add esp, 0x108
ret
mov eax, dword [esp + 0x10c]
lea edx, [esp + 0x110]
push edx
push eax
lea ecx, [esp + 0xc]
push 0xff
push ecx
call fcn.0049e9b8
add esp, 0x10
mov byte [esp + 0x103], 0
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x483ff4
call fcn.00483e20
test eax, eax
je 0x483ff4
push esi
push str.OPENSSL
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
push 0
mov esi, eax
lea eax, [esp + 8]
push eax
push 0
push 1
push 0
push 0
push 0
push 1
lea edx, [esp + 0x28]
push esi
mov dword [esp + 0x28], edx
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.0049908b
add esp, 0x108
ret
push 0x10
push str.OpenSSL:_FATAL
lea ecx, [esp + 0xc]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.0049908b
add esp, 0x108
ret
Function at 0x498e0a
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x4f94d4], 0
push esi
push edi
jne 0x498d80
call fcn.00498cec
test eax, eax
je 0x498dc5
mov eax, dword [0x4f94d4]
cmp eax, 1
jne 0x498da1
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x498dc5
jmp 0x498e07
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedPopEntrySList]
push eax
call edi
test eax, eax
jne 0x498e07
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x498dc9
xor eax, eax
jmp 0x498e07
mov eax, dword [esi]
push dword [0x4f94d4]
call edi
mov edi, eax
test edi, edi
je 0x498deb
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x498e07
lea edi, [esi + 0xff0]
push esi
push dword [0x4f94d4]
call dword [sym.imp.KERNEL32.dll_InterlockedPushEntrySList]
add esi, 0x10
cmp esi, edi
jb 0x498df1
mov eax, esi
pop edi
pop esi
ret
jmp 0x498d6c

Function at 0x49908b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4f52c0]
jne 0x499095
repz ret
jmp fcn.0049edbb
Function at 0x4ac31d
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4f52c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.004a0ec2
and dword [ebp - 0x14], 0
cmp dword [0x4fa2f4], 0
mov dword [ebp - 0x18], eax
jne 0x4ac3d0
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x4ac478
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4c8774
push ebx
call edi
test eax, eax
je 0x4ac478
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x4fa2f4], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x4fa2f8], eax
call edi
push eax
call esi
push 0x4c8734
push ebx
mov dword [0x4fa2fc], eax
call edi
push eax
call esi
mov dword [0x4fa304], eax
test eax, eax
je 0x4ac3d0
push 0x4c871c
push ebx
call edi
push eax
call esi
mov dword [0x4fa300], eax
mov eax, dword [0x4fa300]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x4ac429
cmp dword [0x4fa304], ecx
je 0x4ac429
push eax
call esi
push dword [0x4fa304]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x4ac429
test ebx, ebx
je 0x4ac429
call edi
test eax, eax
je 0x4ac420
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x4ac420
test byte [ebp - 8], 1
jne 0x4ac429
or dword [ebp + 0x10], 0x200000
jmp 0x4ac45c
mov eax, dword [0x4fa2f8]
cmp eax, dword [ebp - 0x18]
je 0x4ac45c
push eax
call esi
test eax, eax
je 0x4ac45c
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4ac45c
mov eax, dword [0x4fa2fc]
cmp eax, dword [ebp - 0x18]
je 0x4ac45c
push eax
call esi
test eax, eax
je 0x4ac45c
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x4fa2f4]
call esi
test eax, eax
je 0x4ac478
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x4ac47a
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049908b
leave
ret
Function at 0x401270
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x441a74]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x40128f
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 [0x441a70], 1
mov byte [0x441a6c], bl
jne 0x4012e9
mov ecx, dword [0x45bd6c]
test ecx, ecx
je 0x4012d7
mov esi, dword [0x45bd68]
sub esi, 4
cmp esi, ecx
jb 0x4012d7
mov eax, dword [esi]
test eax, eax
je 0x4012d0
call eax
mov ecx, dword [0x45bd6c]
sub esi, 4
cmp esi, ecx
jae 0x4012c2
push 0x43b01c
push 0x43b014
call fcn.00401320
add esp, 8
push 0x43b024
push 0x43b020
call fcn.00401320
add esp, 8
test ebx, ebx
jne 0x401310
push ebp
mov dword [0x441a74], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x4018d0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x441b88]
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 0x401912
call edi
mov esi, eax
test esi, esi
je 0x4018fc
mov eax, 1
jmp 0x40190d
call ebp
mov ebx, eax
test ebx, ebx
je 0x401a1f
mov eax, 2
mov dword [0x441b88], eax
cmp eax, 1
jne 0x4019b2
test esi, esi
jne 0x40192b
call edi
mov esi, eax
test esi, esi
je 0x401a1f
cmp word [esi], 0
mov eax, esi
je 0x401945
add eax, 2
cmp word [eax], 0
jne 0x401933
add eax, 2
cmp word [eax], 0
jne 0x401933
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 0x4019a4
push edi
call fcn.004025a0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4019a4
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 0x401996
push ebx
call fcn.00402550
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 0x401a1f
test ebx, ebx
jne 0x4019c3
call ebp
mov ebx, eax
test ebx, ebx
je 0x401a1f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x4019db
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4019cb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4019cb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004025a0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4019fd
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 0x402370
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x43b200
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x402394
add eax, 8
inc ebp
cmp eax, 0x43b290
jb 0x402385
cmp ecx, dword [ebp*8 + 0x43b200]
jne 0x40253b
mov eax, dword [0x441a28]
cmp eax, 1
je 0x4024fd
test eax, eax
jne 0x4023c0
cmp dword [0x43b058], 1
je 0x4024fd
cmp ecx, 0xfc
je 0x40253b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4023fb
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 0x402444
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 0x4386c0
add ebx, ecx
push ebx
call fcn.004033f0
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, 0x4386a0
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 + 0x43b204]
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.00403360
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x45bc60]
test eax, eax
je 0x40250e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x402518
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x43b204]
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