joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402f20
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44879a
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
push 0
mov dword [ebp - 0x18], esi
call fcn.004255f0
mov dword [ebp - 4], 0
mov dword [esi + 4], 0
mov byte [esi + 8], 0
mov dword [esi + 0xc], 0
mov byte [esi + 0x10], 0
xor eax, eax
mov dword [esi + 0x14], 0
mov word [esi + 0x18], ax
mov dword [esi + 0x1c], eax
mov word [esi + 0x20], ax
mov dword [esi + 0x24], eax
mov byte [esi + 0x28], al
mov dword [esi + 0x2c], eax
mov byte [esi + 0x30], al
mov byte [ebp - 4], 6
test edi, edi
jne 0x402fc6
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], str.bad_locale_name
push eax
lea ecx, [ebp - 0x24]
call fcn.0042990c
push 0x45bc58
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], vtable.std::runtime_error.0
push eax
call fcn.0042cb3b
push edi
push esi
call fcn.0042541f
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret 4

Function at 0x409cf0
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 0x228
mov edi, eax
mov dword [ebp - 0x230], 0x22c
lea eax, [ebp - 0x22c]
push 0
push eax
call fcn.0042ea00
add esp, 0xc
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
mov byte [ebp - 0x231], 0
lea eax, [ebp - 0x230]
xor ebx, ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x409d78
mov ebx, dword [sym.imp.KERNEL32.dll_Process32NextW]
jmp 0x409d60
cmp edi, dword [ebp - 0x228]
je 0x409d9b
lea eax, [ebp - 0x230]
push eax
push esi
call ebx
test eax, eax
jne 0x409d60
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x231], 0
jne 0x409daa
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x218]
mov byte [ebp - 0x231], 1
jmp 0x409d78
push ebx
push 0
push 0x100410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00428e73
mov esp, ebp
pop ebp
ret
Function at 0x409dd0
Capabilities:
Get process image filename

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor eax, eax
mov esi, edx
push 0x206
push eax
test cl, cl
je 0x409eab
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.0042ea00
add esp, 0xc
lea eax, [ebp - 0x414]
push 0x104
push eax
push 0
push esi
call dword [sym.imp.PSAPI.DLL_GetModuleFileNameExW]
test eax, eax
je 0x409f2e
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.0042ea00
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x414]
lea eax, [ebp - 0x20c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x409e8d
test dx, dx
je 0x409e89
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x409e8d
add eax, 4
add ecx, 4
test dx, dx
jne 0x409e67
xor eax, eax
jmp 0x409e92
sbb eax, eax
or eax, 1
test eax, eax
jne 0x409f2e
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.0042ea00
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
push esi
call dword [sym.imp.PSAPI.DLL_GetProcessImageFileNameW]
test eax, eax
je 0x409f2e
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov esi, eax
push str.WinZip.exe
push esi
call fcn.00429e27
add esp, 8
test eax, eax
je 0x409f1d
push str.WinZip32.exe
push esi
call fcn.00429e27
add esp, 8
test eax, eax
je 0x409f1d
push str.WinZip64.exe
push esi
call fcn.00429e27
add esp, 8
test eax, eax
jne 0x409f2e
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
xor ecx, ebp
pop esi
call fcn.00428e73
mov esp, ebp
pop ebp
ret
Function at 0x40a000
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
push 0xc6
push eax
mov word [ebp - 0xd0], ax
lea eax, [ebp - 0xce]
push eax
call fcn.0042ea00
add esp, 0xc
mov dword [ebp - 0xd4], 0
lea eax, [ebp - 0xd8]
mov dword [ebp - 0xd8], 0xc8
push eax
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0xd4]
push eax
push str.UpdateCancelDate
push str.SoftwareNico_Mak_ComputingWinZip
push SysReAllocStringLen
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x40a14d
mov word [ebp - 0xe8], ax
xorps xmm0, xmm0
mov dword [ebp - 0xde], eax
mov word [ebp - 0xda], ax
lea eax, [ebp - 0xe2]
push eax
lea eax, [ebp - 0xe6]
movq qword [ebp - 0xe6], xmm0
push eax
lea eax, [ebp - 0xe8]
push eax
lea eax, [ebp - 0xd0]
push str._d__d__d
push eax
call fcn.00429f95
add esp, 0x14
cmp eax, 3
jne 0x40a14d
lea eax, [ebp - 0xf0]
push eax
lea eax, [ebp - 0xe8]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x40a14d
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0xf8]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov ecx, dword [ebp - 0xf8]
sub ecx, dword [ebp - 0xf0]
mov eax, dword [ebp - 0xf4]
sbb eax, dword [ebp - 0xec]
cmp eax, 0x580
jb 0x40a13d
ja 0x40a12a
cmp ecx, 0x28e44000
jbe 0x40a13d
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret

Function at 0x40a160
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x118
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x120], 0x11c
push 0
push eax
call fcn.0042ea00
add esp, 0xc
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x11c], 6
mov ecx, dword [ebp - 4]
sbb eax, eax
xor ecx, ebp
inc eax
call fcn.00428e73
mov esp, ebp
pop ebp
ret

Function at 0x40a1c0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x118
lea eax, [ebp - 0x124]
mov dword [ebp - 0x128], 0x11c
push 0
push eax
call fcn.0042ea00
add esp, 0xc
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x124], 6
jb 0x40a23e
call fcn.00409f40
test al, al
je 0x40a22e
call fcn.0040a000
test al, al
je 0x40a22e
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret
call fcn.0040a000
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret
Function at 0x40a260
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push 0x228
lea eax, [ebp - 0x22c]
mov dword [ebp - 0x230], 0x22c
push 0
push eax
xor bl, bl
call fcn.0042ea00
add esp, 0xc
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
lea eax, [ebp - 0x230]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x40a31b
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Process32NextW]
lea esp, [esp]
lea eax, [ebp - 0x20c]
push str.WinZip.exe
push eax
call fcn.00429e27
add esp, 8
test eax, eax
je 0x40a318
lea eax, [ebp - 0x20c]
push str.WinZip32.exe
push eax
call fcn.00429e27
add esp, 8
test eax, eax
je 0x40a318
lea eax, [ebp - 0x20c]
push str.WinZip64.exe
push eax
call fcn.00429e27
add esp, 8
test eax, eax
je 0x40a318
lea eax, [ebp - 0x230]
push eax
push esi
call edi
test eax, eax
jne 0x40a2c0
jmp 0x40a31a
mov bl, 1
pop edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov al, bl
pop esi
xor ecx, ebp
pop ebx
call fcn.00428e73
mov esp, ebp
pop ebp
ret

Function at 0x40a530
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x210], edx
push 0x206
push eax
mov word [ebp - 0x20c], ax
mov edi, ecx
lea eax, [ebp - 0x20a]
push eax
call fcn.0042ea00
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x20c]
push str.wzau
push eax
call esi
push 0
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
cmp dword [edi + 0x14], 8
jb 0x40a5ad
mov eax, dword [edi]
jmp 0x40a5af
mov eax, edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea eax, [ebp - 0x20c]
push eax
call esi
mov esi, 0xa
mov ecx, edi
call fcn.00402220
lea edx, [ebp - 0x20c]
mov ecx, eax
call fcn.0040ab90
mov ebx, eax
dec esi
test ebx, ebx
je 0x40a5e4
test esi, esi
jg 0x40a5c5
cmp word [ebp - 0x20c], 0
jne 0x40a5f2
xor ecx, ecx
jmp 0x40a60f
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
jmp 0x40a600
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a600
sub ecx, edx
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
call fcn.00402490
mov ecx, dword [ebp - 4]
xor eax, eax
test ebx, ebx
pop edi
sete al
xor ecx, ebp
pop esi
pop ebx
call fcn.00428e73
mov esp, ebp
pop ebp
ret
Function at 0x40a790
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x448e6b
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.0042ea00
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.wzau
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
xor eax, eax
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
cmp word [ebp - 0x218], ax
jne 0x40a827
xor ecx, ecx
jmp 0x40a83f
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a830
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.00402490
lea ecx, [ebp - 0x230]
mov dword [ebp - 4], 0
call fcn.00418520
cmp dword [ebp - 0x21c], 8
jb 0x40a87b
push dword [ebp - 0x230]
call fcn.00429834
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret

Function at 0x40a8a0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 8], 0
mov ebx, edx
lea eax, [ebp - 8]
push eax
mov byte [edi], 0
mov byte [ebx], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, 1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 8], esi
jle 0x40a91e
push str.installmode
push dword [eax + esi*4]
call fcn.00429e27
add esp, 8
test eax, eax
jne 0x40a8fb
mov byte [edi], 1
jmp 0x40a915
mov eax, dword [ebp - 0xc]
push str.download
push dword [eax + esi*4]
call fcn.00429e27
add esp, 8
test eax, eax
jne 0x40a915
mov byte [ebx], 1
mov eax, dword [ebp - 0xc]
inc esi
cmp esi, dword [ebp - 8]
jl 0x40a8e2
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00428e73
mov esp, ebp
pop ebp
ret
Function at 0x40a940
Capabilities:
Check os version
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x364
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x118
lea eax, [ebp - 0x324]
mov dword [ebp - 0x328], 0x11c
push 0
push eax
call fcn.0042ea00
add esp, 0xc
lea eax, [ebp - 0x328]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x324], 6
jae 0x40a998
call fcn.00418870
mov esi, str.open
test al, al
jne 0x40a99d
mov esi, str.runas
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.0042ea00
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x38
lea eax, [ebp - 0x360]
push 0
push eax
call fcn.0042ea00
add esp, 0xc
mov dword [ebp - 0x364], 0x3c
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x358], esi
mov dword [ebp - 0x354], eax
lea eax, [ebp - 0x364]
mov dword [ebp - 0x350], str.installmode
push eax
mov dword [ebp - 0x348], 5
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
pop esi
test eax, eax
jne 0x40aa38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret

Function at 0x40aa50
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe0
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0xdc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
push 0x64
lea eax, [ebp - 0xcc]
push eax
push str.yyyy_MM_dd
lea eax, [ebp - 0xdc]
push eax
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
test eax, eax
jle 0x40ab0f
push 0
lea eax, [ebp - 0xe0]
push eax
push 0
push 0x20106
push 0
push 0
push 0
push str.SoftwareNico_Mak_ComputingWinZip
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40ab0f
lea ecx, [ebp - 0xcc]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40aad0
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0xcc]
push eax
push 1
push 0
push str.UpdateCancelDate
push dword [ebp - 0xe0]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0xe0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret
Function at 0x40cf70
Capabilities:
Clear file content

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 0x34], 8
lea eax, [esi + 0x20]
push edi
jb 0x40cf7f
mov eax, dword [eax]
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x60], eax
cmp eax, 0xffffffff
jne 0x40d01d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x78]
mov edi, eax
push edi
push str.CreateFileW_failed__u.
push str.DownloadSimpleTask::PrepareStart
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
add esp, 0x10
test edi, edi
jle 0x40cfcc
movzx edi, di
or edi, 0x80070000
add esi, 4
mov edx, SysReAllocStringLen
mov eax, dword [esi]
mov ecx, eax
or ecx, edx
lock cmpxchg dword [esi], ecx
jne 0x40cfd6
mov ecx, eax
test ecx, ecx
js 0x40d018
test esi, esi
je 0x40cfef
lea eax, [esi - 4]
jmp 0x40cff1
xor eax, eax
mov dword [eax + 0x40], edi
test ecx, ecx
jne 0x40d018
test esi, esi
je 0x40d00d
lea eax, [esi - 4]
mov eax, dword [eax + 0x3c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
xor al, al
pop edi
pop esi
ret
xor eax, eax
mov eax, dword [eax + 0x3c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
xor al, al
pop edi
pop esi
ret
push 0
push 0
push dword [esi + 0x4c]
push dword [esi + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40d076
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.SetFilePointerEx_failed__u.
mov ecx, dword [esi + 0x78]
push str.DownloadSimpleTask::PrepareStart
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
add esp, 0x10
test edi, edi
jle 0x40d05f
movzx eax, di
or eax, 0x80070000
mov edi, eax
push edi
lea ecx, [esi + 4]
call fcn.0040d7f0
push dword [esi + 0x60]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop esi
ret
push dword [esi + 0x60]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x40d093
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.SetEndOfFile_failed__u.
jmp 0x40d040
pop edi
mov dword [esi + 0x64], 0
mov al, 1
pop esi
ret
Function at 0x40d460
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x18
push esi
push edi
mov esi, ecx
xor eax, eax
push 0
push 0
mov edi, dword [esi + 0x64]
shld eax, edi, 0x14
push eax
shl edi, 0x14
push edi
push dword [esi + 0x60]
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40d51f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x78]
mov edi, eax
push edi
push str.SetFilePointerEx_failed__u.
push str.DownloadSimpleTask::StartDownload
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
add esp, 0x10
test edi, edi
jle 0x40d4c0
movzx edi, di
or edi, 0x80070000
add esi, 4
mov edx, SysReAllocStringLen
mov eax, dword [esi]
mov ecx, eax
or ecx, edx
lock cmpxchg dword [esi], ecx
jne 0x40d4ca
mov ecx, eax
test ecx, ecx
js 0x40d60d
test esi, esi
je 0x40d4e7
lea eax, [esi - 4]
jmp 0x40d4e9
xor eax, eax
mov dword [eax + 0x40], edi
test ecx, ecx
jne 0x40d60d
test esi, esi
je 0x40d50c
lea eax, [esi - 4]
mov eax, dword [eax + 0x3c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
mov eax, dword [eax + 0x3c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x38]
sub esp, 0x10
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x6c], eax
mov eax, esp
mov dword [esi + 0x68], edi
movdqu xmm0, xmmword [esi + 0x68]
mov edx, dword [ecx]
push ecx
movdqu xmmword [eax], xmm0
call dword [edx + 0xc]
push 0xc
call fcn.0042a02c
add esp, 4
mov dword [esp + 8], eax
test eax, eax
je 0x40d5ea
mov dword [eax + 4], esi
lea ecx, [eax + 8]
mov dword [eax], vtable.._AV__Object_VDownloadFileCallback_DownloadSimpleTask__A0x8b554298_downloader___details_downloader__.0
mov edx, 1
xchg dword [ecx], edx
mov ecx, dword [esi + 0x48]
mov edx, dword [esp + 0xc]
sub ecx, edi
mov eax, dword [esi + 0x4c]
mov dword [esp + 0x18], ecx
sbb eax, edx
cmp dword [esi + 0x1c], 8
lea ecx, [esi + 8]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], eax
jb 0x40d592
mov ecx, dword [ecx]
mov eax, dword [esi + 0x78]
test ecx, ecx
je 0x40d5bf
test eax, eax
je 0x40d5bf
mov edi, dword [esp + 8]
movdqu xmm0, xmmword [esp + 0x10]
mov edx, dword [esi + 0x60]
push eax
push edi
sub esp, 0x10
mov eax, esp
movdqu xmmword [eax], xmm0
call fcn.0040efb0
add esp, 0x18
jmp 0x40d5c5
mov edi, dword [esp + 8]
xor eax, eax
mov dword [esi + 0x3c], eax
mov eax, dword [edi]
push edi
call dword [eax + 4]
mov ecx, dword [esi + 0x3c]
test ecx, ecx
jne 0x40d5dc
push str.Create_HttpToFileTask_failed.
jmp 0x40d5ef
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str.Create_DownloadFileCallback_failed.
mov eax, dword [esi + 0x78]
push str.DownloadSimpleTask::StartDownload
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
add esp, 0xc
lea ecx, [esi + 4]
push 0x8007000e
call fcn.0040d7f0
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40eae0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x45e4b8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov edi, ecx
mov edx, dword [esi + 4]
cmp ebx, dword [edi + 0x34]
jl 0x40eba8
jg 0x40eb11
cmp edx, dword [edi + 0x30]
jbe 0x40eba8
sub edx, dword [edi + 0x30]
mov eax, dword [edi + 0x5c]
sbb ebx, dword [edi + 0x34]
push ebx
push edx
mov ecx, dword [eax]
push str.Data_large_than_expected__lld
push str.HttpToFileTask::OnData
push eax
call dword [ecx + 8]
add esp, 0x14
add edi, 4
mov edx, SysReAllocStringLen
mov eax, dword [edi]
mov ecx, eax
or ecx, edx
lock cmpxchg dword [edi], ecx
jne 0x40eb39
mov ecx, eax
test ecx, ecx
js 0x40ec73
test edi, edi
je 0x40eb56
lea eax, [edi - 4]
jmp 0x40eb58
xor eax, eax
mov dword [eax + 0x58], 0x80072efb
test ecx, ecx
jne 0x40ec73
test edi, edi
je 0x40eb8a
lea eax, [edi - 4]
mov eax, dword [eax + 0x3c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret 4
xor eax, eax
mov eax, dword [eax + 0x3c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428e73
mov esp, ebp
pop ebp
ret 4
push 0
lea eax, [ebp - 8]
push eax
push edx
push dword [esi]
push dword [edi + 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40ebc6
mov eax, dword [ebp - 8]
cmp eax, dword [esi + 4]
je 0x40ec32
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 0x5c]
mov esi, eax
push esi
push str.WriteFile_failed__u.
push str.HttpToFileTask::OnData
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
add esp, 0x10
test esi, esi
jle 0x40ebf2
movzx esi, si
or esi, 0x80070000
lea edx, [edi + 4]
mov ebx, SysReAllocStringLen
mov eax, dword [edx]
mov ecx, eax
or ecx, ebx
lock cmpxchg dword [edx], ecx
jne 0x40ebfc
mov ecx, eax
test ecx, ecx
js 0x40ec32
test edx, edx
je 0x40ec15
lea eax, [edx - 4]
jmp 0x40ec17
xor eax, eax
mov dword [eax + 0x58], esi
test ecx, ecx
jne 0x40ec32
test edx, edx
je 0x40ec27
lea eax, [edx - 4]
jmp 0x40ec29
xor eax, eax
mov eax, dword [eax + 0x3c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [edi + 0x28]
sub esp, 0x10
mov ecx, dword [edi + 0x38]
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [ebp - 0x10], eax
mov eax, esp
mov dword [ebp - 0xc], 0
movdqu xmm0, xmmword [ebp - 0x18]
push ecx
movdqu xmmword [eax], xmm0
call dword [edx + 0xc]
mov eax, dword [ebp - 8]
add dword [edi + 0x28], eax
adc dword [edi + 0x2c], 0
sub dword [edi + 0x30], eax
sbb dword [edi + 0x34], 0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00428e73
mov esp, ebp
pop ebp
ret 4