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

Disassembly:
sub esp, 8
push ebp
mov ebp, dword [esp + 0x14]
push esi
push edi
lea eax, [esp + 0xc]
push eax
push ecx
xor esi, esi
push 0x80000002
mov dword [esp + 0x18], 0
xor edi, edi
mov dword [esp + 0x1c], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
cmp eax, 2
jne 0x40451e
push eax
push 0x19
push str..RegMisc.cpp
push str._S__d_dwErrNo0x_x_n
call fcn.004019b0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push edi
push edi
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x1a0000
mov edi, edx
adc edi, 0x13
push edi
push esi
push 0x1b
jmp 0x4046c2
test eax, eax
je 0x404562
push eax
push 0x20
push str..RegMisc.cpp
push str._S__d_dwErrNo0x_x_n
call fcn.004019b0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push 0
push 0
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x210000
mov edi, edx
adc edi, 0x15
push edi
push esi
push 0x22
jmp 0x4046c2
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x404628
cmp dword [esp + 0x24], esi
je 0x404628
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
push eax
push ebp
push eax
mov eax, dword [esp + 0x28]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 2
jne 0x4045d5
push eax
push 0x2b
push str..RegMisc.cpp
push str._S__d_dwErrNo0x_x_n
call fcn.004019b0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push 0
push 0
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x2c0000
mov edi, edx
adc edi, 0x13
push edi
push esi
push 0x2d
jmp 0x4046c2
test eax, eax
je 0x404619
push eax
push 0x32
push str..RegMisc.cpp
push str._S__d_dwErrNo0x_x_n
call fcn.004019b0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push 0
push 0
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x330000
mov edi, edx
adc edi, 0x15
push edi
push esi
push 0x34
jmp 0x4046c2
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x24]
mov dword [eax], edx
jmp 0x4046d4
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
push ecx
push eax
mov eax, dword [esp + 0x14]
push ebp
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 2
jne 0x404683
push eax
push 0x3f
push str..RegMisc.cpp
push str._S__d_dwErrNo0x_x_n
call fcn.004019b0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push 0
push 0
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x400000
mov edi, edx
adc edi, 0x13
push edi
push esi
push 0x41
jmp 0x4046c2
test eax, eax
je 0x4046d4
push eax
push 0x46
push str..RegMisc.cpp
push str._S__d_dwErrNo0x_x_n
call fcn.004019b0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push 0
push 0
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x470000
mov edi, edx
adc edi, 0x15
push edi
push esi
push 0x48
push str..RegMisc.cpp
push str._S__d_nRet0x_016llX_n
call fcn.004019b0
add esp, 0x14
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4046e3
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, edi
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 8
ret
Function at 0x4062c0
Capabilities:
Get disk information via ioctl

Disassembly:
sub esp, 0x10
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x80
push 3
push esi
push 3
push 0x80000000
push eax
xor edi, edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x406329
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push esi
push esi
push eax
call fcn.004148f0
mov esi, eax
mov edi, edx
add esi, 0x230000
adc edi, 0x60
push edi
push esi
push 0x24
push str..DiskInstancePathRegKey.cpp
push str._S__d_nRet0x_016llX_n
call fcn.004019b0
add esp, 0x14
mov edx, edi
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x10
ret
push esi
lea ecx, [esp + 0x10]
push ecx
push 0xc
lea edx, [esp + 0x1c]
push edx
push esi
push esi
xor eax, eax
push 0x2d1080
push ebx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x4063a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push esi
push esi
push eax
call fcn.004148f0
mov esi, eax
mov edi, edx
add esi, 0x340000
adc edi, 0x15
push edi
push esi
push 0x35
push str..DiskInstancePathRegKey.cpp
push str._S__d_nRet0x_016llX_n
call fcn.004019b0
add esp, 0x14
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, edi
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x10
ret
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
push ebx
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, edi
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x10
ret
Function at 0x409551
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41c028]
jne 0x40955b
repz ret
jmp fcn.0040ad9f

Function at 0x411b62
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.0040ce65
and dword [ebp - 4], 0
cmp dword [0x41db10], 0
mov ebx, eax
jne 0x411c13
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x411cc4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x411cc4
push eax
call fcn.0040cdf3
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x41db10], eax
call esi
push eax
call fcn.0040cdf3
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x41db14], eax
call esi
push eax
call fcn.0040cdf3
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x41db18], eax
call esi
push eax
call fcn.0040cdf3
pop ecx
mov dword [0x41db20], eax
test eax, eax
je 0x411c13
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040cdf3
pop ecx
mov dword [0x41db1c], eax
mov eax, dword [0x41db1c]
cmp eax, ebx
je 0x411c6b
cmp dword [0x41db20], ebx
je 0x411c6b
push eax
call fcn.0040ce6e
push dword [0x41db20]
mov esi, eax
call fcn.0040ce6e
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x411c6b
test edi, edi
je 0x411c6b
call esi
test eax, eax
je 0x411c62
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x411c62
test byte [ebp - 0xc], 1
jne 0x411c6b
or dword [ebp + 0x10], 0x200000
jmp 0x411ca4
mov eax, dword [0x41db14]
cmp eax, ebx
je 0x411ca4
push eax
call fcn.0040ce6e
pop ecx
test eax, eax
je 0x411ca4
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x411ca4
mov eax, dword [0x41db18]
cmp eax, ebx
je 0x411ca4
push eax
call fcn.0040ce6e
pop ecx
test eax, eax
je 0x411ca4
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x41db10]
call fcn.0040ce6e
pop ecx
test eax, eax
je 0x411cc4
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x411cc6
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401d00
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0x12
push 0x39
call dword [0x41e284]
mov dword [0x41e290], 0x44
push 0x5f
push 0x28
push 0
call dword [0x41df5c]
mov dword [0x41df70], 0x1003f
push 0x126
push 0x2d
call fcn.004010d0
add esp, 8
mov eax, dword [ebp + 8]
push eax
call fcn.00401b60
add esp, 4
push 0x3b
push 0x12
call dword [0x41e2fc]
mov dword [ebp - 4], 0
jmp 0x401d65
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [0x41df4c]
xor eax, eax
mov ax, word [edx + 6]
cmp dword [ebp - 4], eax
jge 0x401de5
push 0x3d
push 0x4e
call dword [0x41e2fc]
mov ecx, dword [0x41e518]
mov edx, dword [ecx + 0x3c]
mov eax, dword [ebp - 4]
imul eax, eax, 0x28
add eax, dword [ebp + 8]
lea ecx, [eax + edx + 0xf8]
mov dword [0x41df48], ecx
push 0x59
push 0x14
call dword [0x41e2fc]
push 0
mov edx, dword [0x41df48]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [0x41df48]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x14]
push edx
mov eax, dword [0x41df4c]
mov ecx, dword [eax + 0x34]
mov edx, dword [0x41df48]
add ecx, dword [edx + 0xc]
push ecx
mov eax, dword [0x41df38]
push eax
call dword [0x41e2ec]
jmp 0x401d5c
push 6
push 0x14
call dword [0x41e284]
call fcn.00401c70
push 0x36
push 0x2f
call fcn.00401130
add esp, 8
mov esp, ebp
pop ebp
ret
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x41c7e0]
sub esp, 0x904
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
push edi
je 0x401036
cmp word [0x41c7e2], bx
je 0x401027
call eax
mov dword [0x41c7e0], eax
push eax
call fcn.00402173
push eax
call fcn.00408cc3
pop ecx
jmp 0x4010a4
push 0x27
call fcn.00402173
mov esi, dword [ebp + 8]
push dword [esi + 0xc]
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
push dword [esi]
push eax
lea eax, [ebp - 0x904]
push eax
call edi
add esp, 0x14
cmp dword [esi + 0x10], ebx
mov dword [ebp - 4], ebx
jbe 0x401098
lea ebx, [esi + 0x14]
push dword [ebx]
lea eax, [ebp - 0x104]
push str._t0x_p_n
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x904]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add ebx, 4
cmp eax, dword [esi + 0x10]
jb 0x401063
lea eax, [ebp - 0x904]
push eax
call fcn.00408cc3
pop ecx
call fcn.00404499
push 0xa
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x4015fd
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push dword [ebp + 8]
mov esi, ecx
lea ecx, [esi + 8]
call fcn.00410a2f
push dword [ebp + 0xc]
lea edi, [esi + 0xc]
mov ecx, edi
call fcn.0040135c
push 0x5c
mov ecx, edi
call fcn.00401512
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x4012cf
push edi
push edi
mov dword [0x41c7e4], esi
mov dword [0x41c7ec], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x41c82c], 2
mov dword [0x41c7e8], eax
je 0x40165a
call fcn.00408507
push 0xffffffffffffffff
push dword [0x41c7e8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x41c7ec]
cmp eax, edi
mov dword [0x41c8c0], edi
je 0x4016a9
cmp eax, 1
je 0x40169d
cmp eax, 2
je 0x401699
cmp eax, 3
je 0x401695
cmp eax, 0x67
jle 0x401690
cmp eax, 0x6a
jle 0x40170d
push eax
push 0x14
jmp 0x4016e0
push 0x12
jmp 0x40169f
push 0x13
jmp 0x40169f
push 0x11
push edi
call fcn.00408da7
pop ecx
pop ecx
jmp 0x40170d
cmp dword [0x41c8c8], edi
jne 0x40170d
lea eax, [ebp + 8]
push eax
push dword [0x41c7e8]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
mov ecx, dword [ebp + 8]
je 0x4016d0
cmp ecx, edi
jne 0x4016d0
xor eax, eax
jmp 0x401712
mov eax, 0x80070000
mov edx, ecx
and edx, eax
cmp edx, eax
je 0x4016e3
push ecx
push 0x21
push edi
jmp 0x401705
and ecx, 0xffff
cmp ecx, 0xe
jne 0x4016f7
cmp dword [0x41c830], 0xffffffff
je 0x40170d
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.00408da7
add esp, 0xc
mov eax, 0x80004005
pop edi
pop esi
leave
ret 8
Function at 0x401b61
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push esi
push 0
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401ba2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xb7
cmp eax, esi
je 0x401b8c
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
ret
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401ba2
test al, 0x10
jne 0x401ba2
push esi
jmp 0x401b82
xor eax, eax
inc eax
pop esi
ret

Function at 0x401db5
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov ebx, eax
movzx eax, word [0x41c7f0]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
jne 0x401df9
push 0x409
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
je 0x401e1f
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x401e0a
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esi], eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x401e1f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x401e99
cmp dword [0x41c800], 0
jne 0x401e97
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.SetProcessPreferredUILanguages
mov ebx, str.kernel32
push ebx
mov dword [0x41c800], 1
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push 0
mov dword [ebp - 4], eax
movzx eax, word [0x41c7f0]
push 0x409
push 0
push eax
lea eax, [ebp - 0x44]
push str._04X_c_04X_c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
cmp dword [ebp - 4], 0
jne 0x401e8c
push str.SetThreadPreferredUILanguages
push ebx
call esi
push eax
call edi
test eax, eax
mov dword [ebp - 4], eax
je 0x401e97
push 0
lea eax, [ebp - 0x44]
push eax
push 4
call dword [ebp - 4]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402173
Capabilities:
Get geographical location
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
push ebx
push esi
xor ebx, ebx
xor esi, esi
cmp dword [0x41c090], ebx
je 0x4021a6
mov eax, 0x41c090
mov ecx, dword [ebp + 8]
cmp dword [eax], ecx
je 0x4021a6
inc esi
mov eax, esi
shl eax, 4
lea eax, [eax + 0x41c090]
cmp dword [eax], ebx
jne 0x40218f
shl esi, 4
cmp dword [esi + 0x41c090], ebx
jne 0x4021bb
mov eax, 0x4184c8
jmp 0x40232d
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x68]
push str.7zSfxString_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x68]
push eax
call ebx
mov dword [ebp - 4], eax
call edi
test eax, eax
jne 0x40226b
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
add eax, 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov ecx, dword [ebp - 4]
inc ecx
push ecx
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x68]
push eax
call ebx
cmp eax, dword [ebp - 4]
ja 0x402262
call edi
test eax, eax
jne 0x402262
mov eax, dword [esi + 0x41c09c]
test eax, eax
je 0x402257
mov edi, dword [ebp - 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x402254
push dword [esi + 0x41c09c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov dword [esi + 0x41c09c], edi
jmp 0x40226a
push edi
jmp 0x402265
mov eax, dword [ebp - 8]
mov dword [esi + 0x41c09c], eax
jmp 0x40226b
push dword [ebp - 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x41c09c]
test eax, eax
jne 0x40232c
mov ebx, dword [esi + 0x41c094]
lea edi, [esi + 0x41c098]
cmp dword [edi], eax
je 0x4022a1
call fcn.0040211d
cmp eax, dword [0x4192ec]
jne 0x4022a1
mov ebx, dword [edi]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
xor ecx, ecx
push 2
pop edx
lea eax, [edi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
cmp dword [0x41c064], 0xffffffff
pop ecx
mov dword [esi + 0x41c09c], eax
jne 0x40230c
and dword [0x41c064], 0
push 0x1f
lea eax, [ebp - 0xa8]
push eax
movzx eax, word [0x41c7f0]
push 0x1004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x40230c
lea eax, [ebp - 0xa8]
push eax
call dword [sym.imp.MSVCRT.dll__wtol]
pop ecx
mov dword [0x41c064], eax
lea eax, [edi + 1]
push eax
push dword [esi + 0x41c09c]
push edi
push ebx
push 0
push dword [0x41c064]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x41c09c]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40243a
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 0x10], bl
mov byte [ebp - 0xf], bl
mov byte [ebp - 0xe], bl
mov byte [ebp - 0xd], bl
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x402497
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 8]
pop ebx
leave
ret

Function at 0x4026bb
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
cmp dword [ebp + 8], 0
jne 0x4026cb
xor eax, eax
leave
ret
test byte [0x41c830], 2
mov dword [ebp - 0x40], 0x40
jne 0x402720
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x402720
mov ecx, dword [ebp - 0x2c]
xor eax, eax
cmp ecx, eax
ja 0x402720
jb 0x4026fc
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp + 8]
jae 0x402720
push 0x2b
call fcn.00402173
push eax
call fcn.00408d3a
cmp eax, 1
pop ecx
pop ecx
je 0x402719
or dword [0x41c830], 0xffffffff
jmp 0x4026c7
or dword [0x41c830], 2
xor eax, eax
inc eax
leave
ret

Function at 0x402b5d
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea ecx, [ebp - 0xc]
call fcn.00401444
cmp dword [ebp - 4], 1
jg 0x402b7b
push 1
lea ecx, [ebp - 0xc]
call fcn.0040115e
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
push 1
push dword [ebp - 0xc]
push eax
call esi
test eax, eax
jne 0x402b9f
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x402bd6
push ebx
mov ebx, dword [edi]
inc eax
push eax
push eax
lea ecx, [ebp - 0xc]
call fcn.00402796
push eax
push ebx
call esi
mov esi, dword [ebp - 0xc]
push esi
call fcn.0040114a
and word [esi + eax*2], 0
pop ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, edi
call fcn.00401395
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
pop edi
pop esi
leave
ret
Function at 0x402ed2
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
push esi
push edi
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.0040275d
push 0x4185d0
lea ecx, [ebp - 0xc]
call fcn.004027ae
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 0x25c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402fae
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.0040135c
push 0x5c
lea ecx, [ebp - 0xc]
call fcn.00401512
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0xc]
call fcn.004027ae
test byte [ebp - 0x25c], 0x10
mov edi, dword [ebp - 0xc]
je 0x402f7d
push 0x4185cc
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x402f91
push 0x4185c4
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x402f91
push edi
call fcn.00402ed2
pop ecx
jmp 0x402f8d
push 0
push edi
call esi
test eax, eax
je 0x402fd1
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x402fd1
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x402f18
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x402fd1
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x402fd1
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
inc eax
jmp 0x402fd9
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
pop ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x402fdf
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
cmp dword [0x41c8d4], 0
je 0x402fec
xor eax, eax
inc eax
ret
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403002
xor eax, eax
inc eax
pop esi
ret
test al, 0x10
jne 0x403020
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40301c
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop esi
ret
xor eax, eax
pop esi
ret
push esi
call fcn.00402ed2
pop ecx
pop esi
ret

Function at 0x4030d6
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
mov ecx, edi
call fcn.00401444
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov esi, eax
test esi, esi
jle 0x403114
lea eax, [esi + 1]
push eax
push eax
mov ecx, edi
call fcn.00402796
push eax
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov eax, dword [edi]
and word [eax + esi*2], 0
mov dword [edi + 4], esi
mov eax, edi
pop edi
pop esi
ret
Function at 0x403269
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 1
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
call edi
mov esi, dword [ebp + 8]
mov ecx, esi
mov ebx, eax
call fcn.00401444
lea eax, [ebx + 2]
push eax
mov ecx, esi
mov dword [ebp + 8], eax
call fcn.00402796
inc ebx
push ebx
push dword [ebp + 8]
mov ecx, esi
call fcn.00402796
push eax
push dword [ebp + 0xc]
call edi
mov edi, dword [esi]
push edi
call fcn.0040114a
and word [edi + eax*2], 0
pop ecx
mov dword [esi + 4], eax
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403390
xor eax, eax
jmp 0x4033e9
test al, 0x10
je 0x4033a1
push 0x10
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
jmp 0x4033e9
mov eax, dword [0x41c834]
test eax, eax
jne 0x4033b3
push esi
call fcn.00403346
pop ecx
jmp 0x4033e9
cmp eax, 2
jne 0x4033e6
lea eax, [ebp - 0x250]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x4033aa
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp + 0xc]
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jl 0x4033aa
xor eax, eax
inc eax
pop esi
leave
ret