joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404390
Capabilities:
Copy file
Get common file path
Persist via run registry key
Set registry value

Disassembly:
sub esp, 0xa0c
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [esp + 0xa1c]
mov esi, eax
lea eax, [esp + 0x218]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x51c]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
push ebx
call fcn.00406190
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 8
jbe 0x4043e2
mov byte [esp + 0x1c], al
lea ecx, [esp + 0x114]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x404419
push 0x30
push str.Error
push str.Unable_to_find_system_temporary_file_directory
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0xa0c
ret
lea edx, [esp + 0x218]
lea ecx, [esp + 0x14]
push edx
push esi
push ecx
lea edx, [esp + eax + 0x120]
push str._s__x_s
push edx
call fcn.00406120
add esp, 0x14
lea eax, [esp + 0x114]
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40447b
lea ecx, [esp + 0x114]
lea edx, [esp + 0x818]
push ecx
push str.Unable_to_save_to___s_
push edx
call fcn.00406120
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0xa0c
ret
lea eax, [esp + 0x114]
lea ecx, [esp + 0x318]
push eax
push str._s__bootinst
push ecx
call fcn.00406120
add esp, 0xc
lea edx, [esp + 0x14]
lea eax, [esp + 0x618]
push esi
push edx
push str._s__x
push eax
call fcn.00406120
add esp, 0x10
lea ecx, [esp + 0xc]
push ecx
push 0x20006
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnce
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x404515
cmp eax, 5
push 0x10
push str.Error
jne 0x4044fb
push str.Unable_to_open_registry_key_for_DLL_installation_on_reboot._Administrator_privileges_required.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
add esp, 0xa0c
ret
push str.Unable_to_open_registry_key_for_DLL_installation.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0xa0c
ret
lea edi, [esp + 0x318]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x318]
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x10]
push edx
push 1
push eax
lea eax, [esp + 0x628]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0xc]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x404576
push 0x10
push str.Error
push str.Unable_to_insert_registry_key_for_DLL_installation.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0xa0c
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xa0c
ret
Function at 0x404590
Capabilities:
Delete file

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, esi
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, eax
test ebp, ebp
jne 0x4045c6
call edi
and eax, 0x7f
add eax, 0x80
push eax
call ebx
inc esi
cmp esi, 5
jl 0x4045a2
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
ret

Function at 0x4045d0
Capabilities:
Copy file

Disassembly:
sub esp, 0x30c
lea eax, [esp]
push ebx
push ebp
mov ebp, dword [esp + 0x318]
push esi
push edi
push 1
mov ecx, dword [ebp + 4]
push 0x104
push eax
push ecx
call fcn.004037b0
add esp, 0x10
test eax, eax
jne 0x40460a
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30c
ret
lea edx, [esp + 0x10]
lea eax, [esp + 0x218]
push edx
push str._sDone.idx
push eax
call fcn.00406120
mov ecx, dword [ebp + 0x24]
add esp, 0xc
lea edx, [esp + 0x114]
push ecx
push str._sDone.idx
push edx
call fcn.00406120
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0xc
xor esi, esi
lea eax, [esp + 0x218]
push 0
lea ecx, [esp + 0x118]
push eax
push ecx
call ebx
test eax, eax
jne 0x404670
push 0x137
call edi
inc esi
cmp esi, 4
jl 0x40464b
cmp esi, 4
jl 0x404682
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30c
ret
lea edx, [esp + 0x10]
lea eax, [esp + 0x218]
push edx
push str._sDone.cdb
push eax
call fcn.00406120
mov ecx, dword [ebp + 0x24]
add esp, 0xc
lea edx, [esp + 0x114]
push ecx
push str._sDone.cdb
push edx
call fcn.00406120
add esp, 0xc
xor esi, esi
lea eax, [esp + 0x218]
push 0
lea ecx, [esp + 0x118]
push eax
push ecx
call ebx
test eax, eax
jne 0x4046dc
push 0x137
call edi
inc esi
cmp esi, 4
jl 0x4046b7
cmp esi, 4
jl 0x4046ee
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30c
ret
push 1
lea edx, [esp + 0x14]
push 0x104
push edx
call fcn.004034e0
add esp, 0xc
test eax, eax
jne 0x404713
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30c
ret
mov eax, dword [ebp + 0x24]
lea ecx, [esp + 0x114]
push eax
push str._sAds
push ecx
call fcn.00406120
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x10]
push edx
push str._sAds
push eax
call fcn.00406120
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x114]
push ecx
push edx
call fcn.00404770
add esp, 8
test al, al
pop edi
pop esi
pop ebp
pop ebx
setne al
add esp, 0x30c
ret
Function at 0x404770
Capabilities:
Check if file exists
Copy file
Create directory
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
sub esp, 0x450
push ebx
mov ebx, dword [esp + 0x45c]
push ebp
push esi
push edi
push 6
push ebx
call fcn.004064f0
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
test eax, eax
je 0x4047dd
call fcn.004064d0
cmp dword [eax], 2
je 0x4047ad
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
xor esi, esi
push 0
push ebx
call edi
test eax, eax
jne 0x4047cb
push 0xf7
call ebp
inc esi
cmp esi, 4
jl 0x4047b5
cmp esi, 4
jl 0x4047dd
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret
mov eax, dword [esp + 0x464]
lea ecx, [esp + 0x35c]
push eax
push str._s.
push ecx
call fcn.00406120
add esp, 0xc
lea edx, [esp + 0x14]
lea eax, [esp + 0x35c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x404823
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea edi, [esp + 0x40]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4048f9
cmp byte [esp + 0x40], 0x2e
je 0x4048f9
mov edx, dword [esp + 0x464]
lea ecx, [esp + 0x40]
push ecx
push edx
lea eax, [esp + 0x15c]
push str._s_s
push eax
call fcn.00406120
add esp, 0x10
lea ecx, [esp + 0x154]
push ecx
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x404912
mov eax, dword [esp + 0x468]
lea edx, [esp + 0x40]
push edx
push eax
lea ecx, [esp + 0x260]
push str._s_s
push ecx
call fcn.00406120
mov edx, esi
add esp, 0x10
and edx, 0x10
cmp dl, 0x10
jne 0x4048c9
lea eax, [esp + 0x258]
lea ecx, [esp + 0x154]
push eax
push ecx
call fcn.00404770
add esp, 8
test al, al
je 0x404912
jmp 0x4048f9
xor esi, esi
lea edx, [esp + 0x258]
push 0
lea eax, [esp + 0x158]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4048f4
push 0xf7
call ebp
inc esi
cmp esi, 4
jl 0x4048cb
cmp esi, 4
jge 0x404912
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x40491f
jmp 0x404829
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x450
ret
Function at 0x404930
Capabilities:
Get common file path

Disassembly:
mov eax, dword [ecx + 0x10]
sub esp, 0x104
test ah, 1
push edi
je 0x40495f
mov eax, dword [esp + 0x10c]
mov ecx, dword [esp + 0x110]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
pop edi
add esp, 0x104
ret 8
test al, 1
je 0x4049bf
mov edx, dword [esp + 0x110]
mov edi, dword [esp + 0x10c]
push edx
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
lea eax, [esp + 0xc]
push 0
lea ecx, [esp + 0xc]
push eax
push ecx
push edi
call fcn.00406190
add esp, 0x14
lea edx, [esp + 8]
lea eax, [esp + 4]
push 0
push 0
push edx
push eax
push edi
call fcn.00406540
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
pop edi
add esp, 0x104
ret 8
test al, 2
je 0x4049e3
mov ecx, dword [esp + 0x110]
mov edx, dword [esp + 0x10c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
pop edi
add esp, 0x104
ret 8
test al, 4
je 0x404a07
mov eax, dword [esp + 0x110]
mov ecx, dword [esp + 0x10c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
pop edi
add esp, 0x104
ret 8
test al, 8
je 0x404a2f
mov edx, dword [esp + 0x110]
mov eax, dword [esp + 0x10c]
push 1
push edx
push eax
call fcn.004034e0
add esp, 0xc
pop edi
add esp, 0x104
ret 8
xor eax, eax
pop edi
add esp, 0x104
ret 8
Function at 0x404b40
Capabilities:
Get file size
Read file on windows
Read file via mapping

Disassembly:
sub esp, 0xc
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x404b61
mov eax, dword [esi + 0x30]
test eax, eax
je 0x404b61
mov eax, dword [esi + 0x3c]
test eax, eax
jne 0x404c97
mov ecx, esi
call fcn.00405140
mov eax, dword [esp + 0x1c]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x2c], eax
jne 0x404b9c
mov ecx, esi
call fcn.00405140
xor al, al
pop edi
pop esi
pop ebx
add esp, 0xc
ret 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esi + 0x48], eax
jne 0x404bbf
mov ecx, esi
call fcn.00405140
xor al, al
pop edi
pop esi
pop ebx
add esp, 0xc
ret 4
mov ecx, dword [esi + 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push 0
push 0xfffffffffffffff8
push ecx
call edi
mov ecx, dword [esi + 0x2c]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x14]
push 4
push eax
push ecx
call ebx
mov eax, dword [esp + 0xc]
cmp eax, 0x30495354
je 0x404c16
cmp eax, 0x31495354
je 0x404c16
cmp eax, 0x32495354
je 0x404c16
mov ecx, esi
call fcn.00405140
xor al, al
pop edi
pop esi
pop ebx
add esp, 0xc
ret 4
mov ecx, dword [esi + 0x2c]
lea edx, [esp + 0x10]
mov dword [esi + 0x28], eax
push 0
push edx
lea eax, [esp + 0x1c]
push 4
push eax
push ecx
call ebx
mov edx, dword [esi + 0x2c]
push 0
push 0
push 0
push edx
call edi
mov eax, dword [esi + 0x2c]
push 0
push 0
push 0
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [esi + 0x30], eax
jne 0x404c66
mov ecx, esi
call fcn.00405140
xor al, al
pop edi
pop esi
pop ebx
add esp, 0xc
ret 4
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
mov dword [esi + 0x3c], eax
jne 0x404c8e
mov ecx, esi
call fcn.00405140
xor al, al
pop edi
pop esi
pop ebx
add esp, 0xc
ret 4
mov ecx, dword [esp + 0x14]
add ecx, eax
mov dword [esi + 0x34], ecx
pop edi
pop esi
mov al, 1
pop ebx
add esp, 0xc
ret 4
Function at 0x404ed0
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
sub esp, 0x118
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [esp + 0x10], ebx
mov eax, dword [edi + 0x18]
mov esi, dword [edi + 0x38]
cmp eax, ebx
jbe 0x404fe7
mov ecx, dword [edi + 0x1c]
lea eax, [esp + 0x24]
push 0x104
push eax
add ecx, ebx
call fcn.00404a40
mov ecx, dword [edi + 0x1c]
mov dword [esp + 0x1c], esi
lea edx, [esp + 0x24]
mov eax, dword [ecx + ebx + 0xc]
push edx
add esi, eax
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404f4f
lea eax, [esp + 0x24]
push eax
call fcn.00401220
mov ecx, dword [edi + 0x1c]
add esp, 4
mov ebp, dword [ecx + ebx + 0x1c]
lea ecx, [ecx + ebx + 0x18]
cmp edx, ebp
jg 0x404fd0
jl 0x404f4f
cmp eax, dword [ecx]
jae 0x404fd0
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x18], 0
mov eax, dword [edx + ebx + 0x10]
and al, 0x80
neg al
sbb eax, eax
and al, 0x82
add eax, 0x80
mov ebp, eax
push 0
push ebp
push 2
push 0
push 0
lea ecx, [esp + 0x38]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x404faa
push 0xfb
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x18]
inc eax
cmp eax, 4
mov dword [esp + 0x18], eax
jl 0x404f6d
cmp esi, esi
je 0x404fcc
mov eax, dword [edi + 0x1c]
lea edx, [esp + 0x20]
push 0
push edx
mov ecx, dword [eax + ebx + 0xc]
mov edx, dword [esp + 0x24]
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [edi + 0x18]
inc eax
add ebx, 0x20
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x404ef0
cmp dword [edi + 0x28], 0x30495354
je 0x405011
mov eax, dword [edi + 0x40]
test eax, eax
jbe 0x405011
push eax
push esi
mov ecx, edi
call fcn.00405190
test eax, eax
jne 0x405011
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x118
ret

Function at 0x4050b0
Capabilities:
Delete file

Disassembly:
sub esp, 0x108
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push edi
mov eax, dword [esi + 0x18]
mov byte [esp + 0x13], 1
test eax, eax
jbe 0x40511e
xor edi, edi
mov ebx, 0x20
mov eax, dword [esi + 0x1c]
lea ecx, [eax + edi]
mov al, byte [eax + edi + 0x10]
test bl, al
je 0x405114
lea edx, [esp + 0x14]
push 0x104
push edx
call fcn.00404a40
lea eax, [esp + 0x14]
push 0
push eax
call fcn.004064f0
add esp, 8
test eax, eax
jne 0x405114
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x405114
mov byte [esp + 0x13], al
mov eax, dword [esi + 0x18]
inc ebp
add edi, ebx
cmp ebp, eax
jb 0x4050d1
mov edx, dword [esi + 0x24]
mov ecx, esi
push edx
call fcn.00405750
test al, al
jne 0x405131
mov byte [esp + 0x13], al
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
Function at 0x4054d0
Capabilities:
Create directory
Delete file
Write file on windows

Disassembly:
sub esp, 0x118
push ebx
push ebp
push esi
mov esi, dword [esp + 0x128]
mov ebx, ecx
push edi
test esi, esi
mov dword [esp + 0x10], ebx
je 0x40563e
mov edi, dword [esi]
mov ecx, dword [ebx + 0x24]
mov eax, dword [esi + 4]
add esi, 4
push edi
push ecx
lea edx, [esp + 0x2c]
push str._sAds_lu
push edx
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], eax
add esi, 4
mov dword [esp + 0x28], 0
call fcn.00406120
add esp, 0x10
lea eax, [esp + 0x24]
push 6
push eax
call fcn.004064f0
add esp, 8
test eax, eax
je 0x405579
call fcn.004064d0
cmp dword [eax], 2
jne 0x40563e
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
xor edi, edi
lea ecx, [esp + 0x24]
push 0
push ecx
call ebx
test eax, eax
jne 0x405568
push 0xf7
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 4
jl 0x40554a
cmp edi, 4
jge 0x40563e
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov eax, dword [ebx + 0x24]
mov edx, dword [esi]
push edi
push eax
lea ecx, [esp + 0x2c]
push str._sAds_lu_rc
push ecx
mov dword [esp + 0x2c], edx
add esi, 4
call fcn.00406120
add esp, 0x10
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
xor ebx, ebx
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
lea eax, [esp + 0x38]
push 0x40000000
push eax
call ebp
mov edi, eax
cmp edi, 0xffffffff
jne 0x4055dd
push 0x1ff
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 4
jl 0x4055ac
cmp ebx, 4
jge 0x40563e
mov ebx, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push 0
push ecx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x40563e
cmp dword [esp + 0x18], ebx
jne 0x40563e
add esi, ebx
mov ebx, dword [esp + 0x20]
xor edi, edi
test ebx, ebx
jbe 0x40562f
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push edx
push esi
call fcn.00405650
mov esi, eax
test esi, esi
je 0x40563e
inc edi
cmp edi, ebx
jb 0x405615
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x118
ret 4
Function at 0x405650
Capabilities:
Delete file
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x10c
test edx, edx
push ebx
push ebp
push esi
push edi
mov ebx, ecx
je 0x405732
mov esi, dword [esp + 0x124]
test esi, esi
jbe 0x405732
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
push edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push esi
mov dword [esp + 0x18], 0
mov eax, dword [edx + ecx + 1]
lea ebp, [edx + ecx + 1]
mov ecx, dword [ebx + 0x24]
lea edx, [esp + 0x20]
push ecx
push str._sAds_lu_s
push edx
mov dword [esp + 0x28], eax
add ebp, 4
call fcn.00406120
add esp, 0x14
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
xor edi, edi
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
lea ecx, [esp + 0x2c]
push 0x40000000
push ecx
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x4056f6
push 0x1ff
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 4
jl 0x4056c5
cmp edi, 4
jge 0x405732
mov ebx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push 0
push edx
push ebx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x405732
cmp dword [esp + 0x10], ebx
jne 0x405732
lea eax, [ebx + ebp]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret 8

Function at 0x405750
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x350
push ebx
mov ebx, dword [esp + 0x358]
push ebp
push esi
push edi
push ebx
lea eax, [esp + 0x260]
push str._s.
mov dword [esp + 0x18], ecx
push eax
call fcn.00406120
add esp, 0xc
lea ecx, [esp + 0x11c]
lea edx, [esp + 0x25c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x14], esi
je 0x405861
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
lea edi, [esp + 0x148]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x405837
cmp byte [esp + 0x148], 0x2e
je 0x405837
lea eax, [esp + 0x148]
lea ecx, [esp + 0x18]
push eax
push ebx
push str._s_s
push ecx
call fcn.00406120
add esp, 0x10
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405861
and eax, 0x10
cmp al, 0x10
jne 0x405805
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
call fcn.00405750
jmp 0x405837
lea ecx, [esp + 0x18]
push pe_nt_image_headers32
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor esi, esi
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x405833
push 0xf7
call ebp
inc esi
cmp esi, 4
jl 0x405817
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x11c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4057a6
push pe_nt_image_headers32
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x350
ret 4
Function at 0x405870
Capabilities:
Copy file

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
push 0
push edi
mov dword [esp + 0x18], 0
call fcn.004064f0
mov ebp, dword [esp + 0x24]
mov ebx, eax
add esp, 8
neg ebx
sbb ebx, ebx
push 0
push ebp
inc ebx
call fcn.004064f0
add esp, 8
neg eax
sbb eax, eax
inc eax
test bl, bl
jne 0x4058bd
mov dword [esp + 0x10], 0xffffffff
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test al, al
jne 0x4058fe
xor ebx, ebx
push 0
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov esi, eax
test esi, esi
jne 0x40595f
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 6
jl 0x4058c3
test esi, esi
jne 0x40595f
mov dword [esp + 0x10], 0xffffffff
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push ebp
call fcn.00401220
add esp, 4
mov ebx, eax
mov esi, edx
push edi
call fcn.00401220
add esp, 4
cmp edx, esi
jl 0x405957
jg 0x40591e
cmp eax, ebx
jbe 0x405957
xor ebx, ebx
push 0
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov esi, eax
test esi, esi
jne 0x40595f
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 6
jl 0x405920
test esi, esi
jne 0x40595f
mov dword [esp + 0x10], 0xffffffff
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

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

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x406513
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00406450
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x406538
test byte [esp + 8], 2
je 0x406538
call fcn.004064d0
mov dword [eax], 0xd
call fcn.004064e0
mov dword [eax], 5
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x4065e0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d038
push 0x409ab8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x411dd0], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x411dcc], ecx
shl ecx, 8
add ecx, edx
mov dword [0x411dc8], ecx
shr eax, 0x10
mov dword [0x411dc4], eax
call fcn.004067c0
test eax, eax
jne 0x40664a
push 0x1c
call fcn.00406790
add esp, 4
call fcn.00407c10
test eax, eax
jne 0x40665d
push 0x10
call fcn.00406790
add esp, 4
mov dword [ebp - 4], 0
call fcn.004098a0
call fcn.00408e30
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4131dc], eax
call fcn.00409740
mov dword [0x411bf8], eax
test eax, eax
je 0x406690
mov eax, dword [0x4131dc]
test eax, eax
jne 0x40669a
push 0xffffffffffffffff
call fcn.00408fb0
add esp, 4
call fcn.00409490
call fcn.004093a0
call fcn.00408f80
mov esi, dword [0x4131dc]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x406779
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x4066e1
test al, al
je 0x4066e1
and eax, 0xff
push eax
call fcn.00409340
add esp, 4
test eax, eax
je 0x4066bb
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4066bb
cmp byte [esi], 0x22
jne 0x4066ea
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x4066fa
cmp al, 0x20
ja 0x4066fa
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4066ea
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x40671b
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x406720
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.00408fb0
jmp 0x40675e
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x4066ea
inc esi
mov dword [ebp - 0x64], esi
jmp 0x406779

Function at 0x407c10
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.00406800
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x410b90], eax
je 0x407c68
push 0x74
push 1
call fcn.0040a580
mov esi, eax
add esp, 8
test esi, esi
je 0x407c68
mov eax, dword [0x410b90]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x407c68
push esi
call fcn.00407c70
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret