joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5045bc
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x5046f4
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x5046d6
cmp dword [eax + 0x3c], 0
jne 0x504602
mov byte [eax + 0x1a4], 0
jmp 0x5046d6
mov byte [ebp - 0xd], 1
mov eax, dword [ebp - 0xc]
xor edx, edx
mov dword [eax + 4], edx
mov byte [ebp - 0x19], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
add eax, 0x64
mov dword [ebp - 0x18], eax
xor edx, edx
push ebp
push 0x5046a4
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0x18]
add eax, 0x15
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], 4
lea edx, [ebp - 0x24]
xor ecx, ecx
mov eax, 0x50470c
call fcn.0040f0f4
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 4]
call fcn.0040db08
mov eax, dword [ebp - 0x28]
mov edx, 0x50475c
call fcn.0047a168
dec eax
jle 0x50466e
call fcn.00404cd8
jmp 0x5046d6
lea ecx, [ebp - 0x14]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
call fcn.00494d64
cmp dword [ebp - 0x14], 0
je 0x50468b
cmp eax, 0x65
jne 0x50468b
mov byte [ebp - 0x19], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5046ab
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 8]
call fcn.00495004
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5046fb
lea eax, [ebp - 0x28]
call fcn.004052dc
lea eax, [ebp - 4]
call fcn.004052dc
ret
Function at 0x504760
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x504888
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x10]
call fcn.0040641c
test eax, eax
je 0x50486a
mov byte [ebp - 0xd], 1
mov eax, dword [ebp - 0xc]
xor edx, edx
mov dword [eax + 4], edx
mov byte [ebp - 0x19], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x18], eax
xor edx, edx
push ebp
push 0x504838
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0x18]
add eax, 0x15
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], 4
lea edx, [ebp - 0x24]
xor ecx, ecx
mov eax, 0x5048a0
call fcn.0040f0f4
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 4]
call fcn.0040db08
mov eax, dword [ebp - 0x28]
mov edx, 0x5048f0
call fcn.0047a168
dec eax
jle 0x504802
call fcn.00404cd8
jmp 0x50486a
lea ecx, [ebp - 0x14]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
call fcn.00494d64
cmp dword [ebp - 0x14], 0
je 0x50481f
cmp eax, 0x65
jne 0x50481f
mov byte [ebp - 0x19], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50483f
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 8]
call fcn.00495004
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50488f
lea eax, [ebp - 0x28]
call fcn.004052dc
lea eax, [ebp - 4]
call fcn.004052dc
ret
Function at 0x504ef8
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xe
push 0
push 0
dec ecx
jne 0x504f00
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], eax
xor eax, eax
push ebp
push 0x505225
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x25], 0
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x5051fd
cmp dword [eax + 0x3c], 0
jne 0x504f3f
mov byte [eax + 0x1a4], 0
jmp 0x5051fd
mov byte [ebp - 0x25], 1
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc]
add eax, 0x64
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x24]
xor edx, edx
mov dword [eax + 4], edx
mov byte [ebp - 0x2d], 0
xor edx, edx
push ebp
push 0x505059
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x2c]
add eax, 0x15
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 4
lea edx, [ebp - 0x3c]
xor ecx, ecx
mov eax, 0x50523c
call fcn.0040f0f4
lea edx, [ebp - 0x40]
mov eax, dword [ebp - 0x1c]
call fcn.0040db08
mov eax, dword [ebp - 0x40]
mov edx, 0x5052d4
call fcn.0047a168
dec eax
jle 0x504fae
call fcn.00404cd8
jmp 0x5051fd
lea ecx, [ebp - 0x34]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
call fcn.00494d64
cmp dword [ebp - 0x34], 0
je 0x505040
cmp eax, 0x65
je 0x505040
lea eax, [ebp - 4]
push eax
xor ecx, ecx
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x20]
call fcn.00495924
lea eax, [ebp - 8]
push eax
mov ecx, 1
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x20]
call fcn.00495924
lea eax, [ebp - 0xc]
push eax
mov ecx, 2
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x20]
call fcn.00495924
lea eax, [ebp - 0x10]
push eax
mov ecx, 3
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x20]
call fcn.00495924
lea eax, [ebp - 0x14]
push eax
mov ecx, 4
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x20]
call fcn.00495924
lea eax, [ebp - 0x18]
push eax
mov ecx, 5
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x20]
call fcn.00495924
mov byte [ebp - 0x2d], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x505060
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 0x20]
call fcn.00495004
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50522c
lea eax, [ebp - 0x60]
mov edx, 9
call fcn.00405300
lea eax, [ebp - 0x1c]
mov edx, 7
call fcn.00405300
ret
Function at 0x50e728
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x42
push 0
push 0
dec ecx
jne 0x50e730
push ecx
push ebx
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.0040575c
xor eax, eax
push ebp
push 0x50e96a
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 4], 0
je 0x50e93f
call fcn.0040fd84
add esp, 0xfffffff8
fstp qword [esp]
wait
lea ecx, [ebp - 0x16]
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x12]
call fcn.0040fd3c
call fcn.0040fdb0
add esp, 0xfffffff8
fstp qword [esp]
wait
lea eax, [ebp - 0x1e]
push eax
lea ecx, [ebp - 0x1c]
lea edx, [ebp - 0x1a]
lea eax, [ebp - 0x18]
call fcn.0040fa5c
lea eax, [ebp - 0x1f8]
lea edx, [ebx + 0x215]
call fcn.00405540
mov eax, dword [ebp - 0x1f8]
call fcn.0040e6a0
test al, al
jne 0x50e7d2
lea eax, [ebp - 0x1fc]
lea edx, [ebx + 0x215]
call fcn.00405540
mov eax, dword [ebp - 0x1fc]
call fcn.0040e9a8
lea eax, [ebp - 0x200]
lea edx, [ebx + 0x215]
call fcn.00405540
push dword [ebp - 0x200]
lea edx, [ebp - 0x204]
movzx eax, word [ebp - 0x12]
call fcn.0040e18c
push dword [ebp - 0x204]
push 0x50e980
lea edx, [ebp - 0x208]
movzx eax, word [ebp - 0x14]
call fcn.00479b6c
push dword [ebp - 0x208]
lea eax, [ebp - 8]
mov edx, 4
call fcn.00405670
mov eax, dword [ebp - 8]
call fcn.0040e6a0
test al, al
jne 0x50e841
push 0
mov eax, dword [ebp - 8]
call fcn.0040576c
push eax
call sub.kernel32.dll_CreateDirectoryA
push dword [ebp - 8]
push 0x50e98c
lea edx, [ebp - 0x20c]
movzx eax, word [ebp - 0x12]
call fcn.0040e18c
push dword [ebp - 0x20c]
push 0x50e980
lea edx, [ebp - 0x210]
movzx eax, word [ebp - 0x14]
call fcn.00479b6c
push dword [ebp - 0x210]
push 0x50e980
lea edx, [ebp - 0x214]
movzx eax, word [ebp - 0x16]
call fcn.00479b6c
push dword [ebp - 0x214]
push 0x50e998
lea eax, [ebp - 0xc]
mov edx, 8
call fcn.00405670
mov edx, dword [ebp - 0xc]
lea eax, [ebp - 0x1f4]
call fcn.0040392c
mov eax, dword [ebp - 0xc]
call fcn.0040e67c
test al, al
jne 0x50e8d0
lea eax, [ebp - 0x1f4]
call fcn.004036bc
call fcn.00403280
jmp 0x50e8e0
lea eax, [ebp - 0x1f4]
call fcn.004036c8
call fcn.00403280
call fcn.0040fdb0
fstp qword [ebp - 0x28]
wait
push dword [ebp - 0x24]
push dword [ebp - 0x28]
mov edx, dword [0x523614]
mov edx, dword [edx]
lea eax, [ebp - 0x10]
call fcn.004109e4
push dword [ebp - 4]
push 0x50e9a8
push dword [ebp - 0x10]
lea eax, [ebp - 4]
mov edx, 3
call fcn.00405670
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x1f4]
call fcn.00405a8c
call fcn.00403e1c
call fcn.00403280
lea eax, [ebp - 0x1f4]
call fcn.004039f4
call fcn.00403280
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50e971
lea eax, [ebp - 0x214]
mov edx, 8
call fcn.00405300
lea eax, [ebp - 0x10]
mov edx, 4
call fcn.00405300
ret
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x900
push ebx
push esi
push edi
push 0x27
call fcn.00401f56
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 - 0x900]
push eax
call edi
and dword [ebp + 8], 0
add esp, 0x14
cmp dword [esi + 0x10], 0
jbe 0x401070
lea ebx, [esi + 0x14]
push dword [ebx]
lea eax, [ebp - 0x100]
push str._t0x_p_n
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x900]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
add ebx, 4
cmp eax, dword [esi + 0x10]
jb 0x40103b
lea eax, [ebp - 0x900]
push eax
call fcn.004074b2
pop ecx
call fcn.00403cd2
push 0xa
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x40148e
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.0040843a
push dword [ebp + 0xc]
lea edi, [esi + 0xc]
mov ecx, edi
call fcn.004012ac
push 0x5c
mov ecx, edi
call fcn.004013ac
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x40121f
push edi
push edi
mov dword [0x41a720], esi
mov dword [0x41a728], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x41a764], 2
mov dword [0x41a724], eax
je 0x4014eb
call fcn.00407619
push 0xffffffffffffffff
push dword [0x41a724]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x41a728]
cmp eax, edi
mov dword [0x41a7c8], edi
je 0x40153a
cmp eax, 1
je 0x40152e
cmp eax, 2
je 0x40152a
cmp eax, 3
je 0x401526
cmp eax, 0x67
jle 0x401521
cmp eax, 0x6a
jle 0x40158d
push eax
push 0x14
jmp 0x401571
push 0x12
jmp 0x401530
push 0x13
jmp 0x401530
push 0x11
push edi
call fcn.00407511
pop ecx
pop ecx
jmp 0x40158d
cmp dword [0x41a7d0], edi
jne 0x40158d
lea eax, [ebp + 8]
push eax
push dword [0x41a724]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
mov ecx, dword [ebp + 8]
je 0x401561
cmp ecx, edi
jne 0x401561
xor eax, eax
jmp 0x401592
mov eax, 0x80070000
mov edx, ecx
and edx, eax
cmp edx, eax
je 0x401574
push ecx
push 0x21
push edi
jmp 0x401585
movzx eax, cx
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.00407511
add esp, 0xc
mov eax, 0x80004005
pop edi
pop esi
leave
ret 8

Function at 0x4018f8
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 0x401939
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xb7
cmp eax, esi
je 0x401923
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 0x401939
test al, 0x10
jne 0x401939
push esi
jmp 0x401919
xor eax, eax
inc eax
pop esi
ret
Function at 0x401b98
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 [0x41a72c]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
jne 0x401bdc
push 0x409
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
je 0x401c02
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x401bed
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 0x401c02
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x401c7c
cmp dword [0x41a73c], 0
jne 0x401c7a
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.SetProcessPreferredUILanguages
mov ebx, str.kernel32
push ebx
mov dword [0x41a73c], 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 [0x41a72c]
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 0x401c6f
push str.SetThreadPreferredUILanguages
push ebx
call esi
push eax
call edi
test eax, eax
mov dword [ebp - 4], eax
je 0x401c7a
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 0x401f56
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 [0x41a068], ebx
je 0x401f89
mov eax, 0x41a068
mov ecx, dword [ebp + 8]
cmp dword [eax], ecx
je 0x401f89
inc esi
mov eax, esi
shl eax, 4
lea eax, [eax + 0x41a068]
cmp dword [eax], ebx
jne 0x401f72
shl esi, 4
cmp dword [esi + 0x41a068], ebx
jne 0x401f9e
mov eax, 0x416354
jmp 0x402110
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 0x40204e
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 0x402045
call edi
test eax, eax
jne 0x402045
mov eax, dword [esi + 0x41a074]
test eax, eax
je 0x40203a
mov edi, dword [ebp - 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x402037
push dword [esi + 0x41a074]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov dword [esi + 0x41a074], edi
jmp 0x40204d
push edi
jmp 0x402048
mov eax, dword [ebp - 8]
mov dword [esi + 0x41a074], eax
jmp 0x40204e
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 + 0x41a074]
test eax, eax
jne 0x40210f
mov ebx, dword [esi + 0x41a06c]
lea edi, [esi + 0x41a070]
cmp dword [edi], eax
je 0x402084
call fcn.00401f00
cmp eax, dword [0x416e64]
jne 0x402084
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 [0x41a064], 0xffffffff
pop ecx
mov dword [esi + 0x41a074], eax
jne 0x4020ef
and dword [0x41a064], 0
push 0x1f
lea eax, [ebp - 0xa8]
push eax
movzx eax, word [0x41a72c]
push 0x1004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x4020ef
lea eax, [ebp - 0xa8]
push eax
call dword [sym.imp.MSVCRT.dll__wtol]
pop ecx
mov dword [0x41a064], eax
lea eax, [edi + 1]
push eax
push dword [esi + 0x41a074]
push edi
push ebx
push 0
push dword [0x41a064]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x41a074]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4026de
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea ecx, [ebp - 0xc]
call fcn.00401394
cmp dword [ebp - 4], 1
jg 0x4026fc
push 1
lea ecx, [ebp - 0xc]
call fcn.0040112f
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 0x402720
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x402757
push ebx
mov ebx, dword [edi]
inc eax
push eax
push eax
lea ecx, [ebp - 0xc]
call fcn.0040244c
push eax
push ebx
call esi
mov esi, dword [ebp - 0xc]
push esi
call fcn.0040111b
and word [esi + eax*2], 0
pop ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, edi
call fcn.004012e5
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
pop edi
pop esi
leave
ret

Function at 0x402a90
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.00402413
push 0x41644c
lea ecx, [ebp - 0xc]
call fcn.00402464
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 0x402b6c
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.004012ac
push 0x5c
lea ecx, [ebp - 0xc]
call fcn.004013ac
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0xc]
call fcn.00402464
test byte [ebp - 0x25c], 0x10
mov edi, dword [ebp - 0xc]
je 0x402b3b
push 0x416448
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x402b4f
push 0x416440
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x402b4f
push edi
call fcn.00402a90
pop ecx
jmp 0x402b4b
push 0
push edi
call esi
test eax, eax
je 0x402b8f
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x402b8f
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x402ad6
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x402b8f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x402b8f
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
inc eax
jmp 0x402b97
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 0x402b9d
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
cmp dword [0x41a7dc], 0
je 0x402baa
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 0x402bc0
xor eax, eax
inc eax
pop esi
ret
test al, 0x10
jne 0x402bde
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x402bda
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop esi
ret
xor eax, eax
pop esi
ret
push esi
call fcn.00402a90
pop ecx
pop esi
ret

Function at 0x402c94
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
mov ecx, edi
call fcn.00401394
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov esi, eax
test esi, esi
jle 0x402cd2
lea eax, [esi + 1]
push eax
push eax
mov ecx, edi
call fcn.0040244c
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 0x402e27
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.00401394
lea eax, [ebx + 2]
push eax
mov ecx, esi
mov dword [ebp + 8], eax
call fcn.0040244c
inc ebx
push ebx
push dword [ebp + 8]
mov ecx, esi
call fcn.0040244c
push eax
push dword [ebp + 0xc]
call edi
mov edi, dword [esi]
push edi
call fcn.0040111b
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 0x402f31
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 0x402f4e
xor eax, eax
jmp 0x402fa7
test al, 0x10
je 0x402f5f
push 0x10
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
jmp 0x402fa7
mov eax, dword [0x41a768]
test eax, eax
jne 0x402f71
push esi
call fcn.00402f04
pop ecx
jmp 0x402fa7
cmp eax, 2
jne 0x402fa4
lea eax, [ebp - 0x250]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x402f68
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 0x402f68
xor eax, eax
inc eax
pop esi
leave
ret
Function at 0x40325d
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
lea ecx, [ebp - 0x18]
mov ebx, eax
mov dword [ebp - 4], eax
call fcn.00402413
xor esi, esi
cmp dword [ebp - 0x10], esi
jg 0x40328e
push esi
lea ecx, [ebp - 0x18]
call fcn.0040112f
movzx eax, word [edi + ebx*2 - 2]
cmp ax, 0x5c
mov edi, dword [ebp - 0x18]
je 0x4032a2
cmp ax, 0x2f
jne 0x4032ab
mov word [edi + ebx*2 - 2], si
dec ebx
mov dword [ebp - 4], ebx
mov esi, ebx
jmp 0x4032d1
movzx eax, word [edi + esi*2]
cmp ax, 0x2f
je 0x4032c4
cmp ax, 0x5c
je 0x4032c4
dec esi
test esi, esi
jg 0x4032af
test esi, esi
je 0x403380
and word [edi + esi*2], 0
push edi
call fcn.004018f8
test eax, eax
pop ecx
je 0x4032c0
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
jne 0x403308
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.00402f31
test eax, eax
pop ecx
pop ecx
je 0x403308
xor esi, esi
jmp 0x4033a5
push edi
call fcn.004018f8
test eax, eax
pop ecx
jne 0x403322
push edi
push 0xc
push 1
call fcn.00407511
add esp, 0xc
jmp 0x403301
cmp esi, ebx
jge 0x403374
mov eax, dword [ebp - 4]
sub eax, esi
inc eax
push eax
mov eax, dword [ebp + 8]
lea eax, [eax + esi*2]
push eax
lea ebx, [edi + esi*2]
push ebx
call sub.MSVCRT.dll_memcpy
xor ecx, ecx
add esp, 0xc
cmp word [ebx], cx
je 0x40335a
jmp 0x403359
movzx eax, word [edi + esi*2]
cmp ax, 0x5c
je 0x403360
cmp ax, 0x2f
je 0x403360
inc esi
cmp word [edi + esi*2], cx
jne 0x403349
push edi
mov word [edi + esi*2], cx
call fcn.004018f8
test eax, eax
pop ecx
je 0x403313
cmp esi, dword [ebp - 4]
jl 0x403326
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
pop ecx
inc eax
jmp 0x4033c5
cmp ebx, 2
mov ecx, dword [ebp + 8]
jne 0x4033b0
mov ax, word [ecx]
or ax, 0x20
cmp ax, 0x61
jb 0x4033b0
cmp ax, 0x7a
ja 0x4033b0
cmp word [ecx + 2], 0x3a
jne 0x4033b0
xor esi, esi
inc esi
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, esi
jmp 0x4033c5
push ecx
push 0xc
push 1
call fcn.00407511
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret