joyce8/EMBER2024-capa huggingface dataset:
Function at 0x11a2422
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov eax, ecx
mov ecx, dword [eax + 4]
mov ecx, dword [ecx + 0x20]
push esi
mov esi, dword [eax]
mov ebx, dword [esi + 0x20]
push edi
mov edi, dword [esi + 0x6c]
imul edi, dword [esi + 0x60]
add edi, ebx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], edi
cmp ebx, edi
jae 0x11a2531
mov eax, 0xf0
mov edx, dword [esi + 0x60]
mov esi, dword [esi + 0x68]
add esi, ebx
add edx, ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x20], esi
cmp ebx, esi
jae 0x11a2512
movzx ecx, byte [ebx + 1]
movzx esi, byte [ebx]
movzx edi, byte [edx + 1]
movzx edx, byte [edx]
mov dword [ebp - 4], ecx
mov ebx, edx
and ebx, eax
mov ecx, esi
and ecx, eax
add ecx, ebx
mov ebx, dword [ebp - 4]
and ebx, eax
add ecx, ebx
mov dword [ebp - 0x1c], edx
and edx, 0xf
mov ebx, edi
and ebx, eax
lea ebx, [ecx + ebx + 0x20]
mov ecx, esi
and ecx, 0xf
add ecx, edx
mov edx, dword [ebp - 4]
and edx, 0xf
add ecx, edx
shr ebx, 2
mov edx, edi
and edx, 0xf
lea ecx, [ecx + edx + 2]
shr ecx, 2
xor bl, cl
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
and ecx, eax
and esi, eax
add esi, ecx
mov ecx, dword [ebp - 4]
and ecx, eax
add esi, ecx
and edi, eax
and bl, 0xf
lea ecx, [esi + edi + 0x20]
shr ecx, 2
xor bl, cl
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], bl
mov ebx, dword [ebp - 0xc]
inc ebx
inc ebx
inc edx
inc edx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], edx
cmp ebx, dword [ebp - 0x20]
jb 0x11a247a
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
mov esi, dword [edx + 4]
add ecx, dword [esi + 0x60]
mov esi, dword [edx]
mov edx, dword [esi + 0x60]
lea ebx, [ebx + edx*2]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ebx
cmp ebx, edi
jb 0x11a245c
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret

Function at 0x11a5bd9
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
mov ebx, ecx
xor esi, esi
push edi
cmp dword [ebx], esi
je 0x11a5bee
call fcn.011a5bb3
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp dword [ebp + 0x14], esi
jne 0x11a5bff
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp dword [ebp + 0x10], esi
je 0x11a5c14
push 2
push dword [ebp + 0xc]
push dword [ebp + 8]
call edi
mov esi, eax
test esi, esi
jne 0x11a5c24
push 0xa
push dword [ebp + 0xc]
push dword [ebp + 8]
call edi
mov esi, eax
test esi, esi
je 0x11a5c53
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebx + 8], eax
test eax, eax
je 0x11a5c53
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebx], eax
test eax, eax
je 0x11a5c53
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebx + 4], eax
test eax, eax
jne 0x11a5c60
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 0x88760b59
jmp 0x11a5c62
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x402cb8
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.00404dfd
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.004050b2
mov esi, eax
cmp esi, edi
jl 0x402e27
push ebx
xor ebx, ebx
inc ebx
push ebx
lea eax, [ebp - 0x218]
push eax
push ebx
push dword [ebp - 0x21c]
call fcn.00405359
mov dword [ebp - 0x210], eax
lea eax, [ebp - 0x228]
push eax
call fcn.00404e4f
mov esi, eax
cmp esi, edi
jl 0x402e26
cmp dword [ebp - 0x228], edi
je 0x402e90
lea eax, [ebp - 0x224]
push eax
call fcn.00404eb6
mov esi, eax
cmp esi, edi
jl 0x402e26
push 0x4013f0
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.00405f91
mov esi, eax
cmp esi, edi
jl 0x402e1b
cmp dword [ebp - 0x210], ebx
jne 0x402da1
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0x218]
call fcn.004050b2
mov esi, eax
cmp esi, edi
jl 0x402e1b
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 0x402e78
call fcn.00404e35
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.004047ab
add esp, 0x14
push dword [ebp - 0x224]
call fcn.00404f3d
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.004047ab
push dword [ebp - 0x21c]
call fcn.004052cb
push dword [ebp - 0x220]
call fcn.004052cb
mov ecx, dword [ebp - 4]
add esp, 0x1c
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00403200
leave
ret 0x10
push dword [ebp - 0x238]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [ebp - 0x234]
call ebx
jmp 0x402e1b
mov esi, 0xd79
cmp dword [ebp - 0x210], ebx
jne 0x402ecf
push 0x401244
push dword [ebp - 0x218]
call fcn.004051c8
test eax, eax
jne 0x402eb6
add esi, 0xfffffffd
jmp 0x402ecf
push 0x40124c
push dword [ebp - 0x218]
call fcn.004051c8
test eax, eax
jne 0x402ecf
mov esi, 0xd77
push ebx
push esi
push edi
call fcn.00402c59
call fcn.004050a5
mov esi, eax
jmp 0x402e26
Function at 0x4031f1
Capabilities:
Terminate process

Disassembly:
push 0x5c
push 0x406fc0
call fcn.004033a4
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 0x402fac
cmp eax, esi
jne 0x402f9f
xor esi, esi
inc esi
mov dword [ebp - 0x20], esi
jmp 0x402faf
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402f86
xor esi, esi
inc esi
mov eax, dword [0x408ac8]
cmp eax, esi
jne 0x402fc2
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x402ff1
mov eax, dword [0x408ac8]
test eax, eax
jne 0x402feb
mov dword [0x408ac8], esi
push 0x4011e0
push 0x4011d4
call fcn.00402ee8
pop ecx
pop ecx
test eax, eax
je 0x402ff1
jmp 0x403115
mov dword [0x408060], esi
mov eax, dword [0x408ac8]
cmp eax, esi
jne 0x403015
push 0x4011d0
push 0x4011c4
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x408ac8], 2
cmp dword [ebp - 0x20], ebx
jne 0x403022
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x408ad0], ebx
je 0x403043
push 0x408ad0
call fcn.00403319
pop ecx
test eax, eax
je 0x403043
push ebx
push 2
push ebx
call dword [0x408ad0]
mov eax, dword [sym.imp.msvcrt.dll__wcmdln]
cmp dword [eax], ebx
je 0x403115
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
movzx ecx, word [eax]
cmp cx, 0x20
ja 0x4030ad
cmp cx, bx
je 0x403068
cmp dword [ebp - 0x1c], ebx
jne 0x4030ad
movzx ecx, word [eax]
cmp cx, bx
je 0x40307d
cmp cx, 0x20
ja 0x40307d
inc eax
inc eax
mov dword [ebp - 0x24], eax
jmp 0x403068
test byte [ebp - 0x40], 1
je 0x403089
movzx ecx, word [ebp - 0x3c]
jmp 0x40308c
push 0xa
pop ecx
push ecx
push eax
push ebx
push 0x400000
call main
mov dword [0x40805c], eax
cmp dword [0x408050], ebx
jne 0x4030f2
push eax
call dword [sym.imp.msvcrt.dll_exit]
cmp cx, 0x22
jne 0x4030be
xor ecx, ecx
cmp dword [ebp - 0x1c], ebx
sete cl
mov dword [ebp - 0x1c], ecx
inc eax
inc eax
jmp 0x403052
cmp dword [0x408060], ebx
jne 0x403100
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x40805c]
jmp 0x403121
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.004033e9
ret
call fcn.00403597
jmp 0x402f49
Function at 0x403b20
Capabilities:
Get file size

Disassembly:
push 0x20
push 0x407048
call fcn.004033a4
mov edi, ecx
mov dword [ebp - 0x28], edi
cmp dword [edi + 0x10], 0xffffffff
je 0x403c58
call fcn.004038df
test eax, eax
je 0x403c58
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 0x403b67
mov esi, 0x2d00000
cmp eax, 0xffffffff
je 0x403c48
cmp eax, esi
jbe 0x403c48
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 0x403c48
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 0x403c1e
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 0x403bcf
mov edx, dword [ebp - 0x1c]
inc dword [ebp - 0x1c]
cmp byte [edx], 0xa
jne 0x403bbc
cmp dword [ebp - 0x1c], eax
jne 0x403bd4
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 0x403c17
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 0x403c46
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 0x403c58
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
call fcn.004033e9
ret
Function at 0x404147
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.00405e7d
cmp eax, edi
jl 0x4042de
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.00403dbe
add esp, 0x20
cmp eax, edi
jl 0x4042de
test dword [0x4083a8], 4
je 0x40429e
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 0x40426b
push esi
push edi
push edi
push 0x4015c8
push 0x101
lea eax, [ebp - 0x208]
push eax
call fcn.00403c9d
cmp eax, edi
jl 0x4042de
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.00403dbe
add esp, 0x1c
cmp eax, edi
jl 0x4042de
test dword [0x4083a8], 8
je 0x4042da
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.00403dbe
add esp, 0x1c
cmp eax, edi
jge 0x4042e5
cmp eax, 0x8007007a
jne 0x4042fb
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.00403200
leave
ret 0x10
Function at 0x40494a
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 0x40498b
call fcn.00404815
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 0x4049dc
push eax
call fcn.0040527d
pop ecx
mov dword [ebp - 0x40c], eax
cmp eax, ebx
jne 0x4049dc
mov dword [ebp - 0x408], 0x8007000e
jmp 0x404aa6
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 0x404aa6
call fcn.004038df
test eax, eax
jne 0x404a1f
mov dword [ebp - 0x408], 0x80240fff
jmp 0x404aa6
push 2
push ebx
push ebx
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, eax
cmp edi, 0xffffffff
jne 0x404a40
call fcn.00404e35
mov dword [ebp - 0x408], eax
jmp 0x404a96
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 0x404a33
test dword [esi + 0xc], 8
je 0x404a73
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp dword [0x4087cc], ebx
je 0x404a96
test byte [esi + 0xc], 0x14
mov eax, 0x200000
je 0x404a8b
mov eax, 0x2d00000
cmp edi, eax
jbe 0x404a96
mov ecx, esi
call fcn.00403b20
mov eax, dword [0x40839c]
cmp eax, ebx
je 0x404aa6
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [ebp - 0x404]
pop edi
cmp dword [ebp - 0x40c], eax
je 0x404ae9
push dword [ebp - 0x40c]
call fcn.004052cb
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.004047ab
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x408]
pop esi
xor ecx, ebp
pop ebx
call fcn.00403200
leave
ret 8
Function at 0x404b04
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 0x404b5a
test byte [edi + 0xc], 0x10
jne 0x404b6c
mov dword [ebp - 0x408], esi
jmp 0x404c97
cmp dword [ebp + 0xc], 2
jne 0x404b6c
test byte [edi + 0xc], 4
jne 0x404b6c
cmp dword [ebp + 8], 2
ja 0x404b4f
test byte [edi + 0xc], 3
je 0x404cae
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 8]
ja 0x404cae
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.00404311
mov dword [ebp - 0x408], eax
test eax, eax
jge 0x404c30
cmp eax, 0x8007007a
jne 0x404c5e
and dword [ebp - 0x408], 0
cmp dword [ebp - 0x410], 0
jne 0x404c30
push 2
push 0x800
call fcn.00405321
test eax, eax
je 0x404c30
mov ebx, eax
xor eax, eax
inc eax
mov esi, 0x800
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x410], eax
jmp 0x404bb8
test dword [edi + 0xc], 1
je 0x404c40
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test dword [edi + 0xc], 2
je 0x404c5e
sub esi, dword [ebp - 0x414]
mov ecx, edi
push esi
push ebx
call fcn.0040494a
mov dword [ebp - 0x408], eax
xor esi, esi
inc esi
cmp dword [ebp - 0x40c], 0
je 0x404c97
push ebx
call fcn.004052cb
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.004047ab
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x408]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403200
leave
ret 0x18
mov dword [ebp - 0x408], esi
jmp 0x404c61

Function at 0x4057aa
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 0x4057f7
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 0x40580a
cmp dword [ebp + 8], 2
je 0x4057f4
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 0x4057f7
jmp 0x40580a
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 0x405811
call fcn.00404e35
mov edi, eax
cmp dword [ebp - 4], esi
je 0x40581f
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
leave
ret 0xc
Function at 0x405a64
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 0x405ab2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405a8f
cmp eax, 5
jne 0x405ace
mov ecx, dword [ebp + 0x10]
inc ecx
cmp ebx, ecx
jae 0x405b6a
push dword [ebp + 0x14]
call fcn.00405a2f
mov dword [ebp - 4], eax
cmp eax, 0x800704c7
je 0x405b7b
inc ebx
push edi
call esi
cmp eax, 0xffffffff
je 0x405a7f
test al, 0x10
jne 0x405b7b
mov dword [ebp - 4], 0x80070057
jmp 0x405b7b
cmp eax, 3
je 0x405adc
cmp eax, 2
jne 0x405b6a
mov eax, dword [ebp + 0xc]
lea esi, [edi + eax*2 - 2]
jmp 0x405af2
cmp word [esi], 0x5c
je 0x405af6
test eax, eax
jbe 0x405af8
dec esi
dec esi
dec eax
cmp esi, edi
ja 0x405ae5
test eax, eax
je 0x405ac2
cmp esi, edi
je 0x405ac2
cmp eax, 2
jbe 0x405b22
push dword [ebp + 0x14]
xor ecx, ecx
push dword [ebp + 0x10]
mov word [esi], cx
push eax
push edi
call fcn.00405a64
push 0x5c
pop ecx
mov dword [ebp - 4], eax
mov word [esi], cx
test eax, eax
jl 0x405b7b
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor ebx, ebx
inc ebx
jmp 0x405b58
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405b3d
cmp eax, 5
jne 0x405b63
mov ecx, dword [ebp + 0x10]
inc ecx
cmp ebx, ecx
jae 0x405b6a
push dword [ebp + 0x14]
call fcn.00405a2f
mov dword [ebp - 4], eax
cmp eax, 0x800704c7
je 0x405b7b
inc ebx
push 0
push edi
call esi
test eax, eax
je 0x405b2d
jmp 0x405b7b
cmp eax, 0xb7
je 0x405b7b
test eax, eax
jle 0x405b78
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 0x405b8a
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 0x405c9a
push dword [ebp + 8]
call fcn.004059ea
test eax, eax
je 0x405c9a
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 4], edi
push edi
jmp 0x405bf4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405bcc
cmp eax, 5
jne 0x405c02
mov ecx, dword [ebp + 0xc]
inc ecx
cmp dword [ebp - 4], ecx
jae 0x405c8a
push dword [ebp + 0x10]
call fcn.00405a2f
mov ebx, eax
cmp ebx, 0x800704c7
je 0x405c9f
inc dword [ebp - 4]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x405bbc
jmp 0x405c9f
cmp eax, 0xb7
je 0x405c9f
cmp eax, 3
jne 0x405c8a
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x405c18
sub eax, edx
sar eax, 1
mov esi, eax
lea eax, [esi + esi + 2]
push eax
call fcn.0040527d
mov edi, eax
pop ecx
test edi, edi
jne 0x405c40
mov ebx, 0x8007000e
jmp 0x405c9f
push dword [ebp + 8]
lea eax, [esi + 1]
push eax
push edi
call fcn.00403c63
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 0x405c75
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x405c75
mov ebx, 0x80070003
jmp 0x405c9f
push dword [ebp + 0x10]
mov word [edi + 6], bx
push dword [ebp + 0xc]
push esi
push edi
call fcn.00405a64
mov ebx, eax
jmp 0x405c9f
test eax, eax
jle 0x405c86
and eax, 0xffff
or eax, 0x80070000
jmp 0x405c86
mov ebx, 0x80070057
push edi
call fcn.004052cb
pop ecx
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0xc

Function at 0x405f91
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 0x405fc3
mov ebx, 0x8007007a
jmp 0x405fed
test eax, eax
jne 0x405fd0
call fcn.00404e35
mov ebx, eax
jmp 0x405fed
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 0x40684e
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 0x406867
cmp ebx, esi
jne 0x40686b
cmp ebx, esi
jge 0x40689c
mov dword [ebp - 4], 0x80070057
test edi, edi
je 0x40687f
test ebx, ebx
jle 0x40687f
xor eax, eax
mov word [edi], ax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x406888
mov dword [eax], esi
mov eax, dword [ebp + 0x18]
pop esi
test eax, eax
je 0x406895
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 0x4068d0
jle 0x4068cb
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
jmp 0x4068df
test edi, edi
jne 0x4068e4
test ecx, ecx
jbe 0x4068e4
mov dword [ebp - 4], 0x800700ea
cmp dword [ebp - 4], esi
jl 0x40690c
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 0x40690f
cmp edx, 1
jne 0x406903
cmp dword [ebp + 0x10], 2
je 0x40690f
mov dword [ebp - 4], 0x8007065d
jmp 0x40690f
mov edx, dword [ebp + 8]
cmp dword [ebp - 4], 0x800700ea
jne 0x40692c
xor eax, eax
shr ecx, 1
cmp edx, 7
sete al
inc eax
add ecx, eax
mov esi, ecx
jmp 0x406872
cmp dword [ebp - 4], esi
jl 0x406872
shr ecx, 1
mov esi, ecx
je 0x406943
cmp word [edi + esi*2 - 2], 0
je 0x406944
inc esi
cmp edx, 7
jne 0x406957
cmp esi, 2
jl 0x406956
cmp word [edi + esi*2 - 4], 0
je 0x406957
inc esi
cmp esi, ebx
jle 0x406967
mov dword [ebp - 4], 0x800700ea
jmp 0x406872
dec esi
xor ecx, ecx
lea eax, [edi + esi*2]
mov word [eax], cx
cmp edx, 7
jne 0x40687f
mov word [eax - 2], cx
jmp 0x40687f