joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4aa710
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x18]
add ecx, 0x24
call fcn.0040d7e0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
and eax, 1
je 0x4aa781
push 1
push 0
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x18]
mov eax, dword [edx + 0xa0]
call eax
test eax, eax
jne 0x4aa77f
push str.Warning:_File_save_with_new_name_failed._n
push 0
mov ecx, 0x5c97d8
call fcn.0040d7e0
push eax
push 0x110
push 0x57c184
lea ecx, [ebp - 0xc]
call fcn.00401100
push eax
call fcn.00429920
add esp, 0x10
xor eax, eax
jmp 0x4aa7d9
jmp 0x4aa7d4
push 1
mov ecx, dword [ebp - 0x18]
add ecx, 0x24
call fcn.0040d7e0
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x18]
mov eax, dword [edx + 0xa0]
call eax
test eax, eax
jne 0x4aa7d4
push str.Warning:_File_save_failed._n
push 0
mov ecx, 0x5c97d8
call fcn.0040d7e0
push eax
push 0x118
push 0x57c1e8
lea ecx, [ebp - 0x14]
call fcn.00401100
push eax
call fcn.00429920
add esp, 0x10
xor eax, eax
jmp 0x4aa7d9
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x4b1830
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51d173
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x5c5c30]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24], 0
push 0
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
shl eax, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp + 0x10], 0
je 0x4b1880
mov ecx, dword [ebp - 0x14]
or ecx, 0x1000000
mov dword [ebp - 0x14], ecx
lea ecx, [ebp - 0x1c]
call fcn.0040ac00
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0x40
mov edx, dword [ebp - 0x18]
shl edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042cf80
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x18]
add ecx, 1
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.USER32.dll_GetKeyNameTextW]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.00426f40
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp - 0x18]
je 0x4b1896
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 8]
call fcn.0040ac50
mov ecx, dword [ebp - 0x24]
or ecx, 1
mov dword [ebp - 0x24], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.0040ad40
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
Function at 0x4d1610
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x5c5c30]
jne 0x4d161a
repz ret
jmp fcn.004e5e40
Function at 0x4d8ef0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
xor eax, eax
cmp dword [ebp + 8], 0
setne al
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4d8f26
push str._path___NULL_
push 0
push 0x50
push str.f:dd_vctoolscrt_bld_self_x86crt_src_access.c
push 2
call fcn.004d4350
add esp, 0x14
cmp eax, 1
jne 0x4d8f26
int3
cmp dword [ebp - 8], 0
jne 0x4d8f67
call fcn.004dc140
mov dword [eax], 0
call fcn.004dc110
mov dword [eax], 0x16
push 0
push 0x50
push str.f:dd_vctoolscrt_bld_self_x86crt_src_access.c
push str._waccess_s
push str._path___NULL_
call fcn.004d13a0
add esp, 0x14
mov eax, 0x16
jmp 0x4d903f
mov edx, dword [ebp + 0xc]
and edx, 0xfffffff9
neg edx
sbb edx, edx
add edx, 1
mov dword [ebp - 0xc], edx
jne 0x4d8f97
push str.__amode___6____0_
push 0
push 0x51
push str.f:dd_vctoolscrt_bld_self_x86crt_src_access.c
push 2
call fcn.004d4350
add esp, 0x14
cmp eax, 1
jne 0x4d8f97
int3
cmp dword [ebp - 0xc], 0
jne 0x4d8fd5
call fcn.004dc140
mov dword [eax], 0
call fcn.004dc110
mov dword [eax], 0x16
push 0
push 0x51
push str.f:dd_vctoolscrt_bld_self_x86crt_src_access.c
push str._waccess_s
push str.__amode___6____0_
call fcn.004d13a0
add esp, 0x14
mov eax, 0x16
jmp 0x4d903f
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x4d9000
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004dc060
add esp, 4
call fcn.004dc110
mov eax, dword [eax]
jmp 0x4d903f
mov edx, dword [ebp - 4]
and edx, 0x10
je 0x4d900c
xor eax, eax
jmp 0x4d903f
mov eax, dword [ebp - 4]
and eax, 1
je 0x4d903d
mov ecx, dword [ebp + 0xc]
and ecx, 2
je 0x4d903d
call fcn.004dc140
mov dword [eax], 5
call fcn.004dc110
mov dword [eax], 0xd
call fcn.004dc110
mov eax, dword [eax]
jmp 0x4d903f
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x4e47a0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x5c5ebc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4e47db
mov ecx, dword [0x5c9f38]
push ecx
call fcn.004e46c0
add esp, 4
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
push edx
mov eax, dword [0x5c5ebc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x402cf8
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.00404f2f
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.004051e1
mov esi, eax
cmp esi, edi
jl 0x402e67
push ebx
xor ebx, ebx
inc ebx
push ebx
lea eax, [ebp - 0x218]
push eax
push ebx
push dword [ebp - 0x21c]
call fcn.00405488
mov dword [ebp - 0x210], eax
lea eax, [ebp - 0x228]
push eax
call fcn.00404f81
mov esi, eax
cmp esi, edi
jl 0x402e66
cmp dword [ebp - 0x228], edi
je 0x402ed0
lea eax, [ebp - 0x224]
push eax
call fcn.00404fe8
mov esi, eax
cmp esi, edi
jl 0x402e66
push 0x4013f0
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.004060c0
mov esi, eax
cmp esi, edi
jl 0x402e5b
cmp dword [ebp - 0x210], ebx
jne 0x402de1
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0x218]
call fcn.004051e1
mov esi, eax
cmp esi, edi
jl 0x402e5b
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 0x402eb8
call fcn.00404f67
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.004048dd
add esp, 0x14
push dword [ebp - 0x224]
call fcn.0040506f
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.004048dd
push dword [ebp - 0x21c]
call fcn.004053fa
push dword [ebp - 0x220]
call fcn.004053fa
mov ecx, dword [ebp - 4]
add esp, 0x1c
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00403240
leave
ret 0x10
push dword [ebp - 0x238]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [ebp - 0x234]
call ebx
jmp 0x402e5b
mov esi, 0xd79
cmp dword [ebp - 0x210], ebx
jne 0x402f0f
push 0x401244
push dword [ebp - 0x218]
call fcn.004052f7
test eax, eax
jne 0x402ef6
add esi, 0xfffffffd
jmp 0x402f0f
push 0x40124c
push dword [ebp - 0x218]
call fcn.004052f7
test eax, eax
jne 0x402f0f
mov esi, 0xd77
push ebx
push esi
push edi
call fcn.00402c99
call fcn.004051d4
mov esi, eax
jmp 0x402e66
Function at 0x403231
Capabilities:
Terminate process

Disassembly:
push 0x5c
push 0x407000
call fcn.004033e4
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 0x402fec
cmp eax, esi
jne 0x402fdf
xor esi, esi
inc esi
mov dword [ebp - 0x20], esi
jmp 0x402fef
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402fc6
xor esi, esi
inc esi
mov eax, dword [0x408ac8]
cmp eax, esi
jne 0x403002
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x403031
mov eax, dword [0x408ac8]
test eax, eax
jne 0x40302b
mov dword [0x408ac8], esi
push 0x4011e0
push 0x4011d4
call fcn.00402f28
pop ecx
pop ecx
test eax, eax
je 0x403031
jmp 0x403155
mov dword [0x408060], esi
mov eax, dword [0x408ac8]
cmp eax, esi
jne 0x403055
push 0x4011d0
push 0x4011c4
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x408ac8], 2
cmp dword [ebp - 0x20], ebx
jne 0x403062
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x408ad0], ebx
je 0x403083
push 0x408ad0
call fcn.00403359
pop ecx
test eax, eax
je 0x403083
push ebx
push 2
push ebx
call dword [0x408ad0]
mov eax, dword [sym.imp.msvcrt.dll__wcmdln]
cmp dword [eax], ebx
je 0x403155
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
movzx ecx, word [eax]
cmp cx, 0x20
ja 0x4030ed
cmp cx, bx
je 0x4030a8
cmp dword [ebp - 0x1c], ebx
jne 0x4030ed
movzx ecx, word [eax]
cmp cx, bx
je 0x4030bd
cmp cx, 0x20
ja 0x4030bd
inc eax
inc eax
mov dword [ebp - 0x24], eax
jmp 0x4030a8
test byte [ebp - 0x40], 1
je 0x4030c9
movzx ecx, word [ebp - 0x3c]
jmp 0x4030cc
push 0xa
pop ecx
push ecx
push eax
push ebx
push 0x400000
call main
mov dword [0x40805c], eax
cmp dword [0x408050], ebx
jne 0x403132
push eax
call dword [sym.imp.msvcrt.dll_exit]
cmp cx, 0x22
jne 0x4030fe
xor ecx, ecx
cmp dword [ebp - 0x1c], ebx
sete cl
mov dword [ebp - 0x1c], ecx
inc eax
inc eax
jmp 0x403092
cmp dword [0x408060], ebx
jne 0x403140
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x40805c]
jmp 0x403161
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.00403429
ret
call fcn.004035d7
jmp 0x402f89
Function at 0x403c52
Capabilities:
Get file size

Disassembly:
push 0x20
push 0x407088
call fcn.004033e4
mov edi, ecx
mov dword [ebp - 0x28], edi
cmp dword [edi + 0x10], 0xffffffff
je 0x403d8a
call fcn.0040391f
test eax, eax
je 0x403d8a
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 0x403c99
mov esi, 0x2d00000
cmp eax, 0xffffffff
je 0x403d7a
cmp eax, esi
jbe 0x403d7a
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 0x403d7a
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 0x403d50
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 0x403d01
mov edx, dword [ebp - 0x1c]
inc dword [ebp - 0x1c]
cmp byte [edx], 0xa
jne 0x403cee
cmp dword [ebp - 0x1c], eax
jne 0x403d06
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 0x403d49
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 0x403d78
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 0x403d8a
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
call fcn.00403429
ret
Function at 0x404279
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.00405fac
cmp eax, edi
jl 0x404410
push dword [ebp - 0x214]
mov esi, 0x100
push dword [0x4083a0]
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.00403ef0
add esp, 0x20
cmp eax, edi
jl 0x404410
test dword [0x4083a8], 4
je 0x4043d0
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 0x40439d
push esi
push edi
push edi
push 0x4015c8
push 0x101
lea eax, [ebp - 0x208]
push eax
call fcn.00403dcf
cmp eax, edi
jl 0x404410
lea eax, [ebp - 0x208]
push eax
push 0x401cc4
push esi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x20c]
push dword [ebp - 0x210]
call fcn.00403ef0
add esp, 0x1c
cmp eax, edi
jl 0x404410
test dword [0x4083a8], 8
je 0x40440c
mov eax, dword [ebp - 0x218]
push dword [eax]
lea eax, [ebp - 0x20c]
push 0x401cc4
push esi
push eax
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x20c]
push dword [ebp - 0x210]
call fcn.00403ef0
add esp, 0x1c
cmp eax, edi
jge 0x404417
cmp eax, 0x8007007a
jne 0x40442d
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.00403240
leave
ret 0x10
Function at 0x404a7c
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 0x404abd
call fcn.00404947
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 0x404b0e
push eax
call fcn.004053ac
pop ecx
mov dword [ebp - 0x40c], eax
cmp eax, ebx
jne 0x404b0e
mov dword [ebp - 0x408], 0x8007000e
jmp 0x404bd8
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 0x404bd8
call fcn.0040391f
test eax, eax
jne 0x404b51
mov dword [ebp - 0x408], 0x80240fff
jmp 0x404bd8
push 2
push ebx
push ebx
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, eax
cmp edi, 0xffffffff
jne 0x404b72
call fcn.00404f67
mov dword [ebp - 0x408], eax
jmp 0x404bc8
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 0x404b65
test dword [esi + 0xc], 8
je 0x404ba5
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp dword [0x4087cc], ebx
je 0x404bc8
test byte [esi + 0xc], 0x14
mov eax, 0x200000
je 0x404bbd
mov eax, 0x2d00000
cmp edi, eax
jbe 0x404bc8
mov ecx, esi
call fcn.00403c52
mov eax, dword [0x40839c]
cmp eax, ebx
je 0x404bd8
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [ebp - 0x404]
pop edi
cmp dword [ebp - 0x40c], eax
je 0x404c1b
push dword [ebp - 0x40c]
call fcn.004053fa
mov dword [esp], 0x401f48
push 2
lea eax, [ebp - 0x418]
push ebx
push eax
mov dword [ebp - 0x418], ebx
mov dword [ebp - 0x414], 1
call fcn.004048dd
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x408]
pop esi
xor ecx, ebp
pop ebx
call fcn.00403240
leave
ret 8
Function at 0x404c36
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 0x404c8c
test byte [edi + 0xc], 0x10
jne 0x404c9e
mov dword [ebp - 0x408], esi
jmp 0x404dc9
cmp dword [ebp + 0xc], 2
jne 0x404c9e
test byte [edi + 0xc], 4
jne 0x404c9e
cmp dword [ebp + 8], 2
ja 0x404c81
test byte [edi + 0xc], 3
je 0x404de0
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 8]
ja 0x404de0
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.00404443
mov dword [ebp - 0x408], eax
test eax, eax
jge 0x404d62
cmp eax, 0x8007007a
jne 0x404d90
and dword [ebp - 0x408], 0
cmp dword [ebp - 0x410], 0
jne 0x404d62
push 2
push 0x800
call fcn.00405450
test eax, eax
je 0x404d62
mov ebx, eax
xor eax, eax
inc eax
mov esi, 0x800
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x410], eax
jmp 0x404cea
test dword [edi + 0xc], 1
je 0x404d72
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test dword [edi + 0xc], 2
je 0x404d90
sub esi, dword [ebp - 0x414]
mov ecx, edi
push esi
push ebx
call fcn.00404a7c
mov dword [ebp - 0x408], eax
xor esi, esi
inc esi
cmp dword [ebp - 0x40c], 0
je 0x404dc9
push ebx
call fcn.004053fa
and dword [ebp - 0x41c], 0
mov dword [esp], 0x401fd8
push 2
lea eax, [ebp - 0x41c]
push 0
push eax
mov dword [ebp - 0x418], esi
call fcn.004048dd
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x408]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403240
leave
ret 0x18
mov dword [ebp - 0x408], esi
jmp 0x404d93

Function at 0x4058d9
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 0x405926
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 0x405939
cmp dword [ebp + 8], 2
je 0x405923
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 0x405926
jmp 0x405939
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 0x405940
call fcn.00404f67
mov edi, eax
cmp dword [ebp - 4], esi
je 0x40594e
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
leave
ret 0xc
Function at 0x405b93
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 0x405be1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405bbe
cmp eax, 5
jne 0x405bfd
mov ecx, dword [ebp + 0x10]
inc ecx
cmp ebx, ecx
jae 0x405c99
push dword [ebp + 0x14]
call fcn.00405b5e
mov dword [ebp - 4], eax
cmp eax, 0x800704c7
je 0x405caa
inc ebx
push edi
call esi
cmp eax, 0xffffffff
je 0x405bae
test al, 0x10
jne 0x405caa
mov dword [ebp - 4], 0x80070057
jmp 0x405caa
cmp eax, 3
je 0x405c0b
cmp eax, 2
jne 0x405c99
mov eax, dword [ebp + 0xc]
lea esi, [edi + eax*2 - 2]
jmp 0x405c21
cmp word [esi], 0x5c
je 0x405c25
test eax, eax
jbe 0x405c27
dec esi
dec esi
dec eax
cmp esi, edi
ja 0x405c14
test eax, eax
je 0x405bf1
cmp esi, edi
je 0x405bf1
cmp eax, 2
jbe 0x405c51
push dword [ebp + 0x14]
xor ecx, ecx
push dword [ebp + 0x10]
mov word [esi], cx
push eax
push edi
call fcn.00405b93
push 0x5c
pop ecx
mov dword [ebp - 4], eax
mov word [esi], cx
test eax, eax
jl 0x405caa
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor ebx, ebx
inc ebx
jmp 0x405c87
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405c6c
cmp eax, 5
jne 0x405c92
mov ecx, dword [ebp + 0x10]
inc ecx
cmp ebx, ecx
jae 0x405c99
push dword [ebp + 0x14]
call fcn.00405b5e
mov dword [ebp - 4], eax
cmp eax, 0x800704c7
je 0x405caa
inc ebx
push 0
push edi
call esi
test eax, eax
je 0x405c5c
jmp 0x405caa
cmp eax, 0xb7
je 0x405caa
test eax, eax
jle 0x405ca7
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 0x405cb9
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 0x405dc9
push dword [ebp + 8]
call fcn.00405b19
test eax, eax
je 0x405dc9
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 4], edi
push edi
jmp 0x405d23
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405cfb
cmp eax, 5
jne 0x405d31
mov ecx, dword [ebp + 0xc]
inc ecx
cmp dword [ebp - 4], ecx
jae 0x405db9
push dword [ebp + 0x10]
call fcn.00405b5e
mov ebx, eax
cmp ebx, 0x800704c7
je 0x405dce
inc dword [ebp - 4]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x405ceb
jmp 0x405dce
cmp eax, 0xb7
je 0x405dce
cmp eax, 3
jne 0x405db9
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x405d47
sub eax, edx
sar eax, 1
mov esi, eax
lea eax, [esi + esi + 2]
push eax
call fcn.004053ac
mov edi, eax
pop ecx
test edi, edi
jne 0x405d6f
mov ebx, 0x8007000e
jmp 0x405dce
push dword [ebp + 8]
lea eax, [esi + 1]
push eax
push edi
call fcn.00403d95
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 0x405da4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x405da4
mov ebx, 0x80070003
jmp 0x405dce
push dword [ebp + 0x10]
mov word [edi + 6], bx
push dword [ebp + 0xc]
push esi
push edi
call fcn.00405b93
mov ebx, eax
jmp 0x405dce
test eax, eax
jle 0x405db5
and eax, 0xffff
or eax, 0x80070000
jmp 0x405db5
mov ebx, 0x80070057
push edi
call fcn.004053fa
pop ecx
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0xc

Function at 0x4060c0
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 0x4060f2
mov ebx, 0x8007007a
jmp 0x40611c
test eax, eax
jne 0x4060ff
call fcn.00404f67
mov ebx, eax
jmp 0x40611c
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