joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401c71
Capabilities:
Get graphical window text
Hide graphical window

Disassembly:
push edi
push dword [0x403bc0]
push dword [0x403bbc]
push 0x4033f3
push 0x403930
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0x10
push 0xc9
push dword [0x403900]
call sub.user32.dll_GetDlgItem
push 0x403930
push 0
push 0xc
push eax
call sub.user32.dll_SendMessageA
push dword [0x403bb4]
push 0x4033f9
push 0x403930
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0xc
push 0xca
push dword [0x403900]
call sub.user32.dll_GetDlgItem
push 0x403930
push 0
push 0xc
push eax
call sub.user32.dll_SendMessageA
push dword [0x403bc4]
push dword [0x403bc0]
push 0x4033fc
push 0x403930
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0x10
push dword [0x403bc0]
push dword [0x403bbc]
push 0x403401
push 0x403938
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0x10
push 0xcb
push dword [0x403900]
call sub.user32.dll_GetDlgItem
push 0x403930
push 0
push 0xc
push eax
call sub.user32.dll_SendMessageA
push dword [0x403bb8]
push 0x403406
push 0x403930
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0xc
push 0xcc
push dword [0x403900]
call sub.user32.dll_GetDlgItem
push 0x403930
push 0
push 0xc
push eax
call sub.user32.dll_SendMessageA
push dword [0x403bcc]
push dword [0x403bc8]
push 0x403409
push 0x403930
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0x10
push dword [0x403bc8]
push dword [0x403bc4]
push str._08x
push 0x403938
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0x10
push 0xcd
push dword [0x403900]
call sub.user32.dll_GetDlgItem
push 0x403930
push 0
push 0xc
push eax
call sub.user32.dll_SendMessageA
mov eax, dword [0x403bb4]
and eax, 0xff
push 0
push eax
push 0x3e7
push dword [0x403900]
call sub.user32.dll_SetDlgItemInt
mov eax, dword [0x403bb4]
shr eax, 8
and eax, 0xff
push 0
push eax
push 0x3e6
push dword [0x403900]
call sub.user32.dll_SetDlgItemInt
mov eax, dword [0x403bb4]
shr eax, 0x10
and eax, 0xff
push 0
push eax
push 0x3e5
push dword [0x403900]
call sub.user32.dll_SetDlgItemInt
mov eax, dword [0x403bb4]
shr eax, 0x18
and eax, 0xff
push 0
push eax
push 0xce
push dword [0x403900]
call sub.user32.dll_SetDlgItemInt
fld dword [0x403bb4]
fst qword [0x403bcc]
push dword [0x403bd0]
push dword [0x403bcc]
push str._.15g
push 0x403954
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0x10
push 0xc9
push dword [0x403900]
call sub.user32.dll_GetDlgItem
push 0x403930
push 0x63
push 0xd
push eax
call sub.user32.dll_SendMessageA
push 0x1e62
push dword [0x403900]
call sub.user32.dll_GetDlgItem
mov dword [0x403c68], eax
lea edx, [0x403930]
lea ecx, [0x403954]
mov al, byte [edx]
mov ah, byte [ecx]
cmp al, ah
je 0x401ee3
mov dword [0x403908], 1
push 5
push dword [0x403c68]
call sub.user32.dll_ShowWindow
jmp 0x401f0d
add edx, 1
add ecx, 1
test al, al
jne 0x401ec2
cmp dword [0x403908], 1
jne 0x401f0d
push 0
push dword [0x403c68]
call sub.user32.dll_ShowWindow
mov dword [0x403908], 0
pop edi
ret
Function at 0x4020b7
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffffc
pushal
mov ecx, 6
lea edx, [0x4032b6]
mov eax, 0
add eax, dword [edx]
add edx, 4
sub ecx, 1
jne 0x4020ce
add eax, 5
add eax, 2
mov dword [0x4032fe], eax
push 0x100
push 0x403c7c
push dword [0x403bb0]
call sub.kernel32.dll_GetModuleFileNameA
lea eax, [ebp - 4]
push eax
push 0x403a80
push 0x100
push 0x403c7c
call sub.kernel32.dll_GetFullPathNameA
mov esi, dword [ebp - 4]
lodsb al, byte [esi]
test al, al
jne 0x40211d
mov al, 0x2e
mov byte [esi - 1], al
cmp al, 0x2e
jne 0x402113
mov dword [esi], 0x696e69
push 0x403a80
push 0x104
push 0x403c7c
push str.Position
push str.Position
push str.Position
call sub.kernel32.dll_GetPrivateProfileStringA
cmp byte [0x403c7c], 0x50
je 0x4021a4
mov edi, 0x403b84
mov edx, 0x403c7c
mov ecx, 0xb
call fcn.0040228b
stosd dword es:[edi], eax
loop 0x402162
push 0x403b84
push dword [0x403900]
call sub.user32.dll_SetWindowPlacement
push 0x403bec
push dword [0x403900]
call sub.user32.dll_GetClientRect
mov eax, dword [0x4032fe]
mov edx, 0xb0
cmp dword [0x403bf4], eax
jb 0x4021a4
cmp dword [0x403bf8], edx
jae 0x4021c1
push 2
push 0x177
push 0x21c
push 0
push 0
push 0
push dword [0x403900]
call sub.user32.dll_SetWindowPos
clc
popal
mov esp, ebp
pop ebp
ret
Function at 0x403480
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x430370
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x43f010]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov dword [ebp - 0x4c], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, eax
mov dword [ebp - 0x14], 7
xor eax, eax
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp word [edx], ax
jne 0x4034da
xor ecx, ecx
jmp 0x4034ef
mov ecx, edx
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4034e0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00401235
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x44]
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
mov dword [ebp - 0x44], 0
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ebx, eax
test ebx, ebx
jne 0x403534
push 0x433e74
mov ecx, edi
call fcn.0040109b
jmp 0x40361a
cmp dword [ebp - 0x44], 2
jge 0x403552
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x433e74
mov ecx, edi
call fcn.0040109b
jmp 0x40361a
push 0x433e74
lea ecx, [ebp - 0x40]
call fcn.0040109b
mov esi, 1
mov byte [ebp - 4], 1
cmp dword [ebp - 0x44], esi
jle 0x4035b4
lea ecx, [ecx]
mov edx, dword [ebx + esi*4]
cmp word [edx], 0
jne 0x40357d
xor eax, eax
jmp 0x403595
mov eax, edx
lea ecx, [eax + 2]
mov dword [ebp - 0x48], ecx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403585
sub eax, dword [ebp - 0x48]
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x40]
call fcn.004013b1
push 1
push 0x433e78
lea ecx, [ebp - 0x40]
call fcn.004013b1
inc esi
cmp esi, dword [ebp - 0x44]
jl 0x403570
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
mov word [edi], ax
mov ecx, dword [ebp - 0x2c]
cmp ecx, 8
jae 0x4035f1
mov eax, dword [ebp - 0x30]
inc eax
je 0x4035fd
add eax, eax
push eax
lea eax, [ebp - 0x40]
push eax
push edi
call fcn.00406790
mov ecx, dword [ebp - 0x2c]
add esp, 0xc
jmp 0x4035fd
mov eax, dword [ebp - 0x40]
mov dword [edi], eax
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x30]
mov dword [edi + 0x10], eax
xor eax, eax
mov dword [edi + 0x14], ecx
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
cmp dword [ebp - 0x14], 8
jb 0x40362b
push dword [ebp - 0x28]
call fcn.00406649
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004071b0
mov esp, ebp
pop ebp
ret
Function at 0x417936
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43f010]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0040e089
mov dword [ebp - 0x14], eax
cmp dword [0x441958], esi
jne 0x417a29
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x4179b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x417b09
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x417b09
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x417b09
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x441958], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x44195c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x441960], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x441968], eax
test eax, eax
je 0x417a26
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x441964], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x417a4e
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x417a41
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x417a63
push 4
pop eax
jmp 0x417b0b
cmp dword [ebp - 0x14], esi
je 0x417a63
push dword [0x441958]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x417a48
mov eax, dword [0x441964]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x417ac1
cmp dword [0x441968], edi
je 0x417ac1
push eax
call ebx
push dword [0x441968]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x417ac1
test eax, eax
je 0x417ac1
call ecx
test eax, eax
je 0x417ab6
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x417ab6
test byte [ebp - 8], 1
jne 0x417ac1
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x417af1
mov eax, dword [0x44195c]
cmp eax, edi
je 0x417aee
push eax
call ebx
test eax, eax
je 0x417aee
call eax
mov esi, eax
test esi, esi
je 0x417aee
mov eax, dword [0x441960]
cmp eax, edi
je 0x417aee
push eax
call ebx
test eax, eax
je 0x417aee
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x441958]
call ebx
test eax, eax
je 0x417b09
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x417b0b
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004071b0
mov esp, ebp
pop ebp
ret
Function at 0x4018c0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov ebx, dword [ebp + 8]
cmp dword [ecx], ebx
je 0x401902
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov edi, eax
call fcn.00432a60
lea eax, [ebx + 1]
cmp eax, 2
jb 0x4018fb
mov dword [esi], ebx
call fcn.004069e0
push eax
push dword [ebp + 4]
push esi
push ebx
call fcn.00406a10
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
pop edi
pop ebx
pop ebp
ret 4

Function at 0x403360
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x160
mov eax, dword [0x519058]
xor eax, ebp
mov dword [esp + 0x158], eax
mov ecx, dword [0x51cb2c]
mov edx, dword fs:[0x2c]
mov eax, dword [0x51b8bc]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4033b5
mov ecx, dword [esp + 0x158]
xor ecx, ebp
call fcn.0049a81b
mov eax, 0x51b8b8
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x51b8bc
call fcn.0049a94c
add esp, 4
cmp dword [0x51b8bc], 0xffffffff
jne 0x40339a
lea eax, [esp + 0x40]
push 0x118
push 0
push eax
call fcn.004a19e0
add esp, 0xc
lea edi, [esp + 0x3c]
mov dword [esp + 0x3c], 0x11c
push edi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0
push eax
push 0
push 0
push dword [esp + 0x50]
push dword [esp + 0x50]
call dword [sym.imp.KERNEL32.dll_GetProductInfo]
push 0x74
call fcn.0049a550
add esp, 4
mov ecx, dword [0x51cb2c]
mov edx, dword fs:[0x2c]
mov esi, eax
mov eax, dword [0x51b8e4]
mov ebx, dword [esp + 0xc]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x403464
mov ecx, esi
push ebx
push 0x51b8c0
push edi
call fcn.00403500
mov dword [0x51b8b8], esi
push 0x51b8bc
call fcn.0049a90d
add esp, 4
jmp 0x40339a
push 0x51b8e4
call fcn.0049a94c
add esp, 4
cmp dword [0x51b8e4], 0xffffffff
jne 0x40343e
xorps xmm0, xmm0
lea eax, [esp + 0x10]
mov dword [esp + 0x30], 0
movaps xmmword [esp + 0x20], xmm0
movaps xmmword [esp + 0x10], xmm0
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
movsd xmm1, qword [esp + 0x20]
mov eax, dword [esp + 0x30]
movsd xmm0, qword [esp + 0x28]
movsd xmm2, qword [esp + 0x10]
movsd qword [0x51b8d0], xmm1
movsd xmm1, qword [esp + 0x18]
mov dword [0x51b8e0], eax
movsd qword [0x51b8d8], xmm0
movsd qword [0x51b8c0], xmm2
movsd qword [0x51b8c8], xmm1
push 0x51b8e4
call fcn.0049a90d
add esp, 4
jmp 0x40343e
Function at 0x40971c
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, ecx
call fcn.004094c0
test al, al
je 0x409740
push 0x32
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 1
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
lea edi, [esi + 0x20]
mov ecx, edi
push 0
call fcn.0040979c
lea ecx, [esi + 0x30]
call fcn.00402d6a
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x409764
push eax
call fcn.004a4a28
add esp, 4
mov edi, dword [edi]
test edi, edi
je 0x40977a
mov ecx, edi
call fcn.0042072a
push edi
call fcn.0049a583
add esp, 4
lea ecx, [esi + 0x18]
call fcn.00432a60
lea ecx, [esi + 0x14]
call fcn.00432a60
lea ecx, [esi + 0x10]
call fcn.00432a60
mov ecx, esi
pop esi
pop edi
pop ebp
jmp fcn.004093d0
Function at 0x409b76
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
mov eax, dword [0x519058]
mov esi, ecx
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
xor ebx, ebx
lea edi, [esi + 0x18]
xor eax, ebp
mov dword [ebp - 0x10], eax
lea eax, [edx + ecx]
push ebx
push eax
push ebx
push 0x8000004
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ecx, edi
push eax
call fcn.004018c0
mov ecx, esi
mov esi, dword [esi + 0x18]
lea eax, [esi + 1]
cmp eax, 1
ja 0x409be5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov ebx, 0x19
mov dword [ecx], eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049a81b
mov eax, ebx
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret 0x14
mov eax, dword [ecx]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 0x14]
push ebx
push ebx
push 7
push ecx
push dword [ebp - 0x18]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x409d0d
xor eax, eax
push eax
push eax
push eax
push 6
push dword [edi]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, dword [ebp + 0x18]
test eax, eax
je 0x409d20
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x18], eax
test ebx, ebx
je 0x409c6b
test ecx, ecx
je 0x409c6b
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp - 0x18]
lea edi, [edx + eax]
push ecx
push ebx
push edi
call fcn.004a1460
add esp, 0xc
mov eax, 0xffffff00
mov ecx, dword [edi + eax + 0x100]
test ecx, ecx
je 0x409c66
sub ecx, ebx
mov dword [edi + eax + 0x100], ecx
add eax, 4
jne 0x409c52
mov eax, dword [ebp - 0x14]
mov dword [0x51b830], eax
sub esp, 0xc
mov edi, dword [ebp - 0x20]
mov dword [esp + 8], 4
mov dword [esp + 4], 0x51b830
mov ecx, edi
call fcn.00409b16
test eax, eax
mov dword [0x51b830], 0
jne 0x409cfe
mov eax, dword [ebp + 0x10]
mov dword [0x51b96c], eax
sub esp, 0xc
mov ecx, edi
mov dword [esp + 8], 4
mov dword [esp + 4], 0x51b96c
call fcn.00409b16
test eax, eax
mov dword [0x51b96c], 0
jne 0x409cfe
mov eax, dword [ebp + 0x14]
mov dword [0x51b970], eax
sub esp, 0xc
mov ecx, edi
mov dword [esp + 8], 4
mov dword [esp + 4], 0x51b970
call fcn.00409b16
test eax, eax
mov dword [0x51b970], 0
je 0x409d32
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
jmp 0x409bcf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov ebx, 0x1a
jmp 0x409bcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov ebx, 0x1b
jmp 0x409bcf
mov esi, dword [ebp + 8]
lea eax, [edi + 0x20]
mov dword [ebp - 0x1c], eax
push 0x1c
call fcn.0049a550
add esp, 4
mov ebx, eax
mov ecx, eax
push esi
push dword [edi + 0x24]
push dword [edi + 8]
push dword [edi]
call fcn.004206bc
mov ecx, dword [ebp - 0x1c]
push ebx
call fcn.0040979c
mov ecx, dword [edi + 0x20]
push 0x400
push dword [ebp + 0x10]
push dword [ebp - 0x18]
call fcn.0042079c
mov ebx, 4
test al, al
je 0x409bcf
mov ecx, edi
call fcn.00409660
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
jmp 0x409bcf
Function at 0x40e740
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x10
mov edx, dword [0x519058]
mov eax, dword [ebp + 8]
lea esi, [ebp - 0x18]
lea edi, [ebp - 0x10]
xor edx, ebp
mov dword [ebp - 0xc], edx
lea edx, [ebp - 0x14]
mov dword [ebp - 0x10], 4
mov dword [ebp - 0x14], 4
mov dword [ebp - 0x18], 0
push edx
push esi
push edi
push 0
push eax
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test eax, eax
jne 0x40e7a8
mov eax, dword [ebp - 0x10]
mov esi, 0x3f4
add eax, 0xfffffffd
cmp eax, 1
ja 0x40e7a8
cmp dword [ebp - 0x14], 4
jne 0x40e7a8
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x18]
xor esi, esi
mov dword [eax], ecx
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.0049a81b
mov eax, esi
add esp, 0x10
pop esi
pop edi
pop ebp
ret 8

Function at 0x40e7c0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x1010
call fcn.0049b000
mov edx, dword [0x519058]
mov eax, dword [ebp + 8]
lea ebx, [ebp - 0x810]
lea esi, [ebp - 0x1018]
xor edx, ebp
mov dword [ebp - 0x10], edx
lea edx, [ebp - 0x101c]
mov dword [ebp - 0x1018], 1
mov dword [ebp - 0x101c], 0x800
push edx
push ebx
push esi
push 0
push eax
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test eax, eax
jne 0x40e8f1
mov eax, dword [ebp - 0x1018]
mov esi, dword [ebp + 0xc]
cmp eax, 2
je 0x40e85d
mov edi, 0x3f4
cmp eax, 1
jne 0x40e8f1
push ebx
call fcn.004abcd0
add esp, 4
mov edi, eax
mov eax, dword [esi + 0x14]
cmp eax, edi
jae 0x40e8ba
sub esp, 0xc
mov al, byte [ebp - 0x1010]
mov byte [esp + 4], al
mov dword [esp + 8], ebx
jmp 0x40e8ae
lea eax, [ebp - 0x1010]
push 0x400
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [ebp - 0x101c], eax
dec eax
mov edi, 0xea
cmp eax, 0x3ff
ja 0x40e8f1
lea ebx, [ebp - 0x1010]
push ebx
call fcn.004abcd0
add esp, 4
mov edi, eax
mov eax, dword [esi + 0x14]
mov ecx, ebx
cmp eax, edi
jae 0x40e8ce
sub esp, 0xc
mov al, byte [ebp - 0x1014]
mov byte [esp + 4], al
mov dword [esp + 8], ecx
mov ecx, esi
mov dword [esp], edi
call fcn.00404f20
jmp 0x40e8ef
cmp eax, 8
mov eax, esi
jb 0x40e8c3
mov esi, dword [eax]
mov ecx, edi
mov dword [eax + 0x10], edi
add ecx, edi
push ecx
push ebx
jmp 0x40e8e0
cmp eax, 8
mov eax, esi
jb 0x40e8d7
mov esi, dword [eax]
mov edx, edi
mov dword [eax + 0x10], edi
add edx, edi
push edx
push ecx
push esi
call fcn.004a0b10
add esp, 0xc
mov word [esi + edi*2], 0
xor edi, edi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049a81b
mov eax, edi
add esp, 0x1010
pop esi
pop edi
pop ebx
pop ebp
ret 8
Function at 0x4106b6
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x60
mov eax, dword [0x519058]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp byte [ecx + 0x2c], 0
je 0x4107c3
mov esi, ecx
lea edx, [ecx + 0x24]
lea eax, [ebp - 0x68]
lea edi, [ebp - 0x6c]
mov ecx, edi
push eax
push 2
call fcn.004107e3
add esp, 8
mov edx, dword [edi]
test edx, edx
je 0x4107ca
cmp dword [edx], 0
mov dword [ebp - 0x60], esi
je 0x4107b6
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x58], edx
add eax, 0x18
mov dword [ebp - 0x64], eax
xor eax, eax
test dword [edx + eax*8 + 8], 0xc0000020
mov dword [ebp - 0x5c], eax
jne 0x4107aa
cmp dword [ebp + 8], 0
je 0x41076c
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
cmp dword [eax + 4], ecx
je 0x41076c
xor ebx, ebx
xor edi, edi
mov eax, dword [ebp - 0x5c]
add ecx, ebx
mov esi, dword [edx + eax*8 + 4]
call fcn.00411090
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
mov edx, dword [ebp - 0x58]
test eax, eax
jne 0x4107aa
mov eax, dword [ebp + 8]
inc edi
add ebx, 0x44
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub eax, ecx
sar eax, 2
imul eax, eax, 0xf0f0f0f1
cmp edi, eax
jb 0x410734
mov eax, dword [ebp - 0x5c]
lea edi, [ebp - 0x54]
mov ecx, edi
push dword [edx + eax*8 + 4]
call fcn.00410dd4
mov esi, dword [ebp - 0x60]
mov eax, dword [esi + 0x1c]
cmp eax, dword [esi + 0x20]
je 0x41079d
mov ebx, 0x44
push ebx
push edi
push eax
call fcn.004a1460
add esp, 0xc
add dword [esi + 0x1c], ebx
jmp 0x4107a7
mov ecx, dword [ebp - 0x64]
push edi
push eax
call fcn.004049aa
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x5c]
inc eax
cmp eax, dword [edx]
jb 0x41070f
push edx
call fcn.0049a82c
add esp, 4
xor esi, esi
jmp 0x4107cd
mov esi, 0x3f0
jmp 0x4107cd
mov esi, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049a81b
mov eax, esi
add esp, 0x60
pop esi
pop edi
pop ebx
pop ebp
ret 4
Function at 0x416060
Capabilities:
Check for time delay via queryperformancecounter
Execute anti-debugging instructions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x38
mov eax, dword [0x519058]
xorpd xmm0, xmm0
xor eax, ebp
mov dword [esp + 0x30], eax
movsd xmm1, qword [0x51b9e0]
ucomisd xmm1, xmm0
jne 0x4161e4
jp 0x4161e4
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [esp + 0xc], eax
call edi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov ecx, dword [0x51cb2c]
mov edx, dword fs:[0x2c]
mov eax, dword [0x51b9f0]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x416209
mov ecx, dword [0x51cb2c]
mov edx, dword fs:[0x2c]
mov eax, dword [0x51ba00]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x416242
rdtsc
lea esi, [esp + 0x28]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 8], eax
mov dword [esp + 4], edx
push esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
push esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
sub edi, dword [0x51b9f8]
movsd xmm2, qword [0x4e39f8]
sbb ebx, dword [0x51b9fc]
movd xmm1, edi
fild qword [esp + 0x28]
fstp qword [esp + 0x20]
movd xmm0, ebx
punpckldq xmm1, xmm0
punpckldq xmm1, xmmword [0x4e39d0]
subpd xmm1, xmmword [0x4e39e0]
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
xorpd xmm1, xmm1
divsd xmm0, qword [esp + 0x20]
ucomisd xmm2, xmm0
ja 0x4161e4
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
sub eax, dword [0x51b9e8]
sbb ecx, dword [0x51b9ec]
movd xmm2, eax
movd xmm1, ecx
punpckldq xmm2, xmm1
punpckldq xmm2, xmmword [0x4e39d0]
subpd xmm2, xmmword [0x4e39e0]
movapd xmm1, xmm2
unpckhpd xmm1, xmm2
addsd xmm1, xmm2
divsd xmm1, xmm0
movsd qword [0x51b9e0], xmm1
movsd qword [esp + 0x18], xmm1
fld qword [esp + 0x18]
fstp xword [esp + 0xc]
mov ecx, dword [esp + 0x30]
xor ecx, ebp
call fcn.0049a81b
fld xword [esp + 0xc]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x51b9f0
call fcn.0049a94c
add esp, 4
cmp dword [0x51b9f0], 0xffffffff
jne 0x4160d2
rdtsc
mov dword [0x51b9e8], eax
mov dword [0x51b9ec], edx
push 0x51b9f0
call fcn.0049a90d
add esp, 4
jmp 0x4160d2
push 0x51ba00
call fcn.0049a94c
add esp, 4
cmp dword [0x51ba00], 0xffffffff
jne 0x4160f3
lea eax, [esp + 0x28]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [0x51b9fc], ecx
mov dword [0x51b9f8], eax
push 0x51ba00
call fcn.0049a90d
add esp, 4
jmp 0x4160f3