joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x5c7008], 0x8088405
inc edx
mov dword [ebx + 0x5c7008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x41cd18
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41cd49
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cd31
add dl, dl
jne 0x41cd54
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cda5
xor eax, eax
add dl, dl
jne 0x41cd61
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41ce42
add dl, dl
jne 0x41cd70
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cd7b
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cd86
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cd91
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cd9b
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41cd40
mov eax, 1
add dl, dl
jne 0x41cdb3
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cdbe
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cdaa
sub eax, ebx
mov ebx, 1
jne 0x41cdf1
mov ecx, 1
add dl, dl
jne 0x41cdd7
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cde2
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cdce
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cd40
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41ce08
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41ce13
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cdff
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cd40
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41ce63
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41cd40
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x41e558
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x5afa17
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
mov ecx, ebx
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ecx + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41e609
add edx, ebx
mov eax, edx
mov esi, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
add edx, ebx
mov dword [ebp - 0x10], edx
mov edi, dword [eax + 0x20]
add edi, ebx
mov edx, dword [eax + 0x24]
add edx, ebx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 4]
cmp edx, 0xffff
jbe 0x41e5f2
test esi, esi
jbe 0x41e609
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088e4
test eax, eax
jne 0x41e5e4
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41e609
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41e5c1
jmp 0x41e609
mov ecx, edx
sub ecx, dword [eax + 0x10]
cmp ecx, dword [eax + 0x14]
jae 0x41e609
mov eax, ecx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5afa1e
ret
Function at 0x41ee60
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ecx
mov word [ebp - 2], dx
xor eax, eax
push ebp
push 0x5b040f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404cd0
xor ebx, ebx
mov eax, ebx
and eax, 0x80000001
jns 0x41ee9b
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x41eeb4
lea eax, [ebp - 0x10]
mov edx, dword [0x5c9268]
mov edx, dword [edx]
mov edx, dword [edx + 0xc]
call fcn.00404d30
jmp 0x41eec7
lea eax, [ebp - 0x10]
mov edx, dword [0x5c9268]
mov edx, dword [edx]
mov edx, dword [edx + 0x10]
call fcn.00404d30
lea eax, [ebp - 0x10]
mov edx, ebx
sar edx, 1
jns 0x41eed3
adc edx, 0
mov edx, dword [edx*4 + 0x5c80e8]
call fcn.00404f20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x10]
call fcn.00404f04
push eax
call fcn.00406b1c
mov esi, eax
cmp esi, 0xffffffff
je 0x41efe1
mov eax, 0x40
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x40
push edi
push esi
call fcn.00406d74
test eax, eax
je 0x41efd4
mov eax, edi
cmp word [eax], 0x5a4d
jne 0x41efd4
push 0
push 0
mov eax, dword [eax + 0x3c]
push eax
push esi
call fcn.00406dd4
mov eax, edi
call fcn.00403288
mov eax, 0x18
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x18
push edi
push esi
call fcn.00406d74
test eax, eax
je 0x41efd4
mov eax, edi
cmp dword [eax], 0x4550
jne 0x41efd4
add eax, 4
mov dx, word [eax]
cmp dx, 0x14c
jb 0x41efd4
cmp dx, 0x150
ja 0x41efd4
mov eax, edi
call fcn.00403288
mov eax, 0xe0
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0xe0
push edi
push esi
call fcn.00406d74
test eax, eax
je 0x41efd4
mov eax, edi
mov dx, word [eax + 0x44]
cmp dx, word [ebp - 2]
jne 0x41efd4
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404d0c
mov eax, edi
call fcn.00403288
push esi
call fcn.00406ad4
mov eax, dword [ebp + 8]
mov eax, dword [eax]
xor edx, edx
call fcn.0040502c
jne 0x41eff9
inc ebx
cmp ebx, 0x19
jne 0x41ee8d
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5b0416
lea eax, [ebp - 0x10]
call fcn.00404cd0
ret
Function at 0x4020a0
Capabilities:
Create thread

Disassembly:
sub esp, 0x260
mov eax, dword [0x412040]
xor eax, esp
mov dword [esp + 0x25c], eax
push ebx
push ebp
xor ebp, ebp
lea eax, [esp + 8]
mov dword [esp + 0x210], 0xffffffff
mov dword [esp + 0x260], ebp
call fcn.00401c60
test eax, eax
je 0x402265
cmp word [esp + 0x216], 0xff31
jne 0x402227
cmp word [esp + 0x214], 0x76
jne 0x402227
cmp word [esp + 0x258], 0xb05
jne 0x402227
push 0x28c
call fcn.0040446d
mov ebx, eax
add esp, 4
cmp ebx, ebp
je 0x402265
push esi
push edi
lea esi, [esp + 0x10]
call fcn.00401d50
test eax, eax
je 0x402180
mov dword [ebx + 0x268], 1
mov eax, dword [esp + 0x218]
push eax
call fcn.00402280
add esp, 4
push ebp
push ebp
push 1
push ebp
mov dword [ebx + 8], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push ebp
push ebp
push ebx
push 0x4023f0
push ebp
mov dword [ebx + 0x26c], eax
lea edi, [ebx + 0xc]
mov ecx, 0x97
push ebp
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + 0x270], eax
jmp 0x4021a3
lea edi, [ebx + 0xc]
mov ecx, 0x97
lea esi, [esp + 0x10]
mov dword [ebx + 0x268], ebp
mov dword [ebx + 8], ebp
mov dword [ebx + 0x26c], ebp
rep movsd dword es:[edi], dword [esi]
mov dword [ebx + 0x270], ebp
cmp dword [0x413cf4], ebp
mov eax, pe_nt_image_headers32
mov dword [ebx + 0x274], ebp
mov dword [ebx + 0x278], eax
mov dword [ebx + 0x27c], ebp
mov dword [ebx + 0x280], ebp
mov dword [ebx + 0x284], ebp
mov dword [ebx + 0x288], eax
mov eax, dword [0x413ce4]
mov dword [ebx], 0x413ce0
mov dword [ebx + 4], eax
pop edi
mov dword [eax], ebx
mov dword [0x413ce4], ebx
pop esi
je 0x40220b
mov ecx, dword [0x413cf8]
neg ecx
sbb ecx, ecx
and ecx, 2
push ebp
push ecx
push ebp
mov edx, 1
mov ecx, ebx
call fcn.00402540
add esp, 0xc
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x25c]
xor ecx, esp
call fcn.0040407a
add esp, 0x260
ret
cmp dword [0x4130d8], 2
jne 0x402265
lea eax, [esp + 8]
call fcn.00401d10
test eax, eax
je 0x402265
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
cmp eax, 0xffffffff
je 0x40225b
push eax
mov ecx, 2
mov ebx, 0x4100f4
call fcn.00403cc0
add esp, 4
mov dword [0x4130d8], 1
mov ecx, dword [esp + 0x264]
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0040407a
add esp, 0x260
ret
Function at 0x403650
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
push esi
lea eax, [esp + 4]
push eax
push 0x20019
push 0
push str.SOFTWAREASUSContinuumControl
push 0x80000002
mov esi, 1
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4036b6
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 8]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
push 0
push str.SetContinuumByOthers
push ecx
mov dword [esp + 0x20], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4036b6
cmp dword [esp + 0xc], eax
je 0x4036b6
xor esi, esi
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10
ret

Function at 0x4036d0
Capabilities:
Write file on windows

Disassembly:
cmp dword [esp + 4], 0
push esi
je 0x403718
mov eax, dword [0x4130c8]
cmp eax, 2
jne 0x4036f9
push 0x413f20
mov ecx, 0x40fd0c
call fcn.00403790
add esp, 4
mov dword [0x4130c8], eax
cmp eax, 1
jne 0x403784
push 0
push 0
push 3
push 0
push 0
push 0x40000000
push 0x413f20
jmp 0x403752
mov eax, dword [0x4130c4]
cmp eax, 2
jne 0x403739
push 0x413d18
mov ecx, 0x40fcfc
call fcn.00403790
add esp, 4
mov dword [0x4130c4], eax
cmp eax, 1
jne 0x403784
push 0
push 0
push 3
push 0
push 0
push 0x40000000
push 0x413d18
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x403784
push 0
push 0
push 1
lea eax, [esp + 0x14]
push eax
push esi
mov byte [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x4038c0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
push esi
lea eax, [esp + 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.SOFTWAREASUSATK_Package
push 0x80000002
mov dword [esp + 0x18], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40392a
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 8]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
push esi
push str.DeviceTouchpad
push ecx
mov dword [esp + 0x20], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40391f
cmp dword [esp + 0xc], 6
jne 0x40391f
lea esi, [eax + 1]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10
ret
Function at 0x403940
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
push esi
lea eax, [esp + 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.SOFTWAREASUSATK_Package
push 0x80000002
mov dword [esp + 0x18], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4039c0
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 8]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
push esi
push str.HidKeybdLightLevel
push ecx
mov dword [esp + 0x20], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4039b5
cmp edi, esi
mov eax, dword [esp + 0xc]
je 0x4039a7
mov edx, eax
shr edx, 7
and edx, 1
mov dword [edi], edx
cmp ebx, esi
je 0x4039b0
and eax, 0xf
mov dword [ebx], eax
mov esi, 1
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10
ret

Function at 0x4039d0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
push esi
lea eax, [esp + 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.SOFTWAREASUSATK_Package
push 0x80000002
mov dword [esp + 0x18], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403a44
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 8]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
push esi
push str.NKeyRollover
push ecx
mov dword [esp + 0x20], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403a39
cmp edi, esi
je 0x403a34
xor edx, edx
cmp dword [esp + 0xc], esi
setne dl
mov dword [edi], edx
mov esi, 1
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10
ret

Function at 0x403a90
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
push esi
lea eax, [esp + 4]
push eax
push 0x20019
push 0
push str.SOFTWAREASUSATK_Package
push 0x80000002
mov esi, 3
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403b0f
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 8]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
push 0
push str.EnableHidSrv
push ecx
mov dword [esp + 0x20], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403b04
lea esi, [eax + 2]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x403b02
cmp eax, 1
je 0x403b02
cmp eax, esi
jne 0x403b04
mov esi, eax
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10
ret

Function at 0x403b20
Capabilities:
Set registry value

Disassembly:
sub esp, 8
push esi
lea eax, [esp + 4]
push eax
push 0xf003f
xor esi, esi
push esi
push str.SOFTWAREASUSATK_Package
push 0x80000002
mov dword [esp + 0x18], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403b7f
mov edx, dword [esp + 4]
push 4
lea ecx, [esp + 0xc]
push ecx
push 4
push esi
push str.EnableHidSrv
push edx
mov dword [esp + 0x20], 1
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
mov eax, dword [esp + 4]
neg esi
sbb esi, esi
push eax
add esi, 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 8
ret
Function at 0x403b90
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
push esi
lea eax, [esp + 4]
push eax
push 0x20019
push 0
push str.SOFTWAREASUSATK_Package
push 0x80000002
mov esi, 3
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403c0f
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 8]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
push 0
push str.EnableRgbKbSrv
push ecx
mov dword [esp + 0x20], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403c04
lea esi, [eax + 2]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x403c02
cmp eax, 1
je 0x403c02
cmp eax, esi
jne 0x403c04
mov esi, eax
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10
ret

Function at 0x403c20
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x60
push esi
push 0x44
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.004080f0
add esp, 0xc
xor eax, eax
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 0x6c]
lea edx, [esp + 0x1c]
push edx
push eax
push eax
push 0x410
push eax
push eax
push eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x8c]
push eax
push 0
push ecx
mov dword [esp + 0x44], 0x44
mov word [esp + 0x74], 5
mov dword [esp + 0x4c], str.Winsta0Winlogon
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x403cb3
mov eax, dword [esp + 8]
cmp eax, 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x403c9d
push eax
call esi
mov eax, dword [esp + 0xc]
cmp eax, 0xffffffff
je 0x403ca9
push eax
call esi
mov eax, 1
pop esi
add esp, 0x60
ret
xor eax, eax
pop esi
add esp, 0x60
ret
Function at 0x403e40
Capabilities:
Get session information

Disassembly:
sub esp, 0x20
test esi, esi
push ebp
mov ebp, dword [esp + 0x28]
push edi
je 0x403f53
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x10]
push ecx
push 0x10
push ebp
push 0
mov dword [esp + 0x20], 0
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x403e87
mov eax, dword [esp + 0xc]
movzx edi, word [eax]
push eax
call sub.WTSAPI32.dll_WTSFreeMemory
test di, di
jne 0x403f53
lea edx, [esp + 8]
push edx
push 0xf01ff
mov dword [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x403f53
mov eax, dword [esp + 8]
push esi
push 1
push 2
push 0
push 0xf01ff
push eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x403edc
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop ebp
add esp, 0x20
ret
mov edx, dword [esp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
lea eax, [esp + 0x1c]
push eax
push str.SeTcbPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x403f4e
mov edx, dword [esi]
push 0
push 0
push 0
lea ecx, [esp + 0x24]
push ecx
push 0
push edx
mov dword [esp + 0x30], 1
mov dword [esp + 0x3c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x403f4e
mov ecx, dword [esi]
push 4
lea eax, [esp + 0x14]
push eax
push 0xc
push ecx
mov dword [esp + 0x20], ebp
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x403f4e
mov eax, 1
pop edi
pop ebp
add esp, 0x20
ret
mov edx, dword [esi]
push edx
call edi
pop edi
xor eax, eax
pop ebp
add esp, 0x20
ret

Function at 0x40407a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x412040]
jne 0x404084
repz ret
jmp fcn.0040518a
Function at 0x407ba7
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 + 0x412928]
je 0x407bc2
inc edi
cmp edi, 0x17
jb 0x407bb3
cmp edi, 0x17
jae 0x407d42
push ebp
push 3
call fcn.0040bdaf
cmp eax, 1
pop ecx
je 0x407d0e
push 3
call fcn.0040bdaf
test eax, eax
pop ecx
jne 0x407bf6
cmp dword [0x41203c], 1
je 0x407d0e
cmp ebx, 0xfc
je 0x407d41
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x413620
push ebp
call fcn.0040af79
add esp, 0xc
test eax, eax
je 0x407c2c
push esi
push esi
push esi
push esi
push esi
call fcn.004064d4
add esp, 0x14
push 0x104
mov esi, 0x413639
push esi
push 0
mov byte [0x41373d], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x407c70
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.0040af79
add esp, 0xc
test eax, eax
je 0x407c70
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.004064d4
add esp, 0x14
push esi
call fcn.0040b070
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x407cb5
push esi
call fcn.0040b070
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x413934
push 0x40e97c
sub ecx, eax
push ecx
push eax
call fcn.0040aec6
add esp, 0x14
test eax, eax
je 0x407cb5
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.004064d4
add esp, 0x14
jmp 0x407cb7
xor esi, esi
push 0x40e978
push ebx
push ebp
call fcn.0040ae08
add esp, 0xc
test eax, eax
je 0x407cd7
push esi
push esi
push esi
push esi
push esi
call fcn.004064d4
add esp, 0x14
push dword [edi*8 + 0x41292c]
push ebx
push ebp
call fcn.0040ae08
add esp, 0xc
test eax, eax
je 0x407cf9
push esi
push esi
push esi
push esi
push esi
call fcn.004064d4
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.0040bbf2
add esp, 0xc
jmp 0x407d41
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x407d41
cmp ebp, 0xffffffff
je 0x407d41
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x41292c]
push dword [esi]
call fcn.0040b070
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 0x40bbf2
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00405d2b
xor ebx, ebx
cmp dword [0x413b98], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x40bcc8
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40bda8
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x40bda8
push eax
call fcn.00405cbd
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x413b98], eax
call esi
push eax
call fcn.00405cbd
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x413b9c], eax
call esi
push eax
call fcn.00405cbd
mov dword [0x413ba0], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00407934
test eax, eax
pop ecx
pop ecx
je 0x40bc96
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004064d4
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x40bcc8
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00405cbd
cmp eax, ebx
pop ecx
mov dword [0x413ba8], eax
je 0x40bcc8
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00405cbd
pop ecx
mov dword [0x413ba4], eax
mov eax, dword [0x413ba4]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x40bd4d
cmp dword [0x413ba8], ecx
je 0x40bd4d
push eax
call fcn.00405d34
push dword [0x413ba8]
mov esi, eax
call fcn.00405d34
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x40bd4d
cmp edi, ebx
je 0x40bd4d
call esi
cmp eax, ebx
je 0x40bd1a
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40bd1a
test byte [ebp - 0x18], 1
jne 0x40bd4d
lea eax, [ebp - 0x10]
push eax
call fcn.0040796b
test eax, eax
pop ecx
je 0x40bd35
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004064d4
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x40bd44
or dword [ebp + 0x10], 0x200000
jmp 0x40bd88
or dword [ebp + 0x10], 0x40000
jmp 0x40bd88
mov eax, dword [0x413b9c]
cmp eax, dword [ebp - 8]
je 0x40bd88
push eax
call fcn.00405d34
cmp eax, ebx
pop ecx
je 0x40bd88
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40bd88
mov eax, dword [0x413ba0]
cmp eax, dword [ebp - 8]
je 0x40bd88
push eax
call fcn.00405d34
cmp eax, ebx
pop ecx
je 0x40bd88
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x413b98]
call fcn.00405d34
cmp eax, ebx
pop ecx
je 0x40bda8
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40bdaa
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret