joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001e120
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x1002d014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [0x1002e648]
lea eax, [ebp - 0x110]
push eax
push fcn.1001e120
mov ecx, edi
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0x110], 0
call dword [0x100261a0]
call edi
mov ecx, dword [ebp + 4]
mov esi, eax
lea eax, [ebp - 0x10c]
push eax
push ecx
mov ecx, edi
call dword [0x100261a0]
call edi
nop
cmp eax, esi
je 0x1001e2b0
mov esi, dword [ebp - 0x10c]
test esi, esi
je 0x1001e289
push 0x103
lea eax, [ebp - 0x107]
mov byte [ebp - 0x108], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x108]
push 0x104
push eax
push esi
mov esi, dword [0x1002e580]
mov ecx, esi
call dword [0x100261a0]
call esi
mov al, byte ds:[ebp - 0x108]
lea ecx, [ebp - 0x108]
xor edx, edx
test al, al
je 0x1001e1fd
cmp al, 0x5c
je 0x1001e1ec
cmp al, 0x2f
jne 0x1001e1ee
mov edx, ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x1001e1e4
test edx, edx
je 0x1001e1fd
inc edx
jmp 0x1001e203
lea edx, [ebp - 0x108]
or eax, 0xffffffff
inc eax
cmp byte [eax + edx], 0
jne 0x1001e206
inc eax
push eax
push edx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
push eax
call sub.VCRUNTIME140.dll_memcpy
mov esi, eax
add esp, 0xc
mov eax, dword [0x1002e794]
mov dword [ebp - 0x114], esi
cmp eax, dword [0x1002e798]
je 0x1001e250
mov dword [eax], esi
mov ecx, dword [0x1002e794]
add ecx, 4
mov dword [0x1002e794], ecx
jmp 0x1001e26b
lea ecx, ds:[ebp - 0x114]
push ecx
push eax
mov ecx, 0x1002e790
call fcn.1001ed40
mov ecx, dword [0x1002e794]
sub ecx, dword [0x1002e790]
test ecx, 0xfffffffc
jne 0x1001e289
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [ebp + 8]
pop edi
pop esi
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10023990
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
xor edx, edx
xor esi, esi
mov dword [ebp - 0x10c], edx
mov dword [ebp - 0x110], esi
push ebx
mov ecx, dword [eax + 0x3c]
xor ebx, ebx
add ecx, eax
movzx eax, word [ecx + 6]
mov dword [ebp - 0x114], eax
test eax, eax
je 0x1001e333
movzx eax, word [ecx + 0x14]
lea edi, [ecx + 0x18]
mov esi, dword [0x1002da14]
add edi, eax
sub esi, eax
sub esi, ecx
sub esi, 0x18
nop
xor edx, edx
mov ecx, edi
mov al, byte [esi + ecx]
cmp al, byte [ecx]
jne 0x1001e31a
inc edx
inc ecx
cmp edx, 6
jb 0x1001e2f4
mov edx, dword [edi + 0xc]
mov ecx, dword [ebp + 0xc]
add edx, ecx
mov dword [ebp - 0x10c], edx
mov esi, dword [edi + 0x10]
add esi, edx
jmp 0x1001e336
add edi, dword [0x1002e864]
inc ebx
sub esi, dword [0x1002e864]
cmp ebx, dword [ebp - 0x114]
jl 0x1001e2f0
xor edx, edx
xor esi, esi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
pop ebx
pop edi
mov dword [eax], ecx
mov ecx, dword [ebp - 4]
mov dword [eax + 8], esi
xor ecx, ebp
mov dword [eax + 4], edx
pop esi
call fcn.10023990
mov esp, ebp
pop ebp
ret
Function at 0x10020d10
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0xc]
sub eax, 0x10000
push eax
call fcn.10020ec0
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
jbe 0x10020ddd
mov edx, dword [ebp - 4]
cmp edx, dword [section..data]
jb 0x10020d5a
mov eax, dword [ebp - 4]
cmp eax, dword [0x1002d004]
ja 0x10020d5a
mov ecx, dword [ebp - 4]
sub ecx, 0x8000000
mov dword [ebp - 4], ecx
jmp 0x10020d2a
push 0x1c
push 0
lea edx, [ebp - 0x24]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x10020d80
jmp 0x10020ddd
cmp dword [ebp - 0x14], 0x10000
jne 0x10020dc3
cmp dword [ebp - 0x18], 0x10000
jb 0x10020dc3
push 0x40
push 0x3000
push 0x10000
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x10020db6
mov eax, dword [ebp - 8]
jmp 0x10020ddf
mov eax, dword [ebp - 4]
sub eax, 0x10000
mov dword [ebp - 4], eax
jmp 0x10020dd8
mov ecx, dword [ebp - 0x20]
sub ecx, 0x10000
push ecx
call fcn.10020ec0
add esp, 4
mov dword [ebp - 4], eax
jmp 0x10020d2a
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x10020df0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 8]
push eax
call fcn.10020ef0
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 0xc]
jae 0x10020eb5
mov edx, dword [ebp - 4]
cmp edx, dword [section..data]
jb 0x10020e35
mov eax, dword [ebp - 4]
cmp eax, dword [0x1002d004]
ja 0x10020e35
mov ecx, dword [ebp - 4]
add ecx, 0x8000000
mov dword [ebp - 4], ecx
jmp 0x10020e05
push 0x1c
push 0
lea edx, [ebp - 0x24]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x10020e5b
jmp 0x10020eb5
cmp dword [ebp - 0x14], 0x10000
jne 0x10020e9e
cmp dword [ebp - 0x18], 0x10000
jb 0x10020e9e
push 0x40
push 0x3000
push 0x10000
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x10020e91
mov eax, dword [ebp - 8]
jmp 0x10020eb7
mov eax, dword [ebp - 4]
add eax, 0x10000
mov dword [ebp - 4], eax
jmp 0x10020eb0
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x18]
push ecx
call fcn.10020ef0
add esp, 4
mov dword [ebp - 4], eax
jmp 0x10020e05
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x10020f20
Capabilities:
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.10021310
add esp, 0xc
mov dword [ebp - 4], 0
cmp dword [0x1002de2c], 0
jne 0x10020f5d
cmp dword [0x1002de28], 0
je 0x10020f5d
mov eax, dword [0x1002de28]
mov dword [0x1002de2c], eax
cmp dword [0x1002de2c], 0
je 0x10020fda
mov ecx, dword [0x1002de2c]
cmp dword [ecx + 8], 0
je 0x10020fda
mov edx, dword [0x1002de2c]
mov eax, dword [edx + 8]
cmp eax, dword [ebp - 0x10]
jb 0x10020fda
mov ecx, dword [0x1002de2c]
mov edx, dword [ecx + 8]
cmp edx, dword [ebp - 0xc]
ja 0x10020fda
mov eax, dword [0x1002de2c]
mov ecx, dword [eax + 8]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jb 0x10020fa9
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jbe 0x10020fb0
xor eax, eax
jmp 0x100210f9
mov ecx, dword [0x1002de2c]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x40]
mov dword [ecx + 8], eax
push 0x48
push 0xcc
mov ecx, dword [ebp - 4]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, dword [ebp - 4]
jmp 0x100210f9
mov edx, dword [0x1002de28]
mov dword [0x1002de2c], edx
jmp 0x10020ff6
mov eax, dword [0x1002de2c]
mov ecx, dword [eax + 4]
mov dword [0x1002de2c], ecx
cmp dword [0x1002de2c], 0
je 0x10021036
cmp dword [0x1002de2c], 0
je 0x10021034
mov edx, dword [0x1002de2c]
cmp dword [edx + 8], 0
je 0x10021034
mov eax, dword [0x1002de2c]
mov ecx, dword [eax + 8]
cmp ecx, dword [ebp - 0x10]
jb 0x10021034
mov edx, dword [0x1002de2c]
mov eax, dword [edx + 8]
cmp eax, dword [ebp - 0xc]
ja 0x10021034
jmp 0x10020f8e
jmp 0x10020fe8
mov ecx, dword [ebp + 8]
and ecx, 0xffff
mov edx, dword [ebp + 8]
sub edx, ecx
mov dword [ebp + 8], edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.10021100
add esp, 0xc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x100210f7
mov eax, dword [ebp - 0x18]
mov dword [0x1002de2c], eax
mov ecx, dword [0x1002de2c]
mov dword [ecx], 0x52727464
mov edx, dword [0x1002de2c]
mov dword [edx + 8], 0
mov eax, dword [0x1002de2c]
mov ecx, dword [0x1002de28]
mov dword [eax + 4], ecx
mov edx, dword [0x1002de2c]
mov dword [0x1002de28], edx
mov dword [ebp - 0x14], 0
mov eax, dword [0x1002de2c]
add eax, 0x48
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0x38c
jmp 0x100210c7
mov ecx, dword [ebp - 8]
sub ecx, 1
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 1
jle 0x100210e7
imul edx, dword [ebp - 8], 0x48
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x14]
mov dword [eax + edx + 0x40], ecx
imul edx, dword [ebp - 8], 0x48
add edx, dword [ebp - 4]
mov dword [ebp - 0x14], edx
jmp 0x100210be
mov eax, dword [0x1002de2c]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 8], ecx
jmp 0x10020f8e
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x4015c0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x34
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0x72636573
mov dword [ebp - 0x1c], 0x705f7465
mov dword [ebp - 0x18], 0x77737361
mov dword [ebp - 0x14], 0x64526f
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._strlen
mov ebx, eax
lea eax, [ebp - 0x20]
mov dword [esp], eax
call sym._strlen
cmp ebx, eax
jne 0x40164b
mov dword [ebp - 0x10], 0
jmp 0x401637
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
add eax, edx
movzx ecx, byte [eax]
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 0x10]
add eax, edx
movzx eax, byte [eax]
xor eax, ecx
movsx eax, al
cmp dword [ebp - 0x10], eax
jne 0x401633
add dword [ebp - 0xc], 1
add dword [ebp - 0x10], 1
lea eax, [ebp - 0x20]
mov dword [esp], eax
call sym._strlen
mov edx, eax
mov eax, dword [ebp - 0x10]
cmp edx, eax
ja 0x40160f
lea eax, [ebp - 0x20]
mov dword [esp], eax
call sym._strlen
mov edx, eax
mov eax, dword [ebp - 0xc]
cmp edx, eax
sete al
movzx eax, al
add esp, 0x34
pop ebx
pop ebp
ret

Function at 0x401af0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x4063a0]
test esi, esi
jle 0x401c00
mov edi, dword [0x4063a4]
xor ebx, ebx
lea edx, [edi + 0xc]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x401b24
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x401ba5
add ebx, 1
add edx, 0x14
cmp ebx, esi
jne 0x401b10
mov dword [esp], eax
mov ebx, eax
call sym.___mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x401c27
mov eax, dword [0x4063a4]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call sym.__GetPEImageBase
add eax, dword [edi + 0xc]
mov edx, dword [0x4063a4]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401c07
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401b9e
sub eax, 4
and eax, 0xfffffffb
jne 0x401bb0
add dword [0x4063a0], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
add ebx, dword [0x4063a4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov dword [ebx + 4], eax
mov dword [ebx + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x401b9e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call sym.___report_error
lea esi, [esi]
xor esi, esi
jmp 0x401b2e
mov eax, dword [0x4063a4]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call sym.___report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call sym.___report_error
mov esi, esi
lea edi, [edi]
Function at 0x402060
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x4063b8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x4063b0]
sub esp, 4
test ebx, ebx
je 0x4020b5
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x4020ae
test esi, esi
je 0x4020ae
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x402090
mov dword [esp], 0x4063b8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x402760
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call sym.___acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call sym.___acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
nop
nop
nop
nop
nop
Function at 0x402a50
Capabilities:
Create process on windows
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
lea ecx, [ebp - 0xc]
call fcn.00416340
lea ecx, [ebp - 0x18]
call fcn.00416340
mov ebx, dword [ebp + 0xc]
xorps xmm0, xmm0
mov eax, dword [ebp + 0x10]
mov ecx, 0x740
movlpd qword [ebp - 0x48], xmm0
mov dword [ebp - 0x40], 0
movlpd qword [ebp - 0x34], xmm0
movlpd qword [ebp - 0x2c], xmm0
movlpd qword [ebp - 0x24], xmm0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x54], 0x3c
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x38], 0xa
test bl, 1
je 0x402ac0
mov ecx, 0x8740
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x50], ecx
test bl, 2
mov eax, str.runas
cmove eax, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
and ebx, 0x10000
jne 0x402ae0
or ecx, 0x100
mov dword [ebp - 0x50], ecx
mov eax, dword [0x434f0c]
push 5
push eax
mov dword [ebp - 0x4c], eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [ebp - 0x4c]
call dword [sym.imp.USER32.dll_BringWindowToTop]
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call fcn.00405e10
add esp, 8
lea ecx, [ebp - 0x18]
push eax
call fcn.004164b0
cmp dword [ebp - 8], 0
je 0x402b4a
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x402b6a
test ebx, ebx
jne 0x402b41
push 0xffffffffffffffff
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 1
push dword [ebp - 0x18]
call fcn.0041e4d9
push dword [ebp - 0xc]
call fcn.0041e4d9
add esp, 8
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor esi, esi
jmp 0x402b4f
Function at 0x403a00
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 8], esi
lea edi, [esi + 4]
mov dword [esi], 0x42ab40
mov ecx, edi
call fcn.00416340
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ebx, eax
test ebx, ebx
je 0x403a71
push edi
lea ecx, [ebp - 0x14]
call fcn.00416280
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
mov dword [ebp - 4], eax
cmp ebx, dword [edi + 8]
jbe 0x403a50
push ebx
mov ecx, edi
call fcn.00416c10
mov eax, dword [ebp - 4]
push esi
push eax
push dword [edi]
call fcn.0041fd04
push dword [ebp - 0x14]
mov esi, dword [edi]
call fcn.0041e4d9
add esp, 0x10
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, dword [ebp - 8]
mov ecx, dword [edi]
xor eax, eax
cmp word [ecx], ax
je 0x403a88
nop word [eax + eax]
inc eax
cmp word [ecx + eax*2], 0
jne 0x403a80
mov dword [edi + 4], eax
xor edx, edx
pop edi
mov word [ecx + eax*2], dx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x403aa0
Capabilities:
Set current directory

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 8], 0
mov dword [esi], 0x42ab40
je 0x403ab8
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push dword [esi + 4]
call fcn.0041e4d9
add esp, 4
pop esi
ret
Function at 0x404580
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.00416340
push edi
lea ecx, [ebp - 0x14]
call fcn.00416280
cmp dword [edi + 8], 2
mov esi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x14]
jae 0x4045b1
push 2
mov ecx, edi
call fcn.00416c10
push esi
push ebx
push dword [edi]
call fcn.0041fd04
push dword [ebp - 0x14]
mov esi, dword [edi]
call fcn.0041e4d9
add esp, 0x10
push esi
push 1
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ebx, eax
mov dword [edi + 4], 0
mov eax, dword [edi]
xor ecx, ecx
mov word [eax], cx
test ebx, ebx
je 0x404641
push edi
lea ecx, [ebp - 0x14]
inc ebx
call fcn.00416280
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
mov dword [ebp + 8], eax
cmp ebx, dword [edi + 8]
jbe 0x404607
push ebx
mov ecx, edi
call fcn.00416c10
mov eax, dword [ebp + 8]
push esi
push eax
push dword [edi]
call fcn.0041fd04
push dword [ebp - 0x14]
mov esi, dword [edi]
call fcn.0041e4d9
add esp, 0x10
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ecx, dword [edi]
xor eax, eax
cmp word [ecx], ax
je 0x404638
nop
inc eax
cmp word [ecx + eax*2], 0
jne 0x404630
xor edx, edx
mov dword [edi + 4], eax
mov word [ecx + eax*2], dx
mov eax, dword [edi + 4]
xor ebx, ebx
lea ecx, [eax + 0xf]
add eax, eax
mov dword [ebp + 8], ecx
mov dword [ebp - 8], eax
push edi
lea ecx, [ebp - 0x14]
call fcn.00416280
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
mov dword [ebp - 4], eax
cmp ecx, dword [edi + 8]
jbe 0x404676
push ecx
mov ecx, edi
call fcn.00416c10
mov eax, dword [ebp - 4]
push esi
push eax
push dword [edi]
call fcn.0041fd04
push dword [ebp - 0x14]
mov esi, dword [edi]
call fcn.0041e4d9
mov eax, dword [ebp - 8]
push ebx
push dword [ebp + 0xc]
add eax, esi
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [edi]
xor eax, eax
add esp, 0x1c
cmp word [ecx], ax
je 0x4046ad
inc eax
cmp word [ecx + eax*2], 0
jne 0x4046a5
xor edx, edx
mov dword [edi + 4], eax
mov word [ecx + eax*2], dx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4046cc
inc ebx
cmp ebx, 0xfff
jl 0x404651
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4046e0
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0xc]
push edi
call fcn.004162e0
push 0x42aba8
lea ecx, [ebp - 0xc]
call fcn.004167f0
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4047da
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push edi
lea ecx, [ebp - 0xc]
call fcn.004164b0
mov ecx, dword [ebp - 8]
cmp dword [ebp - 4], ecx
jne 0x404742
lea ecx, [ebp - 0xc]
call fcn.00416a50
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov edx, 0x5c
mov word [eax + ecx*2], dx
inc ecx
xor edx, edx
mov word [eax + ecx*2], dx
lea eax, [ebp - 0x230]
mov dword [ebp - 8], ecx
lea ecx, [ebp - 0xc]
push eax
call fcn.004167f0
test byte [ebp - 0x25c], 0x10
je 0x4047a1
push 0x42abb0
lea eax, [ebp - 0x230]
push eax
call esi
test eax, eax
je 0x4047bd
push 0x42abb4
lea eax, [ebp - 0x230]
push eax
call esi
test eax, eax
je 0x4047bd
push dword [ebp - 0xc]
call fcn.004046e0
add esp, 4
jmp 0x4047b9
push 0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x404817
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x404817
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x404726
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [0x434f78]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x404817
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x404817
push dword [ebp - 0xc]
mov esi, 1
call fcn.0041e4d9
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 0xc]
xor esi, esi
call fcn.0041e4d9
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x404830
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
cmp dword [0x435094], 0
push esi
jne 0x404897
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x250]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x404897
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test byte [ebp - 0x250], 0x10
jne 0x404889
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x404882
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push esi
call fcn.004046e0
add esp, 4
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4048b0
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
cmp dword [0x435094], 0
push esi
jne 0x404937
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x250]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x404937
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test byte [ebp - 0x250], 0x10
jne 0x4048ff
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40490c
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x404908
push esi
call fcn.004046e0
add esp, 4
test eax, eax
jne 0x404937
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x40491c
cmp eax, 0x20
jne 0x40492f
test byte [0x434f54], 8
je 0x40492f
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x404940
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
lea ecx, [ebp - 0xc]
call fcn.00416340
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x18]
call fcn.00416280
cmp dword [ebp - 4], 1
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
jae 0x404973
push 1
lea ecx, [ebp - 0xc]
call fcn.00416c10
push esi
push edi
push dword [ebp - 0xc]
call fcn.0041fd04
push dword [ebp - 0x18]
mov esi, dword [ebp - 0xc]
call fcn.0041e4d9
mov ebx, dword [ebp + 8]
add esp, 0x10
push 1
push esi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x404a0e
lea edi, [eax + 1]
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x18]
call fcn.00416280
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
mov dword [ebp + 8], eax
cmp edi, dword [ebp - 4]
jbe 0x4049c6
push edi
lea ecx, [ebp - 0xc]
call fcn.00416c10
mov eax, dword [ebp + 8]
push esi
push eax
push dword [ebp - 0xc]
call fcn.0041fd04
push dword [ebp - 0x18]
mov esi, dword [ebp - 0xc]
call fcn.0041e4d9
add esp, 0x10
push edi
push esi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edx, dword [ebp - 0xc]
xor eax, eax
cmp word [edx], ax
je 0x4049fa
inc eax
cmp word [edx + eax*2], 0
jne 0x4049f2
xor ecx, ecx
mov dword [ebp - 8], eax
mov word [edx + eax*2], cx
lea eax, [ebp - 0xc]
push eax
mov ecx, ebx
call fcn.00416440
push dword [ebp - 0xc]
call fcn.0041e4d9
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret