joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405170
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x26c
mov eax, dword [0x426168]
xor eax, esp
mov dword [esp + 0x268], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
cmp ebx, edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edi
je 0x4051b4
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4051a3
sub eax, edx
sar eax, 1
mov edi, eax
lea eax, [edi + edi + 0x212]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
mov dword [esp + 0x1c], esi
je 0x405371
cmp edi, 0xff
mov dword [esp + 0x10], esi
jb 0x40522a
mov ecx, ebx
sub ecx, 0x420cc4
xor eax, eax
nop
mov dx, word [ecx + eax + 0x420cc4]
cmp dx, word [eax + 0x420cc4]
jne 0x40520b
add eax, 2
cmp eax, 8
jb 0x4051f0
jmp 0x40522a
mov eax, 0x420cc4
mov edx, esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405214
add esi, 8
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x10]
lea esi, [edi + edi]
push esi
push ebx
push eax
call fcn.0040e600
mov ebx, dword [esp + 0x1c]
add esp, 0xc
test edi, edi
je 0x40524c
cmp word [esi + ebx - 2], 0x5c
je 0x405255
mov word [esi + ebx], 0x5c
add edi, 1
lea esi, [ebx + edi*2]
mov eax, 0x420cbc
mov edx, esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405261
push 0x24c
lea ecx, [esp + 0x28]
push 0
push ecx
mov dword [esp + 0x2c], 0
call fcn.0040e580
mov eax, dword [esp + 0x28]
add esp, 0xc
lea edx, [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x40535d
lea ecx, [esp + 0x4c]
sub esi, ecx
lea eax, [esp + 0x4c]
movzx ecx, word [eax]
mov word [esi + eax], cx
add eax, 2
test cx, cx
jne 0x4052b3
mov eax, dword [esp + 0x20]
test eax, 0x10400
jne 0x405329
test al, 0x10
je 0x40530f
cmp word [esp + 0x4c], 0x2e
jne 0x4052e9
mov ax, word [esp + 0x4e]
test ax, ax
je 0x405329
cmp ax, 0x2e
je 0x405329
mov edi, dword [esp + 0x18]
mov edx, dword [edi]
mov edx, dword [edx + 8]
lea eax, [esp + 0x20]
push eax
push ebx
mov ecx, edi
call edx
test al, al
je 0x40532d
mov eax, dword [edi]
mov edx, dword [eax]
push ebx
mov ecx, edi
call edx
add dword [esp + 0x14], eax
jmp 0x40532d
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
lea edx, [esp + 0x20]
push edx
push ebx
call eax
test al, al
je 0x405329
add dword [esp + 0x14], 1
mov edi, dword [esp + 0x18]
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
mov ecx, edi
call eax
test al, al
jne 0x405352
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4052af
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x1c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x274]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040d2aa
mov esp, ebp
pop ebp
ret 4
Function at 0x4053b0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41d0eb
mov eax, dword fs:[0]
push eax
push ebx
push esi
mov eax, dword [0x426168]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor eax, eax
xor ebx, ebx
mov word [esi + 4], bx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [esi + 0x1c]
mov dword [esi], vtable.CUpgradeScanner.0
call fcn.00402180
mov dword [ebp - 4], ebx
mov byte [esi + 0x20], bl
mov dword [esi + 0x24], ebx
call fcn.00407a20
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], ebx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x405750
Capabilities:
Move file

Disassembly:
push ebx
push esi
push edi
mov edi, eax
mov eax, dword [edi + 0x2c]
mov esi, dword [eax]
add edi, 0x28
lea ecx, [ecx]
cmp edi, edi
mov ebx, dword [edi + 4]
je 0x40576c
call fcn.0040e31a
cmp esi, ebx
je 0x4057a2
cmp esi, dword [edi + 4]
jne 0x40577a
call fcn.0040e31a
cmp esi, dword [edi + 4]
mov ebx, dword [esi + 8]
jne 0x405787
call fcn.0040e31a
mov ecx, dword [esi + 0xc]
push 1
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp esi, dword [edi + 4]
jne 0x40579e
call fcn.0040e31a
mov esi, dword [esi]
jmp 0x405760
pop edi
pop esi
pop ebx
ret

Function at 0x406390
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x426168]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edi, edi
push edi
push 2
mov ebx, eax
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
je 0x40641c
push 0x228
lea eax, [ebp - 0x22c]
push edi
push eax
call fcn.0040e580
add esp, 0xc
lea ecx, [ebp - 0x230]
push ecx
push esi
mov dword [ebp - 0x230], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x406415
nop
test edi, edi
jne 0x406415
cmp dword [ebp - 0x228], ebx
jne 0x406404
mov edi, dword [ebp - 0x218]
jmp 0x406411
lea edx, [ebp - 0x230]
push edx
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x4063f0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040d2aa
mov esp, ebp
pop ebp
ret
Function at 0x408b20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
test eax, eax
push edi
mov edi, ecx
mov dword [ebp - 4], edi
je 0x408bd5
cmp word [eax], 0
je 0x408bd5
cmp dword [ebp + 0xc], 0
jne 0x408b4c
mov dword [ebp + 0xc], 0x420b1c
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
call esi
mov ebx, eax
lea eax, [ebx + ebx + 2]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [edi], eax
je 0x408bd3
mov ecx, dword [ebp + 0xc]
push ecx
call esi
xor edx, edx
test ebx, ebx
jbe 0x408bcb
mov edi, dword [ebp + 0x10]
cmp edi, eax
jb 0x408b88
xor edi, edi
mov ecx, dword [ebp + 8]
movzx esi, word [ecx + edx*2]
mov ecx, dword [ebp + 0xc]
movzx ecx, word [ecx + edi*2]
cmp si, cx
jne 0x408ba0
movzx ecx, si
jmp 0x408ba5
xor ecx, esi
movzx ecx, cx
test cx, cx
je 0x408bb0
cmp cx, 0x5c
jne 0x408bb5
mov ecx, 0x2a
mov esi, dword [ebp - 4]
mov esi, dword [esi]
mov word [esi + edx*2], cx
add edx, 1
add edi, 1
cmp edx, ebx
jb 0x408b82
mov edi, dword [ebp - 4]
mov edx, dword [edi]
mov word [edx + ebx*2], 0
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 0xc

Function at 0x408be0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
add eax, eax
lea edx, [ebp + 0x10]
push edx
mov edx, dword [ebp + 8]
push esi
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0xc]
push eax
push 0
mov dword [edi], 0
mov eax, dword [ecx]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x408c52
mov eax, dword [ebp + 0xc]
cmp eax, 1
je 0x408c21
cmp eax, 2
jne 0x408c3c
test esi, esi
mov eax, dword [ebp + 0x10]
je 0x408c4c
test eax, eax
je 0x408c47
test al, 1
jne 0x408c3c
mov ecx, eax
shr ecx, 1
cmp word [esi + ecx*2 - 2], 0
je 0x408c4c
pop edi
mov eax, 0xd
pop esi
pop ebp
ret 0xc
mov word [esi], 0
shr eax, 1
mov dword [edi], eax
xor eax, eax
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x408f00
Capabilities:
Read file via mapping

Disassembly:
push esi
mov esi, ecx
push edi
mov edi, dword [esi]
add edi, edi
cmp dword [esi + 8], 0
jne 0x408f25
test edi, edi
je 0x408f25
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi + 8], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x408f72
push ebx
push edi
push 0
push 0
mov word [eax], 0
mov eax, dword [esi + 4]
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
je 0x408f6e
lea ecx, [esi + 0xc]
call fcn.00408cd0
mov ecx, dword [esi + 8]
push edi
push ebx
push ecx
call fcn.0040e600
add esp, 0xc
lea ecx, [esi + 0xc]
call fcn.00408d20
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esi + 8]
pop ebx
pop edi
pop esi
ret
Function at 0x408f80
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop esi
pop ebp
ret

Function at 0x409020
Capabilities:
Hash data using sha1

Disassembly:
xor eax, eax
mov dword [ecx + 0x18], eax
mov dword [ecx + 0x1c], eax
mov word [ecx + 0x20], ax
mov dword [ecx + 4], 0x67452301
mov dword [ecx + 8], 0xefcdab89
mov dword [ecx + 0xc], 0x98badcfe
mov dword [ecx + 0x10], 0x10325476
mov dword [ecx + 0x14], 0xc3d2e1f0
mov dword [ecx + 0x64], eax
mov dword [ecx + 0x68], eax
mov dword [ecx + 0x6c], eax
mov dword [ecx + 0x70], eax
push 0x29
mov dword [ecx + 0x74], eax
add ecx, 0x78
push eax
push ecx
call fcn.0040e580
add esp, 0xc
ret

Function at 0x4096a0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov esi, ecx
movzx eax, word [esi + 0x20]
cmp ax, 0x37
push edi
mov edi, 1
jbe 0x409714
movzx eax, ax
mov byte [eax + esi + 0x22], 0x80
add word [esi + 0x20], di
movzx eax, word [esi + 0x20]
mov ecx, 0x40
xor bl, bl
cmp ax, cx
jae 0x4096e5
movzx edx, ax
mov byte [edx + esi + 0x22], bl
add word [esi + 0x20], di
cmp word [esi + 0x20], cx
movzx eax, word [esi + 0x20]
jb 0x4096d0
mov ecx, esi
call fcn.00409160
mov ecx, 0x38
cmp word [esi + 0x20], cx
jae 0x409745
jmp 0x409700
movzx eax, word [esi + 0x20]
mov byte [eax + esi + 0x22], bl
add word [esi + 0x20], di
cmp word [esi + 0x20], cx
jb 0x409700
jmp 0x409745
movzx ecx, ax
mov byte [ecx + esi + 0x22], 0x80
add word [esi + 0x20], di
movzx eax, word [esi + 0x20]
mov ecx, 0x38
cmp ax, cx
jae 0x409745
xor bl, bl
movzx edx, ax
mov byte [edx + esi + 0x22], bl
add word [esi + 0x20], di
cmp word [esi + 0x20], cx
movzx eax, word [esi + 0x20]
jb 0x409730
mov eax, dword [esi + 0x1c]
mov ecx, eax
mov edx, eax
shr eax, 8
mov byte [esi + 0x5c], al
movzx eax, byte [esi + 0x1c]
shr ecx, 0x18
shr edx, 0x10
mov byte [esi + 0x5d], al
mov eax, dword [esi + 0x18]
mov byte [esi + 0x5a], cl
mov byte [esi + 0x5b], dl
mov ecx, eax
mov edx, eax
shr ecx, 0x18
shr edx, 0x10
shr eax, 8
mov byte [esi + 0x60], al
movzx eax, byte [esi + 0x18]
mov byte [esi + 0x5e], cl
pop edi
mov byte [esi + 0x5f], dl
mov byte [esi + 0x61], al
mov ecx, esi
pop esi
pop ebx
jmp fcn.00409160
Function at 0x4097f0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [ebp + 8], 0
mov dword [ebp - 0x14], ecx
je 0x40980c
cmp dword [ebp + 0xc], 0
je 0x40980c
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x409816
mov dword [ebp - 4], 0x80070057
mov eax, dword [ebp - 4]
push esi
mov esi, dword [ebp + 0x10]
lea edx, [esi + 8]
cmp edx, 0x10000
mov dword [ebp - 8], edx
jb 0x40982f
mov dword [ebp - 8], 0x10000
test eax, eax
jl 0x40993f
cmp dword [ecx + 4], 0
jne 0x409849
mov eax, 0x80070005
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 8]
push ebx
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
jne 0x40986f
mov dword [ebp - 4], 0x8007000e
jmp 0x409927
push edi
xor edi, edi
cmp edi, esi
jae 0x409926
mov eax, esi
mov esi, dword [ebp - 8]
sub eax, edi
add esi, 0xfffffff8
cmp eax, esi
jae 0x40988a
mov esi, eax
mov ecx, dword [ebp + 0xc]
push esi
lea edx, [edi + ecx]
push edx
push ebx
mov dword [ebp - 0xc], esi
call fcn.0040e600
mov eax, dword [ebp - 8]
add esp, 0xc
push eax
mov eax, dword [ebp - 0x14]
xor edx, edx
add esi, edi
cmp esi, dword [ebp + 0x10]
lea ecx, [ebp - 0xc]
push ecx
mov ecx, dword [eax + 4]
sete dl
push ebx
push 0
push edx
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x4098e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x4098d6
mov dword [ebp - 4], eax
jmp 0x409911
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
jmp 0x409911
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov edx, dword [edx + 0x10]
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0xc]
push ecx
push ebx
push eax
mov dword [ebp - 0x10], 0
call edx
test eax, eax
mov dword [ebp - 4], eax
jl 0x409926
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0xc]
jne 0x40991f
mov edi, esi
cmp dword [ebp - 4], 0
jl 0x409926
mov esi, dword [ebp + 0x10]
jmp 0x409872
mov dword [ebp - 4], 0x8000ffff
pop edi
test ebx, ebx
je 0x40993b
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 4]
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x409be0
Capabilities:
Encrypt data using des via winapi
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov ebx, ecx
mov esi, dword [ebx]
neg esi
sbb esi, esi
push edi
and esi, 0x7ff8fffb
add esi, 0x80070005
mov edi, 0
mov dword [ebp - 4], edi
js 0x409c11
cmp dword [ebp + 8], edi
jne 0x409c11
mov esi, 0x80070057
mov eax, dword [ebx + 4]
cmp eax, edi
je 0x409c22
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebx + 4], edi
cmp esi, edi
jl 0x409d04
mov ecx, dword [ebx]
lea eax, [ebp - 4]
push eax
push edi
push edi
push 0x8004
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x409c58
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x409c56
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
cmp esi, edi
jl 0x409d04
mov eax, dword [ebp - 4]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CryptHashData]
push 4
lea edx, [ebp - 8]
push edx
push eax
mov dword [ebp - 8], 0x420042
call edi
test eax, eax
jne 0x409c94
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x409c92
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x409d04
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp + 8]
push 0
add eax, eax
push eax
mov eax, dword [ebp - 4]
push edx
push eax
call edi
test eax, eax
jne 0x409ccb
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x409cc9
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x409d04
mov ecx, dword [ebp - 4]
mov edx, dword [ebx]
lea eax, [ebx + 4]
push eax
push 0xc00000
push ecx
push 0x6603
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x409d04
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x409d02
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x409d12
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40a610
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40a656
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40a656
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a64e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
pop esi
pop ebp
ret
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a672
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
pop esi
pop ebp
ret
Function at 0x40d2aa
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x426168]
jne 0x40d2b4
repz ret
jmp fcn.00411764

Function at 0x41279e
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x426a50]
je 0x4127b9
inc edi
cmp edi, 0x17
jb 0x4127aa
cmp edi, 0x17
jae 0x412939
push ebp
push 3
call fcn.00419321
cmp eax, 1
pop ecx
je 0x412905
push 3
call fcn.00419321
test eax, eax
pop ecx
jne 0x4127ed
cmp dword [0x426164], 1
je 0x412905
cmp ebx, 0xfc
je 0x412938
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x429078
push ebp
call fcn.00414238
add esp, 0xc
test eax, eax
je 0x412823
push esi
push esi
push esi
push esi
push esi
call fcn.0040e1fa
add esp, 0x14
push 0x104
mov esi, 0x429091
push esi
push 0
mov byte [0x429195], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x412867
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00414238
add esp, 0xc
test eax, eax
je 0x412867
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0040e1fa
add esp, 0x14
push esi
call fcn.0040f9f0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4128ac
push esi
call fcn.0040f9f0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x42938c
push 0x41ff9c
sub ecx, eax
push ecx
push eax
call fcn.00418ce6
add esp, 0x14
test eax, eax
je 0x4128ac
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0040e1fa
add esp, 0x14
jmp 0x4128ae
xor esi, esi
push 0x41ff98
push ebx
push ebp
call fcn.00418c2d
add esp, 0xc
test eax, eax
je 0x4128ce
push esi
push esi
push esi
push esi
push esi
call fcn.0040e1fa
add esp, 0x14
push dword [edi*8 + 0x426a54]
push ebx
push ebp
call fcn.00418c2d
add esp, 0xc
test eax, eax
je 0x4128f0
push esi
push esi
push esi
push esi
push esi
call fcn.0040e1fa
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.00419164
add esp, 0xc
jmp 0x412938
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x412938
cmp ebp, 0xffffffff
je 0x412938
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x426a54]
push dword [esi]
call fcn.0040f9f0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x419164
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00411fff
xor ebx, ebx
cmp dword [0x4295e8], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x41923a
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x41931a
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x41931a
push eax
call fcn.00411f91
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x4295e8], eax
call esi
push eax
call fcn.00411f91
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4295ec], eax
call esi
push eax
call fcn.00411f91
mov dword [0x4295f0], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0041034b
test eax, eax
pop ecx
pop ecx
je 0x419208
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040e1fa
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x41923a
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00411f91
cmp eax, ebx
pop ecx
mov dword [0x4295f8], eax
je 0x41923a
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00411f91
pop ecx
mov dword [0x4295f4], eax
mov eax, dword [0x4295f4]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x4192bf
cmp dword [0x4295f8], ecx
je 0x4192bf
push eax
call fcn.00412008
push dword [0x4295f8]
mov esi, eax
call fcn.00412008
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x4192bf
cmp edi, ebx
je 0x4192bf
call esi
cmp eax, ebx
je 0x41928c
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x41928c
test byte [ebp - 0x18], 1
jne 0x4192bf
lea eax, [ebp - 0x10]
push eax
call fcn.00410382
test eax, eax
pop ecx
je 0x4192a7
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040e1fa
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x4192b6
or dword [ebp + 0x10], 0x200000
jmp 0x4192fa
or dword [ebp + 0x10], 0x40000
jmp 0x4192fa
mov eax, dword [0x4295ec]
cmp eax, dword [ebp - 8]
je 0x4192fa
push eax
call fcn.00412008
cmp eax, ebx
pop ecx
je 0x4192fa
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4192fa
mov eax, dword [0x4295f0]
cmp eax, dword [ebp - 8]
je 0x4192fa
push eax
call fcn.00412008
cmp eax, ebx
pop ecx
je 0x4192fa
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4295e8]
call fcn.00412008
cmp eax, ebx
pop ecx
je 0x41931a
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x41931c
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403160
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
push dword [0x406a84]
call fcn.00403b7b
or dword [ebp - 4], 0xffffffff
mov ebx, eax
xor edi, edi
call dword [sym.imp.KERNEL32.DLL_GetCommandLineW]
movzx ecx, word [eax]
test cx, cx
je 0x403225
mov edx, dword [ebp + 8]
push 2
pop esi
cmp cx, 0x20
jne 0x4031a1
add eax, esi
cmp word [eax], 0x20
je 0x403199
movzx ecx, word [eax]
mov dword [ebp - 8], 1
cmp ecx, 0x22
jne 0x4031dc
add eax, esi
movzx ecx, word [eax]
mov edi, eax
test cx, cx
je 0x4031d8
cmp cx, 0x22
je 0x4031cc
add eax, esi
movzx ecx, word [eax]
test cx, cx
jne 0x4031bc
cmp word [eax], 0
je 0x4031d8
mov edx, eax
add eax, esi
jmp 0x403201
mov edx, eax
jmp 0x403201
test cx, cx
je 0x4031fd
mov edi, eax
cmp cx, 0x20
je 0x4031f3
add eax, esi
movzx ecx, word [eax]
test cx, cx
jne 0x4031e3
cmp word [eax], 0
mov edx, eax
je 0x403201
jmp 0x4031d4
and dword [ebp - 8], 0
mov ecx, dword [ebx]
cmp ecx, dword [ebp - 4]
jne 0x40320f
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x403230
xor edi, edi
cmp dword [ebp - 8], edi
je 0x403219
inc dword [ebp - 4]
movzx ecx, word [eax]
test cx, cx
jne 0x403193
cmp dword [ebp + 8], 0
jne 0x403240
mov eax, dword [ebp - 4]
jmp 0x403246
test edi, edi
je 0x403243
sub edx, edi
sar edx, 1
mov dword [ecx], edx
inc dword [ebx]
mov eax, edi
jmp 0x403246
mov ecx, dword [ebp + 8]
and dword [ecx], 0
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x403560
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 4], eax
cmp dword [esi + 0x14], eax
jne 0x403595
mov ecx, dword [esi + 8]
sub ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push eax
lea eax, [esp + 8]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov ecx, dword [esi + 8]
mov eax, dword [esp + 4]
mov dword [esi + 0xc], ecx
pop esi
pop ecx
ret 4

Function at 0x4038d0
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x406ad4]
push eax
push ecx
mov dword [esp + 8], 0
call fcn.00403ad2
test eax, eax
je 0x403922
cmp dword [eax + 4], 0
je 0x403908
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push edx
push ecx
push eax
call fcn.00403930
pop ecx
ret 0xc
mov ecx, dword [esp + 0x10]
mov eax, dword [eax]
push 0
lea edx, [esp + 4]
push edx
mov edx, dword [esp + 0x14]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov eax, dword [esp]
pop ecx
ret 0xc