joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403580
Capabilities:
Create directory

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x18]
push ebx
push edi
push esi
call fcn.004034f0
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4035a8
mov byte [esi], al
pop edi
pop esi
pop ebp
pop ebx
ret
add ebp, 9
cmp ebp, edi
jb 0x4035b9
mov byte [esi], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push str.Profiles
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
test bl, bl
je 0x403600
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push esi
call fcn.004068b0
add esp, 8
test eax, eax
je 0x403600
push 0
push esi
call edi
test eax, eax
jne 0x4035d5
call ebx
cmp eax, 0xb7
je 0x4035d5
mov byte [esi], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
ret

Function at 0x403610
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 0x10]
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
push eax
push ebx
push esi
call fcn.00403580
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x403638
mov byte [esi], al
pop edi
pop esi
pop ebp
pop ebx
ret
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [edi + eax + 1]
cmp edi, ebx
mov dword [esp + 0x1c], edi
jb 0x403659
mov byte [esi], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x40f030
push esi
call edi
push ebp
push esi
call edi
mov al, byte [esp + 0x20]
test al, al
je 0x4036aa
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push esi
call fcn.004068b0
add esp, 8
test eax, eax
je 0x4036aa
push 0
push esi
call edi
test eax, eax
jne 0x40367f
call ebx
cmp eax, 0xb7
je 0x40367f
mov byte [esi], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x4036c0
Capabilities:
Create directory
Get session user name

Disassembly:
sub esp, 0x108
mov eax, dword [esp + 0x10c]
push ebx
mov ebx, dword [esp + 0x11c]
push ebp
push esi
mov esi, dword [esp + 0x11c]
push edi
mov edi, dword [esp + 0x124]
push ebx
push edi
push esi
push eax
call fcn.00403610
mov ebp, eax
add esp, 0x10
test ebp, ebp
jne 0x403705
mov byte [esi], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push edx
mov dword [esp + 0x18], 0x101
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x403739
lea eax, [esp + 0x14]
push str.DfltUser
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [esp + 0x10], 9
add ebp, dword [esp + 0x10]
cmp ebp, edi
jb 0x403751
mov byte [esi], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x40f030
push esi
call edi
lea ecx, [esp + 0x14]
push ecx
push esi
call edi
test bl, bl
je 0x4037a8
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push esi
call fcn.004068b0
add esp, 8
test eax, eax
je 0x4037a8
push 0
push esi
call edi
test eax, eax
jne 0x403777
call ebx
cmp eax, 0xb7
je 0x403777
mov byte [esi], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
Function at 0x4037c0
Capabilities:
Create directory

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x1c]
push edi
push eax
push ecx
push esi
push ebp
call fcn.004036c0
add esp, 0x10
mov dword [esp + 0x20], eax
test eax, eax
jne 0x4037f5
mov byte [esi], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 0x2c
push eax
call fcn.00406310
add esp, 4
mov ebx, eax
mov dword [esp + 0x10], 0x100
push 0x100
call fcn.00406310
add esp, 4
mov dword [esp + 0x1c], eax
push str.SOFTWARETimeSink__Inc.AdGatewayChannels
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x40f030
push ebx
call edi
push ebp
push ebx
call edi
mov ebp, dword [esp + 0x1c]
lea edx, [esp + 0x14]
lea eax, [esp + 0x10]
push edx
push eax
push ebp
push str.ChannelID
push ebx
push 0x80000002
call fcn.00402ee0
add esp, 0x18
test al, al
je 0x4038ec
cmp byte [ebp], 0
je 0x4038ec
inc ebp
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x20]
lea eax, [ecx + eax + 1]
mov ecx, dword [esp + 0x24]
cmp eax, ecx
mov dword [esp + 0x20], eax
jb 0x40389a
mov byte [esi], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push 0x40f030
push esi
call edi
push ebp
push esi
call edi
mov al, byte [esp + 0x28]
test al, al
je 0x4038e8
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push esi
call fcn.004068b0
add esp, 8
test eax, eax
je 0x4038e8
push 0
push esi
call edi
test eax, eax
jne 0x4038ba
call ebp
cmp eax, 0xb7
je 0x4038ba
mov byte [esi], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov ebp, dword [esp + 0x1c]
push ebp
call fcn.004060e0
add esp, 4
push ebx
call fcn.004060e0
mov eax, dword [esp + 0x24]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x404710
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.00406900
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, 7
jbe 0x404762
mov byte [esp + 0x1b], al
lea ecx, [esp + 0x114]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x404799
push 0x30
push str.Error
push str.Unable_to_find_system_temporary_file_folder
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._sd__x_s
push edx
call fcn.00406840
add esp, 0x14
lea eax, [esp + 0x114]
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4047fb
lea ecx, [esp + 0x114]
lea edx, [esp + 0x818]
push ecx
push str.Unable_to_save_installation_to___s_
push edx
call fcn.00406840
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0xa0c
ret
mov eax, dword [esp + 0xa20]
lea ecx, [esp + 0x114]
push eax
push ecx
lea edx, [esp + 0x320]
push str._s__delete___s_
push edx
call fcn.00406840
add esp, 0x10
lea eax, [esp + 0x14]
lea ecx, [esp + 0x618]
push esi
push eax
push str._sd__x
push ecx
call fcn.00406840
add esp, 0x10
lea edx, [esp + 0xc]
push edx
push 0x20006
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnce
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40489d
cmp eax, 5
push 0x10
push str.Error
jne 0x404883
push str.Unable_to_open_registry_key_for_DLL_deletion_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_deletion.
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
mov edx, dword [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x318]
push ecx
push eax
push 1
lea ecx, [esp + 0x624]
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x4048ff
push 0x10
push str.Error
push str.Unable_to_insert_registry_key_for_DLL_deletion.
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 0x404910
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.00406900
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 0x404962
mov byte [esp + 0x1c], al
lea ecx, [esp + 0x114]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x404999
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.00406840
add esp, 0x14
lea eax, [esp + 0x114]
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4049fb
lea ecx, [esp + 0x114]
lea edx, [esp + 0x818]
push ecx
push str.Unable_to_save_to___s_
push edx
call fcn.00406840
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.00406840
add esp, 0xc
lea edx, [esp + 0x14]
lea eax, [esp + 0x618]
push esi
push edx
push str._s__x
push eax
call fcn.00406840
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 0x404a95
cmp eax, 5
push 0x10
push str.Error
jne 0x404a7b
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 0x404af6
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 0x404b10
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 0x404b46
call edi
and eax, 0x7f
add eax, 0x80
push eax
call ebx
inc esi
cmp esi, 5
jl 0x404b22
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
ret

Function at 0x404b50
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.004037c0
add esp, 0x10
test eax, eax
jne 0x404b8a
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.00406840
mov ecx, dword [ebp + 0x24]
add esp, 0xc
lea edx, [esp + 0x114]
push ecx
push str._sDone.idx
push edx
call fcn.00406840
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 0x404bf0
push 0x137
call edi
inc esi
cmp esi, 4
jl 0x404bcb
cmp esi, 4
jl 0x404c02
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.00406840
mov ecx, dword [ebp + 0x24]
add esp, 0xc
lea edx, [esp + 0x114]
push ecx
push str._sDone.cdb
push edx
call fcn.00406840
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 0x404c5c
push 0x137
call edi
inc esi
cmp esi, 4
jl 0x404c37
cmp esi, 4
jl 0x404c6e
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.004034f0
add esp, 0xc
test eax, eax
jne 0x404c93
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.00406840
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x10]
push edx
push str._sAds
push eax
call fcn.00406840
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x114]
push ecx
push edx
call fcn.00404cf0
add esp, 8
test al, al
pop edi
pop esi
pop ebp
pop ebx
setne al
add esp, 0x30c
ret
Function at 0x404cf0
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.004068b0
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
test eax, eax
je 0x404d5d
call fcn.00406db0
cmp dword [eax], 2
je 0x404d2d
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 0x404d4b
push 0xf7
call ebp
inc esi
cmp esi, 4
jl 0x404d35
cmp esi, 4
jl 0x404d5d
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.00406840
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 0x404da3
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 0x404e79
cmp byte [esp + 0x40], 0x2e
je 0x404e79
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.00406840
add esp, 0x10
lea ecx, [esp + 0x154]
push ecx
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x404e92
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.00406840
mov edx, esi
add esp, 0x10
and edx, 0x10
cmp dl, 0x10
jne 0x404e49
lea eax, [esp + 0x258]
lea ecx, [esp + 0x154]
push eax
push ecx
call fcn.00404cf0
add esp, 8
test al, al
je 0x404e92
jmp 0x404e79
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 0x404e74
push 0xf7
call ebp
inc esi
cmp esi, 4
jl 0x404e4b
cmp esi, 4
jge 0x404e92
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x404e9f
jmp 0x404da9
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 0x404f00
Capabilities:
Get common file path

Disassembly:
mov eax, dword [ecx + 0x10]
sub esp, 0x124
test ah, 1
push ebx
push esi
push edi
je 0x404f81
mov ebx, dword [esp + 0x134]
mov eax, dword [esp + 0x138]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ecx, dword [0x412da8]
lea edx, [esp + 0x10]
push ecx
push 0x40f480
push edx
call fcn.00406840
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
pop edi
pop esi
pop ebx
add esp, 0x124
ret 8
test al, 1
je 0x404fe3
mov eax, dword [esp + 0x138]
mov edi, dword [esp + 0x134]
push eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
lea ecx, [esp + 0x34]
push 0
lea edx, [esp + 0x14]
push ecx
push edx
push edi
call fcn.00406900
add esp, 0x14
lea eax, [esp + 0x30]
lea ecx, [esp + 0xc]
push 0
push 0
push eax
push ecx
push edi
call fcn.00406dd0
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
pop edi
pop esi
pop ebx
add esp, 0x124
ret 8
test al, 2
je 0x405009
mov edx, dword [esp + 0x138]
mov eax, dword [esp + 0x134]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
pop edi
pop esi
pop ebx
add esp, 0x124
ret 8
test al, 4
je 0x40502f
mov ecx, dword [esp + 0x138]
mov edx, dword [esp + 0x134]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
pop edi
pop esi
pop ebx
add esp, 0x124
ret 8
test al, 8
je 0x405059
mov eax, dword [esp + 0x138]
mov ecx, dword [esp + 0x134]
push 1
push eax
push ecx
call fcn.004034f0
add esp, 0xc
pop edi
pop esi
pop ebx
add esp, 0x124
ret 8
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x124
ret 8
Function at 0x405170
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 0x405191
mov eax, dword [esi + 0x30]
test eax, eax
je 0x405191
mov eax, dword [esi + 0x3c]
test eax, eax
jne 0x4052d5
mov ecx, esi
call fcn.00405860
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 0x4051cc
mov ecx, esi
call fcn.00405860
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 0x4051ef
mov ecx, esi
call fcn.00405860
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 0x405254
cmp eax, 0x31495354
je 0x405254
cmp eax, 0x32495354
je 0x405254
cmp eax, 0x33495354
je 0x405254
cmp eax, 0x34495354
je 0x405254
mov ecx, esi
call fcn.00405860
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 0x4052a4
mov ecx, esi
call fcn.00405860
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 0x4052cc
mov ecx, esi
call fcn.00405860
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 0x4055a0
Capabilities:
Check if file exists
Create directory
Get file attributes
Write file on windows

Disassembly:
sub esp, 0x21c
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov eax, dword [edi + 0x18]
mov esi, dword [edi + 0x38]
cmp eax, ebx
jbe 0x4056fc
mov ecx, dword [edi + 0x1c]
lea eax, [esp + 0x24]
push 0x104
push eax
add ecx, ebx
call fcn.00405070
lea ecx, [esp + 0x128]
push 0x104
push ecx
mov ecx, dword [edi + 0x1c]
add ecx, ebx
call fcn.00404f00
lea edx, [esp + 0x128]
push 0
push edx
call fcn.004068b0
add esp, 8
test eax, eax
je 0x405619
lea eax, [esp + 0x128]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x405719
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 + 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405664
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 0x4056e5
jl 0x405664
cmp eax, dword [ecx]
jae 0x4056e5
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x14], 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 0x4056bf
push 0xfb
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 4
mov dword [esp + 0x14], eax
jl 0x405682
cmp esi, esi
je 0x4056e1
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 + 0x10]
mov eax, dword [esp + 0x18]
mov ecx, dword [edi + 0x18]
inc eax
add ebx, 0x20
cmp eax, ecx
mov dword [esp + 0x18], eax
jb 0x4055c0
cmp dword [edi + 0x28], 0x30495354
je 0x405726
mov eax, dword [edi + 0x40]
test eax, eax
jbe 0x405726
push eax
push esi
mov ecx, edi
call fcn.004058b0
test eax, eax
jne 0x405726
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x21c
ret
Function at 0x4057d0
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 0x40583e
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 0x405834
lea edx, [esp + 0x14]
push 0x104
push edx
call fcn.00405070
lea eax, [esp + 0x14]
push 0
push eax
call fcn.004068b0
add esp, 8
test eax, eax
jne 0x405834
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x405834
mov byte [esp + 0x13], al
mov eax, dword [esi + 0x18]
inc ebp
add edi, ebx
cmp ebp, eax
jb 0x4057f1
mov edx, dword [esi + 0x24]
mov ecx, esi
push edx
call fcn.00405e70
test al, al
jne 0x405851
mov byte [esp + 0x13], al
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret