joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4016e0
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x410428
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x415050]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x418], 0
jne 0x401752
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [esi + 0x418], eax
test eax, eax
jne 0x401752
push eax
push 0x413358
push 0x41338c
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp dword [esi + 0x41c], 0
jne 0x40189c
push 0
mov edx, dword [esi + 0x418]
push 0
push 0
push 0
push 0
lea ecx, [esi + 0x20c]
push ecx
push 1
push 2
push 1
push 0xf01ff
lea eax, [esi + 4]
push eax
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [esi + 0x41c], eax
test eax, eax
jne 0x40189c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x431
je 0x4017bd
cmp edi, 0x430
jne 0x4018a6
mov ecx, dword [esi + 0x418]
push 0xf01ff
lea eax, [esi + 4]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [esi + 0x41c], eax
cmp edi, 0x431
jne 0x4018a6
push 0x2000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4018a6
mov eax, dword [esi + 0x41c]
lea edx, [ebp - 0x14]
push edx
push 0x2000
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x415f88]
mov dword [ebp - 0x10], ecx
push eax
push 0x4132a4
lea edx, [ebp - 0x10]
mov dword [ebp - 4], 0
call fcn.00401000
add esp, 8
test ebx, ebx
je 0x401867
cmp dword [edi + 4], 2
je 0x401867
mov edx, dword [esi + 0x41c]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
lea ecx, [eax - 0xc]
cmp ecx, 0x415f78
je 0x4018a6
lea esi, [eax - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4018a6
push esi
call fcn.00403d26
add esp, 4
jmp 0x4018a6
mov dword [esi + 0x414], 1
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401900
Capabilities:
Delete service
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x415050]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 0x24], ebx
cmp dword [esi + 0x418], ebx
jne 0x40195c
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [esi + 0x418], eax
cmp eax, ebx
jne 0x40195c
push ebx
push 0x413358
push 0x41338c
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403c00
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x41c], ebx
jne 0x401980
mov ecx, dword [esi + 0x418]
push 0xf01ff
lea eax, [esi + 4]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [esi + 0x41c], eax
mov eax, dword [esi + 0x41c]
cmp eax, ebx
je 0x40194a
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x4019c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x401a0b
mov edx, dword [esi + 0x41c]
push edx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov eax, dword [ebp - 0x24]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403c00
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x41c]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x20]
push eax
push ecx
call edi
mov eax, dword [ebp - 0x1c]
cmp eax, 2
jne 0x401a05
mov edx, ebx
inc ebx
cmp edx, 0x50
jge 0x401a05
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esi + 0x41c]
lea eax, [ebp - 0x20]
push eax
push ecx
call edi
mov eax, dword [ebp - 0x1c]
cmp eax, 2
je 0x4019e0
pop edi
cmp eax, 4
jne 0x401a12
mov dword [ebp - 0x24], 1
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x24]
pop esi
xor ecx, ebp
pop ebx
call fcn.00403c00
mov esp, ebp
pop ebp
ret
Function at 0x401a30
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x415050]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x418], 0
mov dword [ebp - 0x24], 0
jne 0x401a8f
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [esi + 0x418], eax
test eax, eax
jne 0x401a8f
push eax
push 0x413358
push 0x41338c
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403c00
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x41c], 0
jne 0x401ab4
mov ecx, dword [esi + 0x418]
push 0xf01ff
lea eax, [esi + 4]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [esi + 0x41c], eax
mov eax, dword [esi + 0x41c]
test eax, eax
je 0x401a7e
lea edx, [ebp - 0x20]
push edx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x401adc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
jmp 0x401b22
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
cmp eax, 3
jne 0x401b1f
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401af9
mov ecx, dword [ebp - 0x28]
mov edx, ecx
inc ecx
mov dword [ebp - 0x28], ecx
cmp edx, 0x50
jge 0x401b1d
push 0x32
call edi
mov ecx, dword [esi + 0x41c]
lea eax, [ebp - 0x20]
push eax
push ecx
call ebx
mov eax, dword [ebp - 0x1c]
cmp eax, 3
je 0x401af6
pop edi
pop ebx
cmp eax, 1
jne 0x401b2b
mov dword [ebp - 0x24], 1
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x24]
xor ecx, ebp
pop esi
call fcn.00403c00
mov esp, ebp
pop ebp
ret

Function at 0x401cc0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
mov eax, dword [ebp + 8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401cd8
pop edi
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401d0a
mov ecx, dword [ebp + 8]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, esi
and edi, 0xf
jbe 0x401d06
cmp esi, eax
jae 0x401d0a
dec edi
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401cf8
cmp esi, eax
jb 0x401d10
pop esi
xor eax, eax
pop edi
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebp
ret
Function at 0x401d20
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor esi, esi
push esi
mov ecx, 0x416680
call fcn.0040394d
mov ebx, eax
mov dword [ebp - 4], 1
test ebx, ebx
je 0x401dd4
test esi, esi
jne 0x401dd4
mov eax, dword [ebp + 8]
shr eax, 4
inc eax
push esi
movzx ecx, ax
push ecx
push 6
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov edi, eax
test edi, edi
je 0x401db8
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x401db2
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401db2
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
add eax, esi
and ecx, 0xf
jbe 0x401da1
cmp esi, eax
jae 0x401da5
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401d93
cmp esi, eax
jb 0x401da9
xor eax, eax
jmp 0x401db2
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
mov esi, eax
test eax, eax
jne 0x401ddd
mov edi, dword [ebp - 4]
push edi
mov ecx, 0x416680
call fcn.0040394d
mov ebx, eax
inc edi
mov dword [ebp - 4], edi
test ebx, ebx
jne 0x401d45
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401f50
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x415050]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
push 0x206
mov ebx, ecx
push eax
lea ecx, [ebp - 0x20a]
push ecx
mov esi, edx
mov byte [ebp - 0x20d], 1
mov word [ebp - 0x20c], ax
call fcn.00404ed0
add esp, 0xc
push 0x104
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x401fb0
lea eax, [ebp - 0x20c]
call fcn.00401ec0
mov eax, esi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401fb2
lea edi, [ebp - 0x20c]
sub eax, esi
add edi, 0xfffffffe
jmp 0x401fd0
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x401fd0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x4134f8
mov ecx, eax
push ebx
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
push esi
push 0
mov dword [ebp - 0x214], 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push 0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x218], eax
test esi, esi
jne 0x40203e
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403c00
mov esp, ebp
pop ebp
ret
push 0
push 0x80
push 2
push 0
push 7
push 0x40000000
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, dword [ebp - 0x218]
push 0
lea ecx, [ebp - 0x214]
push ecx
push edx
mov esi, eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, 0xffffffff
jne 0x402080
xor bl, bl
jmp 0x40208d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [ebp - 0x20d]
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.00403c00
mov esp, ebp
pop ebp
ret
Function at 0x4020b0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x415050]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x20a]
push ecx
mov word [ebp - 0x20c], ax
call fcn.00404ed0
add esp, 0xc
push 0x104
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x402102
lea eax, [ebp - 0x20c]
call fcn.00401ec0
push esi
push edi
call fcn.004021f0
test eax, eax
je 0x40213e
mov eax, str.PassGuard_x64.sys
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402114
lea edi, [ebp - 0x20c]
sub eax, edx
add edi, 0xfffffffe
lea ebx, [ebx]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x402130
jmp 0x40216c
mov eax, str.PassGuard.sys
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402145
lea edi, [ebp - 0x20c]
sub eax, edx
add edi, 0xfffffffe
jmp 0x402160
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x402160
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
push 0x104
mov ecx, eax
and ecx, 3
push str.PassGuard
push 0x416224
rep movsb byte es:[edi], byte [esi]
call fcn.00403cda
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x41642c
call fcn.00403cda
mov ecx, dword [ebp - 4]
add esp, 0x18
pop edi
xor ecx, ebp
mov dword [0x416634], 0
mov dword [0x41663c], 0
mov dword [0x416638], 0
mov dword [0x416640], 0xffffffff
mov eax, 1
pop esi
call fcn.00403c00
mov esp, ebp
pop ebp
ret

Function at 0x402280
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc04
mov eax, dword [0x415050]
xor eax, ebp
mov dword [ebp - 4], eax
push 0xbff
lea eax, [ebp - 0xc03]
push 0
push eax
mov byte [ebp - 0xc04], 0
call fcn.00404ed0
mov edx, dword [ebp + 8]
lea ecx, [ebp + 0xc]
push ecx
push edx
lea eax, [ebp - 0xc04]
push eax
call fcn.00403f96
add esp, 0x18
lea ecx, [ebp - 0xc04]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea edx, [ebp - 0xc04]
push edx
push str._s_r_n
call fcn.004047ac
mov ecx, dword [ebp - 4]
xor ecx, ebp
add esp, 8
call fcn.00403c00
mov esp, ebp
pop ebp
ret
Function at 0x402430
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x410460
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x415050]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, 0x4134a7
mov dword [ebp - 4], 0
test eax, 0xffff0000
jne 0x40249f
mov ecx, eax
movzx esi, cx
push esi
call fcn.00401d20
add esp, 4
test eax, eax
je 0x4024a7
push eax
mov eax, esi
lea edi, [ebp - 0x10]
call fcn.00403650
jmp 0x4024a7
lea edi, [ebp - 0x10]
call fcn.00403090
mov edi, dword [ebp + 8]
push 0
mov dword [ebp - 4], 1
push edi
mov dword [ebp - 0x14], 0x34
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov esi, eax
test esi, esi
je 0x402578
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00403c0f
add esp, 4
mov ebx, eax
push ebx
push esi
push 0
push edi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x40256a
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x18]
push ecx
push 0x4134a8
push ebx
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x40256a
mov eax, dword [ebp - 0x18]
movzx edx, word [eax + 0xc]
movzx ecx, word [eax + 0xe]
push edx
movzx edx, word [eax + 8]
movzx eax, word [eax + 0xa]
push ecx
push edx
push eax
push 0x4134ac
lea edi, [ebp - 0x10]
call fcn.00403810
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx - 8]
mov eax, 1
sub eax, dword [edx - 4]
add esp, 0x14
or ecx, eax
jge 0x402552
xor eax, eax
mov ecx, edi
call fcn.00403400
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
push edx
push ecx
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
push ebx
mov esi, eax
call fcn.00403bf5
add esp, 4
jmp 0x40257d
mov esi, dword [ebp - 0x18]
push ebx
call fcn.00403bf5
add esp, 4
jmp 0x40257d
mov esi, 1
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4025a3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4025c0
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x415050]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x20a]
push ecx
xor bl, bl
mov word [ebp - 0x20c], ax
call fcn.00404ed0
add esp, 0xc
push 0x104
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x402616
lea eax, [ebp - 0x20c]
call fcn.00401ec0
push edi
call fcn.004021f0
test eax, eax
je 0x402663
mov eax, str.PassGuard_x64.sys
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402627
lea edi, [ebp - 0x20c]
sub eax, edx
add edi, 0xfffffffe
lea ecx, [ecx]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x402640
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, str.1.0.1.1
jmp 0x4026a7
mov eax, str.PassGuard.sys
mov edx, eax
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402670
lea edi, [ebp - 0x20c]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x402686
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, str.1.0.1.8
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
pop edi
test eax, eax
je 0x4026cd
lea ecx, [ebp - 0x20c]
push esi
push ecx
call fcn.00402430
add esp, 8
test eax, eax
jle 0x4026df
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403c00
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.00403c00
mov esp, ebp
pop ebp
ret
Function at 0x403c00
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x415050]
jne 0x403c0a
repz ret
jmp fcn.00404f4a

Function at 0x404589
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x4045b0
call fcn.00406147
mov dword [eax], esi
call fcn.00406134
push 0x16
pop esi
mov dword [eax], esi
call fcn.004060e2
mov eax, esi
jmp 0x404605
test dword [ebp + 0xc], 0xfffffff9
jne 0x404596
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4045dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040615a
pop ecx
call fcn.00406134
mov eax, dword [eax]
jmp 0x404605
test al, 0x10
jne 0x404603
test al, 1
je 0x404603
test byte [ebp + 0xc], 2
je 0x404603
call fcn.00406147
mov dword [eax], 5
call fcn.00406134
mov dword [eax], 0xd
jmp 0x4045d4
xor eax, eax
pop esi
pop ebp
ret
Function at 0x40cbb0
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x415050]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00406f25
and dword [ebp - 0x14], 0
cmp dword [0x417488], 0
mov dword [ebp - 0x18], eax
jne 0x40cc63
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x40cd0b
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x41324c
push ebx
call edi
test eax, eax
je 0x40cd0b
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x417488], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x41748c], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x417490], eax
call edi
push eax
call esi
mov dword [0x417498], eax
test eax, eax
je 0x40cc63
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x417494], eax
mov eax, dword [0x417494]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x40ccbc
cmp dword [0x417498], ecx
je 0x40ccbc
push eax
call esi
push dword [0x417498]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x40ccbc
test ebx, ebx
je 0x40ccbc
call edi
test eax, eax
je 0x40ccb3
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x40ccb3
test byte [ebp - 8], 1
jne 0x40ccbc
or dword [ebp + 0x10], 0x200000
jmp 0x40ccef
mov eax, dword [0x41748c]
cmp eax, dword [ebp - 0x18]
je 0x40ccef
push eax
call esi
test eax, eax
je 0x40ccef
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40ccef
mov eax, dword [0x417490]
cmp eax, dword [ebp - 0x18]
je 0x40ccef
push eax
call esi
test eax, eax
je 0x40ccef
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x417488]
call esi
test eax, eax
je 0x40cd0b
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x40cd0d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403c00
leave
ret
Function at 0x4020c0
Capabilities:
Inspect section memory permissions

Disassembly:
mov edi, dword [ebp - 0x88]
mov eax, dword [ebp + 0xc]
cmp ax, word [edi + 6]
jne 0x4020ab
mov edx, dword [ebp - 0xb4]
xor ecx, ecx
mov edi, 0x60000000
jmp 0x4020c9
movzx eax, ax
lea eax, [eax + eax*4]
mov ecx, dword [edi + eax*8 + 0x104]
mov edx, dword [edi + eax*8 + 0x108]
lea eax, [edi + eax*8 + 0xf8]
test bh, al
clc
add byte [eax], al
invalid
mov edi, dword [eax + 0x24]
test bh, al
clc
add byte [eax], al
add byte [ebx + 0x448d2478], cl
or bh, bh
lea eax, [edx + ecx - 1]
xor edx, edx
div dword [ebp - 0xac]
xor edx, edx
mov dword [ebp - 0x44], eax
mov eax, ecx
div dword [ebp - 0xac]
cmp eax, dword [ebp - 0x44]
ja 0x402127
mov edx, edi
mov dword [ebp + 8], edi
and dword [ebp + 8], 0x40000000
mov dword [ebp + 0x10], edi
and edx, 0x20000000
and dword [ebp + 0x10], 0x80000000
mov ecx, dword [ebp + 0x18]
cmp edx, ebx
je 0x40210e
or byte [eax + ecx], 1
cmp dword [ebp + 8], ebx
je 0x402117
or byte [eax + ecx], 2
cmp dword [ebp + 0x10], ebx
je 0x402121
add ecx, eax
or byte [ecx], 4
inc eax
cmp eax, dword [ebp - 0x44]
jbe 0x402103
inc dword [ebp + 0xc]
mov eax, dword [ebp - 0x88]
mov cx, word [ebp + 0xc]
cmp cx, word [eax + 6]
jbe 0x40208d
mov dword [ebp + 8], esi
xor edi, edi
mov eax, dword [ebp + 0x18]
push 2
pop ecx
movzx eax, byte [edi + eax]
sub eax, ecx
je 0x402174
dec eax
je 0x40216b
sub eax, 3
je 0x402162
mov dword [ebp - 4], 0x40
jmp 0x402191
mov dword [ebp - 4], 4
jmp 0x402177
mov dword [ebp - 4], 0x20
jmp 0x402177
mov dword [ebp - 4], ecx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 0xac]
push dword [ebp + 8]
call dword [ebp - 0xbc]
test eax, eax
je 0x4021c3
mov eax, dword [ebp - 0xac]
add dword [ebp + 8], eax
inc edi
cmp edi, dword [ebp - 0x8c]
push dword [esi - 0x60]
mov eax, dword [ebp - 0x88]
mov edi, dword [eax + 0x28]
add edi, esi
call fcn.004019d4
push ecx
mov bl, 0xc8
idiv edi
jne 0x4021ce
push 1
push esi
call edi
mov eax, esi
jmp 0x4021cf
push 0x8000
push ebx
push esi
call dword [ebp - 8]
xor eax, eax
rcr byte [edi + 0x5e], 0x5b
pop edi
pop esi
pop ebx
leave
ret