joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4057d6
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00405ac0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x405871
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x413074]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x405871
cmp eax, 1
je 0x405892
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x405871
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40583e
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40586d
xor eax, eax
inc eax
jmp 0x4058b1
cmp edi, eax
jae 0x405875
xor eax, eax
jmp 0x4058b1
cmp eax, esi
jae 0x40587c
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x413074]
jmp 0x405895
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x406a60
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x4130b4], esi
push edi
jne 0x406a80
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 [0x4130b0], esi
mov byte [0x4130ac], al
jne 0x406ae6
mov ecx, dword [0x4147d0]
test ecx, ecx
je 0x406ac7
mov eax, dword [0x4147cc]
sub eax, 4
cmp eax, ecx
jmp 0x406ac0
mov eax, dword [eax]
test eax, eax
je 0x406ab2
call eax
mov eax, dword [0x4147cc]
sub eax, 4
cmp eax, dword [0x4147d0]
mov dword [0x4147cc], eax
jae 0x406aaa
mov eax, 0x41203c
mov esi, 0x412044
cmp eax, esi
mov edi, eax
jae 0x406ae6
mov eax, dword [edi]
test eax, eax
je 0x406adf
call eax
add edi, 4
cmp edi, esi
jb 0x406ad7
mov eax, 0x412048
mov esi, 0x412050
cmp eax, esi
mov edi, eax
jae 0x406b05
mov eax, dword [edi]
test eax, eax
je 0x406afe
call eax
add edi, 4
cmp edi, esi
jb 0x406af6
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x406b1f
push dword [ebp + 8]
mov dword [0x4130b4], 1
call fcn.004069c6
pop ebp
ret
Function at 0x406dea
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x40f5d8
call fcn.004081a0
mov edi, 0x94
mov eax, edi
call fcn.00405ac0
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 [0x413074], ecx
mov eax, dword [esi + 4]
mov dword [0x413080], eax
mov edx, dword [esi + 8]
mov dword [0x413084], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x413078], esi
cmp ecx, 2
je 0x406e4a
or esi, 0x8000
mov dword [0x413078], esi
shl eax, 8
add eax, edx
mov dword [0x41307c], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x406e83
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x406e83
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x406e9b
cmp eax, 0x20b
je 0x406e88
mov dword [ebp - 0x1c], edi
jmp 0x406eaf
cmp dword [ecx + 0x84], 0xe
jbe 0x406e83
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x406ea9
cmp dword [ecx + 0x74], 0xe
jbe 0x406e83
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push edi
call fcn.00408368
pop ecx
test eax, eax
jne 0x406edb
cmp dword [0x4130c0], 2
je 0x406ec8
call fcn.0040b88f
push 0x1c
call fcn.0040b718
push 0xff
call fcn.004069c6
pop ecx
pop ecx
call fcn.0040b4aa
mov dword [ebp - 4], edi
call fcn.0040a763
test eax, eax
jge 0x406ef4
push 0x1b
call fcn.00406dc5
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4147c4], eax
call fcn.0040bd0e
mov dword [0x4130b8], eax
call fcn.0040bc6c
test eax, eax
jge 0x406f1a
push 8
call fcn.00406dc5
pop ecx
call fcn.0040ba39
test eax, eax
jge 0x406f2b
push 9
call fcn.00406dc5
pop ecx
push 1
call fcn.004069f6
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x406f41
push eax
call fcn.00406dc5
pop ecx
mov eax, dword [0x413094]
mov dword [0x413098], eax
push eax
push dword [0x41308c]
push dword [0x413088]
call fcn.00402d40
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x406f70
push esi
call fcn.00406b21
call fcn.00406b43
jmp 0x406fa2
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.004081db
ret
Function at 0x408edc
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x408f0a
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x408f11
cmp ebx, dword [eax + 4]
jae 0x408f11
xor eax, eax
jmp 0x409101
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x408f22
xor eax, eax
inc eax
jmp 0x409100
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x408f38
cmp ecx, edx
jae 0x40907d
cmp dword [eax + 4], 0
je 0x408f41
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x408f29
cmp dword [ebp + 8], 0
je 0x408f63
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40907d
cmp eax, esi
jae 0x40907d
mov eax, dword [0x4130e8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x408f88
cmp dword [esi*4 + 0x4130f0], edi
je 0x409081
inc esi
cmp esi, eax
jl 0x408f76
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4090fd
cmp dword [ebp - 8], 0x1000000
jne 0x4090fd
test byte [ebp - 0xc], 0xcc
je 0x409006
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4090fd
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4090fd
cmp word [eax + 0x18], 0x10b
jne 0x4090fd
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4090fd
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x409006
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x409006
test byte [ecx + 0x27], 0x80
jne 0x40907d
push 1
push 0x413130
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x408f1a
mov ecx, dword [0x4130e8]
test ecx, ecx
mov edx, ecx
jle 0x40903a
lea eax, [ecx*4 + 0x4130ec]
cmp dword [eax], edi
je 0x40903a
dec edx
sub eax, 4
test edx, edx
jg 0x40902e
test edx, edx
jne 0x40906b
push 0xf
pop ebx
cmp ecx, ebx
jg 0x409047
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40905f
lea eax, [edx*4 + 0x4130f0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40904d
cmp ecx, 0x10
jge 0x40906b
inc ecx
mov dword [0x4130e8], ecx
push 0
push 0x413130
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x408f1a
xor eax, eax
jmp 0x409100
test esi, esi
jle 0x408f1a
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x413130
call ebx
test eax, eax
jne 0x408f1a
cmp dword [esi*4 + 0x4130f0], edi
je 0x4090d7
mov eax, dword [0x4130e8]
lea esi, [eax - 1]
test esi, esi
jl 0x4090c5
cmp dword [esi*4 + 0x4130f0], edi
je 0x4090c1
dec esi
jns 0x4090b5
test esi, esi
jge 0x4090d5
cmp eax, 0x10
jge 0x4090d0
inc eax
mov dword [0x4130e8], eax
lea esi, [eax - 1]
jmp 0x4090d7
je 0x4090ef
xor ecx, ecx
test esi, esi
jl 0x4090ef
lea eax, [ecx*4 + 0x4130f0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4090dd
push 0
push 0x413130
call ebx
jmp 0x408f1a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a1c2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x414680]
push edi
jae 0x40a397
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x4146a0]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40a397
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x40a26d
test dl, 2
jne 0x40a26d
test dl, 0x48
je 0x40a237
cmp byte [eax + 5], 0xa
je 0x40a237
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a280
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40a268
mov dword [0x41306c], ecx
jmp 0x40a39e
cmp eax, 0x6d
jne 0x40a274
xor eax, eax
jmp 0x40a3ab
push eax
call fcn.0040a704
pop ecx
jmp 0x40a3a8
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x40a392
test eax, eax
je 0x40a2a7
cmp byte [ebx], 0xa
jne 0x40a2a7
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40a2b0
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40a38c
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40a37c
cmp al, 0xd
je 0x40a2e2
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x40a36e
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40a2fc
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40a2f7
add dword [ebp - 8], 2
jmp 0x40a350
mov dword [ebp - 8], eax
jmp 0x40a36a
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a324
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40a36a
cmp dword [ebp - 0x10], 0
je 0x40a36a
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40a345
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40a350
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40a36d
cmp ebx, dword [ebp + 0xc]
jne 0x40a355
cmp byte [ebp - 1], 0xa
jne 0x40a355
mov byte [ebx], 0xa
jmp 0x40a36d
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040a90e
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40a36e
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40a2c6
jmp 0x40a38c
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40a38c
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x40a3ab
and dword [0x41306c], 0
mov dword [0x413068], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40ae5e
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x414680]
mov eax, dword [0x412200]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x40b024
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x4146a0]
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 - 0x80], ebx
je 0x40b024
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x40aec8
xor eax, eax
jmp 0x40b038
test al, 0x20
je 0x40aed9
push 2
push edi
push edi
push ecx
call fcn.0040cb67
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40afae
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x40aff5
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x40af3b
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40af2c
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x40af0e
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40af7b
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x40af87
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x40af02
jmp 0x40af89
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x40b01f
cmp dword [ebp + 0x3a4], edi
je 0x40aff5
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x40afe7
mov dword [0x41306c], eax
jmp 0x40b02b
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40afd9
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x40af89
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x40af89
push dword [ebp + 0x3a4]
call fcn.0040a704
pop ecx
jmp 0x40b035
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40b00d
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40aec1
mov dword [0x413068], 0x1c
mov dword [0x41306c], edi
jmp 0x40b035
sub eax, dword [ebp - 0x7c]
jmp 0x40b038
and dword [0x41306c], 0
mov dword [0x413068], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00405b2e
add ebp, 0x39c
leave
ret
Function at 0x40b718
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x412200]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4126b0]
je 0x40b74d
inc eax
cmp eax, 0x13
jb 0x40b73e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4126b0]
jne 0x40b873
mov eax, dword [0x4130c0]
cmp eax, 1
je 0x40b84b
cmp eax, edx
jne 0x40b77d
cmp dword [0x412284], 1
je 0x40b84b
cmp ecx, 0xfc
je 0x40b873
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40b7b3
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00409e00
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00406fd0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40b7e7
mov eax, edi
push eax
call fcn.00406fd0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40fd1c
push edi
call fcn.00406720
add esp, 0x10
push edi
call fcn.00406fd0
push dword [esi + 0x4126b4]
mov ebx, eax
call fcn.00406fd0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00405ac0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00409e00
push edi
push ebx
call fcn.00409e10
push 0x40fd18
push ebx
call fcn.00409e10
push dword [esi + 0x4126b4]
push ebx
call fcn.00409e10
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040c3f2
add esp, 0x2c
jmp 0x40b873
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4126b4]
push dword [esi]
call fcn.00406fd0
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 - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00405b2e
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40c3f2
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x41331c], ebx
push esi
push edi
jne 0x40c472
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40c4ad
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x41331c], eax
je 0x40c4ad
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x413320], eax
call esi
cmp dword [0x413074], 2
mov dword [0x413324], eax
jne 0x40c472
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x41332c], eax
je 0x40c472
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x413328], eax
mov eax, dword [0x413328]
test eax, eax
je 0x40c4b7
call eax
test eax, eax
je 0x40c49e
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x41332c]
test eax, eax
je 0x40c49e
test byte [ebp - 8], 1
jne 0x40c4b7
cmp dword [0x413080], 4
jb 0x40c4b1
or byte [ebp + 0x12], 0x20
jmp 0x40c4d6
xor eax, eax
jmp 0x40c4e6
or byte [ebp + 0x12], 4
jmp 0x40c4d6
mov eax, dword [0x413320]
test eax, eax
je 0x40c4d6
call eax
mov ebx, eax
test ebx, ebx
je 0x40c4d6
mov eax, dword [0x413324]
test eax, eax
je 0x40c4d6
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x41331c]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40d868
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00405ac0
mov eax, dword [0x412200]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x414680]
mov dword [ebp - 4], eax
jae 0x40d9ab
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x4146a0]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x40d9ab
push 1
push esi
push ebx
call fcn.0040a90e
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x40d9b5
push 2
push esi
push ebx
call fcn.0040a90e
add esp, 0xc
cmp eax, 0xffffffff
je 0x40d9b5
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x40d955
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00408140
push 0x8000
push ebx
call fcn.0040e131
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x40d914
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.0040ae5e
add esp, 0xc
cmp eax, 0xffffffff
je 0x40d932
sub edi, eax
test edi, edi
jg 0x40d909
jmp 0x40d948
cmp dword [0x41306c], 5
jne 0x40d945
mov dword [0x413068], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0040e131
pop ecx
pop ecx
jmp 0x40d995
jge 0x40d995
push 0
push dword [ebp + 0xc]
push ebx
call fcn.0040a90e
push ebx
call fcn.0040c804
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 0x40d995
mov dword [0x413068], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x41306c], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.0040a90e
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40d9b8
mov dword [0x413068], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.00405b2e
leave
ret
Function at 0x402fb0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x46a020]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403048
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403028
xor eax, eax
push ebp
push 0x403021
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403064
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403028
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x46a020]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x46a020], ax
mov esp, ebp
pop ebp
ret

Function at 0x403d0c
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x46c048], 0
je 0x403d6d
cmp word [0x46c21c], 0xd7b2
jne 0x403d35
cmp dword [0x46c224], 0
jbe 0x403d35
mov eax, 0x46c218
call dword [0x46c234]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x46a06c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x403d94
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x46a030], 0
jne 0x403d89
push 0
push 0x46a064
push 0x46a06c
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x405118
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x405348
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40519b
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x405348
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40519b
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x405364
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x405224
xor eax, eax
push ebp
push 0x40521d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00404f60
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x405202
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x405384
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x405202
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405224
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x40533e
cmp byte [ebp - 0xd], 0
jne 0x40526b
cmp byte [ebp - 0x12], 0
je 0x40533e
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x405284
dec ebx
cmp byte [ebx], 0x2e
je 0x405293
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x405283
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x40533e
inc ebx
cmp byte [ebp - 0x12], 0
je 0x4052d0
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x40533e
cmp byte [ebp - 0xd], 0
je 0x40533e
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x40533e
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret