joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401a49
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc10
push edi
xor edi, edi
push edi
push 0x3fc
lea eax, [ebp - 0xc10]
push eax
push edi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
je 0x401b1b
push 0xf003f
push 1
push edi
push 1
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
cmp eax, edi
mov dword [ebp - 8], eax
je 0x401b1b
push 0x7fe
lea eax, [ebp - 0x812]
push edi
push eax
mov word [ebp - 0x814], di
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 4], edi
push ebx
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
push edi
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x814]
push eax
push dword [ebp - 4]
mov dword [ebp - 0xc], 0x400
push dword [ebp - 8]
mov dword [ebp - 0x10], 0x400
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov ebx, eax
cmp ebx, edi
jne 0x401b06
push 0x401240
lea eax, [ebp - 0x814]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x401b11
inc dword [ebp - 4]
cmp ebx, 0x103
jne 0x401ab9
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
pop edi
leave
ret
Function at 0x403232
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 1
xor bl, bl
call esi
test ax, ax
jns 0x403249
inc bl
jmp 0x403254
push 2
call esi
test ax, ax
jns 0x403254
mov bl, 2
pop esi
mov al, bl
pop ebx
ret

Function at 0x405afd
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call main
push eax
call fcn.0040589b
call fcn.00401640
push eax
call fcn.0040592a
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x402d38
Capabilities:
Accept command line arguments
Create process on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x27c
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
call fcn.00404e4f
xor edi, edi
mov dword [ebp - 0x228], edi
mov dword [ebp - 0x224], edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [ebp - 0x21c]
push ecx
push eax
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x220], edi
call fcn.004050e7
mov esi, eax
cmp esi, edi
jl 0x402ea7
push ebx
xor ebx, ebx
inc ebx
push ebx
lea eax, [ebp - 0x218]
push eax
push ebx
push dword [ebp - 0x21c]
call fcn.0040538e
mov dword [ebp - 0x210], eax
lea eax, [ebp - 0x228]
push eax
call fcn.00404e87
mov esi, eax
cmp esi, edi
jl 0x402ea6
cmp dword [ebp - 0x228], edi
je 0x402f10
lea eax, [ebp - 0x224]
push eax
call fcn.00404eee
mov esi, eax
cmp esi, edi
jl 0x402ea6
push 0x4013f0
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.0040608b
mov esi, eax
cmp esi, edi
jl 0x402e9b
cmp dword [ebp - 0x210], ebx
jne 0x402e21
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0x218]
call fcn.004050e7
mov esi, eax
cmp esi, edi
jl 0x402e9b
push 0x44
lea eax, [ebp - 0x27c]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
push edi
push edi
push edi
push edi
push edi
push dword [ebp - 0x220]
lea eax, [ebp - 0x20c]
push eax
mov dword [ebp - 0x27c], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x402ef8
call fcn.00406d24
mov esi, eax
push esi
push 0x401398
push ebx
lea eax, [ebp - 0x214]
push 0xa
push eax
mov dword [ebp - 0x214], edi
mov dword [ebp - 0x210], 2
call fcn.004047fd
add esp, 0x14
push dword [ebp - 0x224]
call fcn.00404f75
pop ebx
push esi
push 0x401348
push 3
lea eax, [ebp - 0x214]
push 0xa
push eax
mov dword [ebp - 0x214], edi
mov dword [ebp - 0x210], 2
call fcn.004047fd
push dword [ebp - 0x21c]
call fcn.00405300
push dword [ebp - 0x220]
call fcn.00405300
mov ecx, dword [ebp - 4]
add esp, 0x1c
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00403280
leave
ret 0x10
push dword [ebp - 0x238]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [ebp - 0x234]
call ebx
jmp 0x402e9b
mov esi, 0xd79
cmp dword [ebp - 0x210], ebx
jne 0x402f4f
push 0x401244
push dword [ebp - 0x218]
call fcn.004051fd
test eax, eax
jne 0x402f36
add esi, 0xfffffffd
jmp 0x402f4f
push 0x40124c
push dword [ebp - 0x218]
call fcn.004051fd
test eax, eax
jne 0x402f4f
mov esi, 0xd77
push ebx
push esi
push edi
call fcn.00402cd9
call fcn.004050da
mov esi, eax
jmp 0x402ea6
Function at 0x403271
Capabilities:
Terminate process

Disassembly:
push 0x5c
push 0x4070e0
call fcn.00403424
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov dword [ebp - 4], 0xfffffffe
mov dword [ebp - 4], 1
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov dword [ebp - 0x20], ebx
mov edi, 0x408acc
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, ebx
je 0x40302c
cmp eax, esi
jne 0x40301f
xor esi, esi
inc esi
mov dword [ebp - 0x20], esi
jmp 0x40302f
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x403006
xor esi, esi
inc esi
mov eax, dword [0x408ac8]
cmp eax, esi
jne 0x403042
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x403071
mov eax, dword [0x408ac8]
test eax, eax
jne 0x40306b
mov dword [0x408ac8], esi
push 0x4011e0
push 0x4011d4
call fcn.00402f68
pop ecx
pop ecx
test eax, eax
je 0x403071
jmp 0x403195
mov dword [0x408060], esi
mov eax, dword [0x408ac8]
cmp eax, esi
jne 0x403095
push 0x4011d0
push 0x4011c4
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x408ac8], 2
cmp dword [ebp - 0x20], ebx
jne 0x4030a2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x408ad0], ebx
je 0x4030c3
push 0x408ad0
call fcn.00403399
pop ecx
test eax, eax
je 0x4030c3
push ebx
push 2
push ebx
call dword [0x408ad0]
mov eax, dword [sym.imp.msvcrt.dll__wcmdln]
cmp dword [eax], ebx
je 0x403195
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
movzx ecx, word [eax]
cmp cx, 0x20
ja 0x40312d
cmp cx, bx
je 0x4030e8
cmp dword [ebp - 0x1c], ebx
jne 0x40312d
movzx ecx, word [eax]
cmp cx, bx
je 0x4030fd
cmp cx, 0x20
ja 0x4030fd
inc eax
inc eax
mov dword [ebp - 0x24], eax
jmp 0x4030e8
test byte [ebp - 0x40], 1
je 0x403109
movzx ecx, word [ebp - 0x3c]
jmp 0x40310c
push 0xa
pop ecx
push ecx
push eax
push ebx
push 0x400000
call main
mov dword [0x40805c], eax
cmp dword [0x408050], ebx
jne 0x403172
push eax
call dword [sym.imp.msvcrt.dll_exit]
cmp cx, 0x22
jne 0x40313e
xor ecx, ecx
cmp dword [ebp - 0x1c], ebx
sete cl
mov dword [ebp - 0x1c], ecx
inc eax
inc eax
jmp 0x4030d2
cmp dword [0x408060], ebx
jne 0x403180
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x40805c]
jmp 0x4031a1
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.00403469
ret
call fcn.00403617
jmp 0x402fc9
Function at 0x403b72
Capabilities:
Get file size

Disassembly:
push 0x20
push 0x407168
call fcn.00403424
mov edi, ecx
mov dword [ebp - 0x28], edi
cmp dword [edi + 0x10], 0xffffffff
je 0x403caa
call fcn.0040395f
test eax, eax
je 0x403caa
xor ebx, ebx
push ebx
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x24], eax
test byte [edi + 0xc], 0x14
mov esi, 0x200000
je 0x403bb9
mov esi, 0x2d00000
cmp eax, 0xffffffff
je 0x403c9a
cmp eax, esi
jbe 0x403c9a
mov dword [ebp - 0x20], eax
push ebx
push ebx
push ebx
push 4
push ebx
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x30], eax
cmp eax, ebx
je 0x403c9a
push ebx
push ebx
push ebx
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
mov dword [ebp - 0x2c], ebx
test ebx, ebx
je 0x403c70
and dword [ebp - 4], 0
mov eax, dword [ebp - 0x24]
add eax, ebx
shr esi, 1
mov ecx, eax
sub ecx, esi
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], eax
jae 0x403c21
mov edx, dword [ebp - 0x1c]
inc dword [ebp - 0x1c]
cmp byte [edx], 0xa
jne 0x403c0e
cmp dword [ebp - 0x1c], eax
jne 0x403c26
mov dword [ebp - 0x1c], ecx
sub eax, dword [ebp - 0x1c]
mov esi, eax
push esi
push dword [ebp - 0x1c]
push ebx
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
mov dword [ebp - 0x20], esi
mov dword [ebp - 4], 0xfffffffe
jmp 0x403c69
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x24]
je 0x403c98
push 0
push 0
push eax
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor ebx, ebx
mov eax, dword [0x40839c]
cmp eax, ebx
je 0x403caa
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
call fcn.00403469
ret
Function at 0x404199
Capabilities:
Get session user name

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebx], edi
mov dword [ebp - 0x218], ecx
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x210], edi
mov dword [ebp - 0x20c], edi
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x214], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20c], eax
lea eax, [ebp - 0x22c]
push eax
mov dword [ebp - 0x210], esi
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
push 9
push edi
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x20c]
push dword [ebp - 0x210]
call fcn.00405f77
cmp eax, edi
jl 0x404330
push dword [ebp - 0x214]
mov esi, 0x100
push dword [0x4083a0]
lea eax, [ebp - 0x20c]
push 0x401cd4
push esi
push eax
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x20c]
push dword [ebp - 0x210]
call fcn.00403e10
add esp, 0x20
cmp eax, edi
jl 0x404330
test dword [0x4083a8], 4
je 0x4042f0
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x208]
push eax
mov dword [ebp - 0x214], 0x101
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x4042bd
push esi
push edi
push edi
push 0x4015c8
push 0x101
lea eax, [ebp - 0x208]
push eax
call fcn.00403cef
cmp eax, edi
jl 0x404330
lea eax, [ebp - 0x208]
push eax
push 0x401ccc
push esi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x20c]
push dword [ebp - 0x210]
call fcn.00403e10
add esp, 0x1c
cmp eax, edi
jl 0x404330
test dword [0x4083a8], 8
je 0x40432c
mov eax, dword [ebp - 0x218]
push dword [eax]
lea eax, [ebp - 0x20c]
push 0x401ccc
push esi
push eax
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x20c]
push dword [ebp - 0x210]
call fcn.00403e10
add esp, 0x1c
cmp eax, edi
jge 0x404337
cmp eax, 0x8007007a
jne 0x40434d
mov ecx, dword [ebp - 0x210]
mov edx, dword [ebp - 0x21c]
mov dword [ebx], ecx
mov ecx, dword [ebp - 0x20c]
mov dword [edx], ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403280
leave
ret 0x10
Function at 0x40499c
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x414], ecx
mov dword [ebp - 0x41c], esi
mov dword [ebp - 0x408], ebx
mov dword [ebp - 0x420], ebx
cmp byte [0x4083a5], bl
jne 0x4049dd
call fcn.00404867
push edi
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0x404]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
mov edi, 0xfde9
push edi
mov dword [ebp - 0x40c], eax
call esi
mov dword [ebp - 0x410], eax
cmp eax, 0x400
jbe 0x404a2e
push eax
call fcn.004052b2
pop ecx
mov dword [ebp - 0x40c], eax
cmp eax, ebx
jne 0x404a2e
mov dword [ebp - 0x408], 0x8007000e
jmp 0x404af8
push ebx
push ebx
push dword [ebp - 0x410]
push dword [ebp - 0x40c]
push dword [ebp + 0xc]
push dword [ebp - 0x41c]
push ebx
push edi
call esi
mov esi, dword [ebp - 0x414]
cmp dword [esi + 0x10], 0xffffffff
je 0x404af8
call fcn.0040395f
test eax, eax
jne 0x404a71
mov dword [ebp - 0x408], 0x80240fff
jmp 0x404af8
push 2
push ebx
push ebx
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, eax
cmp edi, 0xffffffff
jne 0x404a92
call fcn.00406d24
mov dword [ebp - 0x408], eax
jmp 0x404ae8
push ebx
lea eax, [ebp - 0x420]
push eax
push dword [ebp - 0x410]
push dword [ebp - 0x40c]
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404a85
test dword [esi + 0xc], 8
je 0x404ac5
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp dword [0x4087cc], ebx
je 0x404ae8
test byte [esi + 0xc], 0x14
mov eax, 0x200000
je 0x404add
mov eax, 0x2d00000
cmp edi, eax
jbe 0x404ae8
mov ecx, esi
call fcn.00403b72
mov eax, dword [0x40839c]
cmp eax, ebx
je 0x404af8
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [ebp - 0x404]
pop edi
cmp dword [ebp - 0x40c], eax
je 0x404b3b
push dword [ebp - 0x40c]
call fcn.00405300
mov dword [esp], 0x401f50
push 2
lea eax, [ebp - 0x418]
push ebx
push eax
mov dword [ebp - 0x418], ebx
mov dword [ebp - 0x414], 1
call fcn.004047fd
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x408]
pop esi
xor ecx, ebp
pop ebx
call fcn.00403280
leave
ret 8
Function at 0x404b56
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov dword [ebp - 0x418], eax
mov eax, dword [ebp + 0x18]
xor esi, esi
mov dword [ebp - 0x420], eax
mov eax, dword [ebp + 0x1c]
xor ebx, ebx
inc esi
push edi
mov edi, ecx
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x40c], ebx
cmp dword [ebp + 0xc], esi
jne 0x404bac
test byte [edi + 0xc], 0x10
jne 0x404bbe
mov dword [ebp - 0x408], esi
jmp 0x404ce9
cmp dword [ebp + 0xc], 2
jne 0x404bbe
test byte [edi + 0xc], 4
jne 0x404bbe
cmp dword [ebp + 8], 2
ja 0x404ba1
test byte [edi + 0xc], 3
je 0x404d00
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 8]
ja 0x404d00
xor eax, eax
push 0x3fe
mov word [ebp - 0x404], ax
lea eax, [ebp - 0x402]
push ebx
push eax
call sub.msvcrt.dll_memset
and dword [ebp - 0x414], ebx
add esp, 0xc
and dword [ebp - 0x410], 0
mov esi, 0x200
lea ebx, [ebp - 0x404]
push dword [ebp - 0x424]
lea eax, [ebp - 0x414]
push dword [ebp - 0x420]
mov ecx, edi
push dword [ebp - 0x418]
push eax
lea eax, [ebp - 0x408]
push eax
push esi
push ebx
push dword [ebp + 8]
push dword [ebp + 0x10]
call fcn.00404363
mov dword [ebp - 0x408], eax
test eax, eax
jge 0x404c82
cmp eax, 0x8007007a
jne 0x404cb0
and dword [ebp - 0x408], 0
cmp dword [ebp - 0x410], 0
jne 0x404c82
push 2
push 0x800
call fcn.00405356
test eax, eax
je 0x404c82
mov ebx, eax
xor eax, eax
inc eax
mov esi, 0x800
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x410], eax
jmp 0x404c0a
test dword [edi + 0xc], 1
je 0x404c92
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test dword [edi + 0xc], 2
je 0x404cb0
sub esi, dword [ebp - 0x414]
mov ecx, edi
push esi
push ebx
call fcn.0040499c
mov dword [ebp - 0x408], eax
xor esi, esi
inc esi
cmp dword [ebp - 0x40c], 0
je 0x404ce9
push ebx
call fcn.00405300
and dword [ebp - 0x41c], 0
mov dword [esp], 0x401fe0
push 2
lea eax, [ebp - 0x41c]
push 0
push eax
mov dword [ebp - 0x418], esi
call fcn.004047fd
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x408]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403280
leave
ret 0x18
mov dword [ebp - 0x408], esi
jmp 0x404cb3

Function at 0x4058a4
Capabilities:
Get token membership

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 4], edi
cmp esi, edi
je 0x4058f1
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp + 8]
push eax
push 8
push esi
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x405904
cmp dword [ebp + 8], 2
je 0x4058ee
lea eax, [ebp - 4]
push eax
push 2
push 1
push edi
push 8
push esi
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x4058f1
jmp 0x405904
mov dword [ebp - 4], esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x40590b
call fcn.00406d24
mov edi, eax
cmp dword [ebp - 4], esi
je 0x405919
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
leave
ret 0xc
Function at 0x405b5e
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ebx, ebx
push edi
mov edi, dword [ebp + 8]
inc ebx
jmp 0x405bac
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405b89
cmp eax, 5
jne 0x405bc8
mov ecx, dword [ebp + 0x10]
inc ecx
cmp ebx, ecx
jae 0x405c64
push dword [ebp + 0x14]
call fcn.00405b29
mov dword [ebp - 4], eax
cmp eax, 0x800704c7
je 0x405c75
inc ebx
push edi
call esi
cmp eax, 0xffffffff
je 0x405b79
test al, 0x10
jne 0x405c75
mov dword [ebp - 4], 0x80070057
jmp 0x405c75
cmp eax, 3
je 0x405bd6
cmp eax, 2
jne 0x405c64
mov eax, dword [ebp + 0xc]
lea esi, [edi + eax*2 - 2]
jmp 0x405bec
cmp word [esi], 0x5c
je 0x405bf0
test eax, eax
jbe 0x405bf2
dec esi
dec esi
dec eax
cmp esi, edi
ja 0x405bdf
test eax, eax
je 0x405bbc
cmp esi, edi
je 0x405bbc
cmp eax, 2
jbe 0x405c1c
push dword [ebp + 0x14]
xor ecx, ecx
push dword [ebp + 0x10]
mov word [esi], cx
push eax
push edi
call fcn.00405b5e
push 0x5c
pop ecx
mov dword [ebp - 4], eax
mov word [esi], cx
test eax, eax
jl 0x405c75
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor ebx, ebx
inc ebx
jmp 0x405c52
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405c37
cmp eax, 5
jne 0x405c5d
mov ecx, dword [ebp + 0x10]
inc ecx
cmp ebx, ecx
jae 0x405c64
push dword [ebp + 0x14]
call fcn.00405b29
mov dword [ebp - 4], eax
cmp eax, 0x800704c7
je 0x405c75
inc ebx
push 0
push edi
call esi
test eax, eax
je 0x405c27
jmp 0x405c75
cmp eax, 0xb7
je 0x405c75
test eax, eax
jle 0x405c72
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x405c84
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor edi, edi
xor ebx, ebx
cmp dword [ebp + 8], edi
je 0x405d94
push dword [ebp + 8]
call fcn.00405ae4
test eax, eax
je 0x405d94
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 4], edi
push edi
jmp 0x405cee
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405cc6
cmp eax, 5
jne 0x405cfc
mov ecx, dword [ebp + 0xc]
inc ecx
cmp dword [ebp - 4], ecx
jae 0x405d84
push dword [ebp + 0x10]
call fcn.00405b29
mov ebx, eax
cmp ebx, 0x800704c7
je 0x405d99
inc dword [ebp - 4]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x405cb6
jmp 0x405d99
cmp eax, 0xb7
je 0x405d99
cmp eax, 3
jne 0x405d84
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x405d12
sub eax, edx
sar eax, 1
mov esi, eax
lea eax, [esi + esi + 2]
push eax
call fcn.004052b2
mov edi, eax
pop ecx
test edi, edi
jne 0x405d3a
mov ebx, 0x8007000e
jmp 0x405d99
push dword [ebp + 8]
lea eax, [esi + 1]
push eax
push edi
call fcn.00403cb5
movzx ebx, word [edi + 6]
xor eax, eax
push edi
mov word [edi + 6], ax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x405d6f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x405d6f
mov ebx, 0x80070003
jmp 0x405d99
push dword [ebp + 0x10]
mov word [edi + 6], bx
push dword [ebp + 0xc]
push esi
push edi
call fcn.00405b5e
mov ebx, eax
jmp 0x405d99
test eax, eax
jle 0x405d80
and eax, 0xffff
or eax, 0x80070000
jmp 0x405d80
mov ebx, 0x80070057
push edi
call fcn.00405300
pop ecx
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0xc

Function at 0x40608b
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
push edi
push dword [ebp + 0x10]
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [eax + esi + 1]
cmp ecx, dword [ebp + 0xc]
jb 0x4060bd
mov ebx, 0x8007007a
jmp 0x4060e7
test eax, eax
jne 0x4060ca
call fcn.00406d24
mov ebx, eax
jmp 0x4060e7
push 0x5c
pop ecx
lea eax, [edi + eax*2]
mov word [eax], cx
lea ecx, [esi + esi + 2]
push ecx
push dword [ebp + 0x10]
add eax, 2
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 0xc
Function at 0x4068b1
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], esi
cmp edi, esi
jne 0x4068ca
cmp ebx, esi
jne 0x4068ce
cmp ebx, esi
jge 0x4068ff
mov dword [ebp - 4], 0x80070057
test edi, edi
je 0x4068e2
test ebx, ebx
jle 0x4068e2
xor eax, eax
mov word [edi], ax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4068eb
mov dword [eax], esi
mov eax, dword [ebp + 0x18]
pop esi
test eax, eax
je 0x4068f8
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
leave
ret 0x14
lea eax, [ebx + ebx]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp + 0x10]
push eax
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [ebp - 8]
test eax, eax
je 0x406933
jle 0x40692e
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
jmp 0x406942
test edi, edi
jne 0x406947
test ecx, ecx
jbe 0x406947
mov dword [ebp - 4], 0x800700ea
cmp dword [ebp - 4], esi
jl 0x40696f
mov edx, dword [ebp + 8]
xor eax, eax
cmp dword [ebp + 0x10], 2
sete al
mov dword [ebp - 0xc], eax
cmp dword [ebp + 0x10], edx
je 0x406972
cmp edx, 1
jne 0x406966
cmp dword [ebp + 0x10], 2
je 0x406972
mov dword [ebp - 4], 0x8007065d
jmp 0x406972
mov edx, dword [ebp + 8]
cmp dword [ebp - 4], 0x800700ea
jne 0x40698f
xor eax, eax
shr ecx, 1
cmp edx, 7
sete al
inc eax
add ecx, eax
mov esi, ecx
jmp 0x4068d5
cmp dword [ebp - 4], esi
jl 0x4068d5
shr ecx, 1
mov esi, ecx
je 0x4069a6
cmp word [edi + esi*2 - 2], 0
je 0x4069a7
inc esi
cmp edx, 7
jne 0x4069ba
cmp esi, 2
jl 0x4069b9
cmp word [edi + esi*2 - 4], 0
je 0x4069ba
inc esi
cmp esi, ebx
jle 0x4069ca
mov dword [ebp - 4], 0x800700ea
jmp 0x4068d5
dec esi
xor ecx, ecx
lea eax, [edi + esi*2]
mov word [eax], cx
cmp edx, 7
jne 0x4068e2
mov word [eax - 2], cx
jmp 0x4068e2