joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10127f0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
stosb byte es:[edi], al
and byte [ebp - 0x654], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x653]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
and byte [ebp - 0x504], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x503]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.010118e3
or byte [eax + 0x2ff845c6], ah
mov byte [ebp - 0x24], 0x34
and byte [ebp - 0x36c], 0
and byte [ebp - 0x36b], 0
mov byte [ebp - 0x36a], 0xaa
and byte [ebp - 0x369], 0
mov byte [ebp - 0x368], 0x12
mov byte [ebp - 0x367], 0x30
mov byte [ebp - 0x366], 0x21
mov byte [ebp - 0x365], 6
mov byte [ebp - 0x364], 0x2c
mov byte [ebp - 0x363], 0x26
mov byte [ebp - 0x362], 0x21
mov byte [ebp - 0x361], 0x30
mov byte [ebp - 0x360], 0x38
mov byte [ebp - 0x35f], 0x11
mov byte [ebp - 0x35e], 0x3c
mov byte [ebp - 0x35d], 0x27
mov byte [ebp - 0x35c], 0x30
mov byte [ebp - 0x35b], 0x36
mov byte [ebp - 0x35a], 0x21
mov byte [ebp - 0x359], 0x3a
mov byte [ebp - 0x358], 0x27
mov byte [ebp - 0x357], 0x2c
mov byte [ebp - 0x356], 0x14
mov byte [ebp - 0x355], 0x55
lea eax, [ebp - 0x36c]
push eax
call fcn.01011915
pop ecx
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.010118ca
add esp, 0xc
mov dword [ebp - 0x3d4], eax
call fcn.01011905
pop esp
lds ecx, [edx - 0x30]
push 0x104
lea eax, [ebp - 0x12c]
push eax
call dword [ebp - 0x3d4]
mov dword [ebp - 0x28], eax
call fcn.01011905
xor eax, 0x8070f03d
loopne 0x1012923
and byte [ebp - 0x1f], 0
mov byte [ebp - 0x1e], 0x1d
and byte [ebp - 0x1d], 0
mov byte [ebp - 0x1c], 0xa5
mov byte [ebp - 0x1b], 0x87
mov byte [ebp - 0x1a], 0x96
mov byte [ebp - 0x19], 0xb6
mov byte [ebp - 0x18], 0x87
mov byte [ebp - 0x17], 0x8f

Function at 0x1014690
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
cmp word [ecx], 0x5a4d
je 0x10146a3
xor eax, eax
pop ebp
ret
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x101469f
xor ecx, ecx
cmp word [eax + 0x18], 0x10b
sete cl
mov eax, ecx
pop ebp
ret

Function at 0x10146d0
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
push ebx
push esi
movzx esi, word [ecx + 6]
xor edx, edx
test esi, esi
push edi
lea eax, [eax + ecx + 0x18]
jbe 0x101470f
mov edi, dword [ebp + 0xc]
mov ecx, dword [eax + 0xc]
cmp edi, ecx
jb 0x1014705
mov ebx, dword [eax + 8]
add ebx, ecx
cmp edi, ebx
jb 0x1014711
add edx, 1
add eax, 0x28
cmp edx, esi
jb 0x10146f5
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x101a51a
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
xor ebx, ebx
push 1
push ebx
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call fcn.01017150
mov dword [ebp - 0x18], eax
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
mov dword [ebp - 0x14], edx
je 0x101a5a2
push 2
push ebx
push ebx
push dword [ebp + 8]
call fcn.01017150
mov ecx, eax
and ecx, edx
add esp, 0x10
cmp ecx, 0xffffffff
je 0x101a5a2
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
sub esi, eax
sbb edi, edx
js 0x101a637
jg 0x101a57b
cmp esi, ebx
jbe 0x101a637
mov ebx, 0x1000
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 4], eax
jne 0x101a5ae
call fcn.01011b5f
mov dword [eax], 0xc
call fcn.01011b5f
mov eax, dword [eax]
pop edi
pop esi
pop ebx
leave
ret
push 0x8000
push dword [ebp + 8]
call fcn.0101a74f
pop ecx
pop ecx
mov dword [ebp - 8], eax
test edi, edi
jl 0x101a5ce
jg 0x101a5ca
cmp esi, ebx
jb 0x101a5ce
mov eax, ebx
jmp 0x101a5d0
mov eax, esi
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.01014a69
add esp, 0xc
cmp eax, 0xffffffff
je 0x101a61a
cdq
sub esi, eax
sbb edi, edx
js 0x101a5f1
jg 0x101a5c0
test esi, esi
ja 0x101a5c0
mov esi, dword [ebp - 0x10]
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.0101a74f
pop ecx
pop ecx
push dword [ebp - 4]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
jmp 0x101a6a0
call fcn.01011b77
cmp dword [eax], 5
jne 0x101a62f
call fcn.01011b5f
mov dword [eax], 0xd
or esi, 0xffffffff
mov dword [ebp - 0xc], esi
jmp 0x101a5f4
cmp edi, ebx
jg 0x101a6ac
jl 0x101a641
cmp esi, ebx
jae 0x101a6ac
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.01017150
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x101a5a2
push dword [ebp + 8]
call fcn.0101779b
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
neg eax
sbb eax, eax
neg eax
dec eax
cdq
mov dword [ebp - 0x10], eax
and eax, edx
cmp eax, 0xffffffff
mov dword [ebp - 0xc], edx
jne 0x101a6ac
call fcn.01011b5f
mov dword [eax], 0xd
call fcn.01011b77
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov esi, dword [ebp - 0x10]
and esi, dword [ebp - 0xc]
cmp esi, 0xffffffff
je 0x101a5a2
push ebx
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push dword [ebp + 8]
call fcn.01017150
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x101a5a2
xor eax, eax
jmp 0x101a5a9
Function at 0x101b6fa
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x1020104]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0xc]
xor edi, edi
push eax
mov dword [ebp - 0xc], edi
call fcn.0100f425
test eax, eax
pop ecx
je 0x101b72f
push edi
push edi
push edi
push edi
push edi
call fcn.01011a5d
add esp, 0x14
push 4
pop eax
call fcn.0100e850
mov dword [ebp - 0x14], esp
push 0x1c
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x101b83d
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov esi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x58]
dec esi
neg esi
sbb esi, esi
and esi, 0x103
inc esi
cmp dword [ebp - 0xc], 2
mov dword [ebp - 8], edi
jne 0x101b7b6
push 0x1004a64
mov dword [ebp - 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, edi
je 0x101b7b6
push 0x1005524
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
je 0x101b7b6
lea ecx, [ebp - 0x10]
push ecx
mov dword [ebp - 0x10], edi
call eax
cmp eax, 1
jne 0x101b7b6
mov eax, dword [ebp - 0x10]
cmp eax, edi
jbe 0x101b7b6
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
lea edi, [ebx - 1]
push edi
push dword [ebp - 8]
call fcn.0101b6ce
add esp, 0xc
test eax, eax
jl 0x101b83d
not edi
and dword [ebp - 8], edi
je 0x101b7e8
lea eax, [ebp - 8]
push eax
push ebx
push dword [ebp - 8]
call fcn.0101b6ce
add esp, 0xc
test eax, eax
jl 0x101b83d
lea eax, [ebx + ebx]
cmp dword [ebp - 8], eax
jae 0x101b7f3
mov dword [ebp - 8], eax
lea edi, [ebx - 1]
not edi
and edi, dword [ebp - 0x14]
sub edi, dword [ebp - 8]
cmp dword [ebp - 0xc], 1
jne 0x101b807
push 0x11
pop ebx
mov eax, dword [ebp - 0x18]
add ebx, eax
cmp edi, ebx
jb 0x101b83d
push 4
push 0x1000
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x101b83d
lea eax, [ebp - 0x1c]
push eax
push esi
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x101b83d
xor eax, eax
inc eax
jmp 0x101b83f
xor eax, eax
lea esp, [ebp - 0x68]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0100e2ad
leave
ret
Function at 0x402a98
Capabilities:
Terminate process

Disassembly:
push 0
push str.EPOC_error
push dword [esp + 0xc]
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0xa
call fcn.00408a0e
int3

Function at 0x403b10
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 8]
mov eax, dword [esp + 0xc]
push esi
lea edx, [ecx + eax]
cmp ecx, edx
push edi
mov edi, dword [esp + 0xc]
movzx eax, word [edi]
mov esi, ecx
jae 0x403b4e
push ebx
xor ebx, ebx
mov bl, byte [esi]
mov ecx, eax
shr ecx, 8
shl eax, 8
xor ecx, ebx
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x410288]
xor eax, ecx
inc esi
cmp esi, edx
jb 0x403b2b
pop ebx
mov word [edi], ax
pop edi
pop esi
ret
Function at 0x4066ad
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [edi + 0x24]
push esi
mov ecx, dword [edi + 0x64]
mov eax, dword [edi + 0x34]
mov edx, dword [edi + 0x6c]
sub eax, ecx
sub eax, edx
mov dword [ebp - 4], eax
jne 0x4066d4
test ecx, ecx
jne 0x4066de
test edx, edx
jne 0x4066de
mov eax, ebx
jmp 0x40674a
cmp eax, 0xffffffff
jne 0x4066de
push 0xfffffffffffffffe
pop eax
jmp 0x40674a
mov edx, dword [edi + 0x24]
lea edx, [ebx + edx - 0x106]
cmp ecx, edx
jb 0x40674a
mov eax, dword [edi + 0x30]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call fcn.00408a90
mov ecx, dword [edi + 0x44]
mov eax, dword [edi + 0x3c]
sub dword [edi + 0x68], ebx
sub dword [edi + 0x64], ebx
add esp, 0xc
sub dword [edi + 0x54], ebx
lea eax, [eax + ecx*2]
dec eax
dec eax
movzx edx, word [eax]
mov esi, edx
sub esi, ebx
cmp edx, ebx
sbb edx, edx
not edx
and edx, esi
dec ecx
mov word [eax], dx
jne 0x40670f
mov eax, dword [edi + 0x38]
mov edx, ebx
lea eax, [eax + ebx*2]
dec eax
dec eax
movzx ecx, word [eax]
mov esi, ecx
sub esi, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, esi
dec edx
mov word [eax], cx
jne 0x40672e
mov eax, dword [ebp - 4]
add eax, ebx
mov esi, dword [edi]
cmp dword [esi + 4], 0
je 0x4067a3
push eax
mov eax, dword [edi + 0x6c]
add eax, dword [edi + 0x64]
add eax, dword [edi + 0x30]
push eax
call fcn.0040649b
add dword [edi + 0x6c], eax
mov esi, dword [edi + 0x6c]
cmp esi, 3
pop ecx
pop ecx
jb 0x40678f
mov eax, dword [edi + 0x64]
mov ecx, dword [edi + 0x30]
lea edx, [eax + ecx]
movzx eax, byte [edx]
mov ecx, dword [edi + 0x50]
mov dword [edi + 0x40], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [edi + 0x4c]
mov dword [edi + 0x40], eax
cmp esi, 0x106
jae 0x4067a3
mov eax, dword [edi]
cmp dword [eax + 4], 0
jne 0x4066b6
pop esi
pop ebx
leave
ret

Function at 0x40894c
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x415cac], esi
push edi
jne 0x40896c
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 [0x415ca8], esi
mov byte [0x415ca4], al
jne 0x4089d2
mov ecx, dword [0x41724c]
test ecx, ecx
je 0x4089b3
mov eax, dword [0x417248]
sub eax, 4
cmp eax, ecx
jmp 0x4089ac
mov eax, dword [eax]
test eax, eax
je 0x40899e
call eax
mov eax, dword [0x417248]
sub eax, 4
cmp eax, dword [0x41724c]
mov dword [0x417248], eax
jae 0x408996
mov eax, 0x414024
mov esi, 0x41402c
cmp eax, esi
mov edi, eax
jae 0x4089d2
mov eax, dword [edi]
test eax, eax
je 0x4089cb
call eax
add edi, 4
cmp edi, esi
jb 0x4089c3
mov eax, 0x414030
mov esi, 0x414038
cmp eax, esi
mov edi, eax
jae 0x4089f1
mov eax, dword [edi]
test eax, eax
je 0x4089ea
call eax
add edi, 4
cmp edi, esi
jb 0x4089e2
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x408a0c
push dword [ebp + 8]
mov dword [0x415cac], 1
call fcn.004088b7
pop ecx
pop ebp
ret
Function at 0x409c18
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4122c0
call fcn.0040c884
mov edi, 0x94
mov eax, edi
call fcn.0040c8d0
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 [0x415c6c], ecx
mov eax, dword [esi + 4]
mov dword [0x415c78], eax
mov edx, dword [esi + 8]
mov dword [0x415c7c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x415c70], esi
cmp ecx, 2
je 0x409c78
or esi, 0x8000
mov dword [0x415c70], esi
shl eax, 8
add eax, edx
mov dword [0x415c74], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x409cb3
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x409cb3
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x409ccb
cmp eax, 0x20b
je 0x409cb8
mov dword [ebp - 0x1c], esi
jmp 0x409cdf
cmp dword [ecx + 0x84], 0xe
jbe 0x409cb3
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x409cd9
cmp dword [ecx + 0x74], 0xe
jbe 0x409cb3
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040a3ad
pop ecx
test eax, eax
jne 0x409d0b
cmp dword [0x415cc0], 1
jne 0x409cf8
call fcn.0040c279
push 0x1c
call fcn.0040c102
push 0xff
call fcn.004088b7
pop ecx
pop ecx
call fcn.0040a30b
mov dword [ebp - 4], esi
call fcn.0040be94
test eax, eax
jge 0x409d24
push 0x1b
call fcn.00409bf3
pop ecx
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
mov dword [0x416224], eax
call fcn.0040c761
mov dword [0x415cb8], eax
call fcn.0040c6bf
test eax, eax
jge 0x409d4a
push 8
call fcn.00409bf3
pop ecx
call fcn.0040c48c
test eax, eax
jge 0x409d5b
push 9
call fcn.00409bf3
pop ecx
call fcn.004088e7
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x409d6e
push eax
call fcn.00409bf3
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoA]
call fcn.0040c423
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x409d8f
movzx eax, word [ebp - 0x34]
jmp 0x409d92
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.00405f0d
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x409db0
push edi
call fcn.00408a0e
call fcn.00408a30
jmp 0x409de2
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040c8bf
ret
Function at 0x40b302
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x4157d8]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x4160e0]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
jae 0x40b492
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x416100]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x18], ebx
je 0x40b492
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
jne 0x40b361
xor eax, eax
jmp 0x40b4a6
test al, 0x20
je 0x40b372
push 2
push edi
push edi
push ecx
call fcn.0040d9b9
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40b42e
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov dword [ebp + 8], edi
jbe 0x40b466
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
cmp ecx, dword [ebp + 0x10]
jae 0x40b3c8
mov edx, dword [ebp - 8]
inc dword [ebp - 8]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40b3b9
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x18]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x40b39e
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x10]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x40b408
mov eax, dword [ebp - 0x10]
add dword [ebp - 0xc], eax
cmp eax, edi
jl 0x40b411
mov eax, dword [ebp - 8]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x40b392
jmp 0x40b413
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp + 8], eax
xor edi, edi
mov eax, dword [ebp - 0xc]
cmp eax, edi
jne 0x40b48d
cmp dword [ebp + 8], edi
je 0x40b466
push 5
pop eax
cmp dword [ebp + 8], eax
jne 0x40b45b
mov dword [0x415c64], eax
jmp 0x40b499
push edi
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x40b450
mov eax, dword [ebp - 0x10]
mov dword [ebp + 8], edi
mov dword [ebp - 0xc], eax
jmp 0x40b413
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp + 8], eax
jmp 0x40b413
push dword [ebp + 8]
call fcn.0040d739
pop ecx
jmp 0x40b4a3
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40b47b
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
je 0x40b35a
mov dword [0x415c60], 0x1c
mov dword [0x415c64], edi
jmp 0x40b4a3
sub eax, dword [ebp - 0x14]
jmp 0x40b4a6
and dword [0x415c64], 0
mov dword [0x415c60], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
pop ebx
call fcn.0040da89
leave
ret
Function at 0x40c102
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4157d8]
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 + 0x415500]
je 0x40c12f
inc eax
cmp eax, 0x12
jb 0x40c120
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x415500]
jne 0x40c263
mov eax, dword [0x415cc0]
cmp eax, 1
je 0x40c23e
cmp eax, edx
jne 0x40c15f
cmp dword [0x4154c4], 1
je 0x40c23e
cmp ecx, 0xfc
je 0x40c263
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 0x40c198
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.004098b0
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.00409320
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40c1da
lea eax, [ebp - 0x10c]
push eax
call fcn.00409320
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x412768
push edi
call fcn.00409090
add esp, 0x10
push edi
call fcn.00409320
push dword [esi + 0x415504]
mov ebx, eax
call fcn.00409320
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040c8d0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004098b0
push edi
push ebx
call fcn.004098c0
push 0x412748
push ebx
call fcn.004098c0
push dword [esi + 0x415504]
push ebx
call fcn.004098c0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040dc85
add esp, 0x2c
jmp 0x40c263
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x415504]
push dword [esi]
call fcn.00409320
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.0040da89
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40dc85
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x415e40], ebx
push esi
push edi
jne 0x40dd05
push str.user32.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40dd40
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push 0x412bfc
push edi
call esi
test eax, eax
mov dword [0x415e40], eax
je 0x40dd40
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x415e44], eax
call esi
cmp dword [0x415c6c], 2
mov dword [0x415e48], eax
jne 0x40dd05
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x415e50], eax
je 0x40dd05
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x415e4c], eax
mov eax, dword [0x415e4c]
test eax, eax
je 0x40dd4a
call eax
test eax, eax
je 0x40dd31
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x415e50]
test eax, eax
je 0x40dd31
test byte [ebp - 8], 1
jne 0x40dd4a
cmp dword [0x415c78], 4
jb 0x40dd44
or byte [ebp + 0x12], 0x20
jmp 0x40dd69
xor eax, eax
jmp 0x40dd79
or byte [ebp + 0x12], 4
jmp 0x40dd69
mov eax, dword [0x415e44]
test eax, eax
je 0x40dd69
call eax
mov ebx, eax
test ebx, ebx
je 0x40dd69
mov eax, dword [0x415e48]
test eax, eax
je 0x40dd69
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x415e40]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40f0e9
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.0040c8d0
mov eax, dword [0x4157d8]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x4160e0]
mov dword [ebp - 4], eax
jae 0x40f229
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x416100]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x40f229
push 1
push esi
push ebx
call fcn.0040be08
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x40f233
push 2
push esi
push ebx
call fcn.0040be08
add esp, 0xc
cmp eax, 0xffffffff
je 0x40f233
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x40f1d6
push 0x1000
lea eax, [ebp - 0x1008]
push esi
push eax
call fcn.00408f30
push 0x8000
push ebx
call fcn.0040fcd4
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x40f195
mov eax, edi
push eax
lea eax, [ebp - 0x1008]
push eax
push ebx
call fcn.0040b302
add esp, 0xc
cmp eax, 0xffffffff
je 0x40f1b3
sub edi, eax
test edi, edi
jg 0x40f18a
jmp 0x40f1c9
cmp dword [0x415c64], 5
jne 0x40f1c6
mov dword [0x415c60], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0040fcd4
pop ecx
pop ecx
jmp 0x40f216
jge 0x40f216
push 0
push dword [ebp + 0xc]
push ebx
call fcn.0040be08
push ebx
call fcn.0040d926
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x40f216
mov dword [0x415c60], 0xd
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [0x415c64], eax
push 0
push dword [ebp - 8]
push ebx
call fcn.0040be08
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40f236
mov dword [0x415c60], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.0040da89
leave
ret