joyce8/EMBER2024-capa huggingface dataset:
Function at 0x472976
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
push ebx
mov esi, eax
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x4729c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push eax
push str.ChecksumFileByMem_CreateFile_error:_d__path:_ws
mov esi, 0x50fa20
call fcn.004831f9
add esp, 0xc
jmp 0x472af4
push edi
push dword [esi + 4]
push edi
push 2
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp dword [ebp - 0x14], edi
mov dword [ebp - 0x10], eax
jne 0x472a01
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push ebx
call esi
push eax
push str.ChecksumFileByMem_CreateFileMapping_error:_d__path:_ws
mov esi, 0x50fa20
call fcn.004831f9
add esp, 0xc
jmp 0x472adf
push dword [esi + 4]
push edi
push edi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
mov dword [ebp - 0xc], eax
jne 0x472a39
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push ebx
call esi
push eax
push str.ChecksumFileByMem_MapViewOfFile_error:_d__path:_ws
mov esi, 0x50fa20
call fcn.004831f9
add esp, 0xc
jmp 0x472ad1
lea ebx, [esi + 8]
mov dword [ebp - 8], eax
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], edi
mov esi, dword [ebx + 4]
je 0x472a57
cmp dword [ebp - 0x20], ebx
je 0x472a5c
call fcn.00496274
cmp dword [ebp - 0x1c], esi
je 0x472aca
lea esi, [ebp - 0x20]
call fcn.004731c1
mov esi, dword [eax]
mov ecx, dword [esi + 4]
cmp ecx, edi
jne 0x472a76
xor eax, eax
jmp 0x472a7b
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edi
call fcn.0044a9d7
push eax
push dword [ebp - 8]
call fcn.00498034
add esp, 0xc
test eax, eax
jne 0x472ab4
mov eax, dword [esi + 4]
cmp eax, edi
jne 0x472a9d
xor esi, esi
jmp 0x472aa2
mov esi, dword [esi + 8]
sub esi, eax
add dword [ebp - 8], esi
lea edi, [ebp - 0x28]
lea esi, [ebp - 0x20]
call fcn.004731e1
xor edi, edi
jmp 0x472a4a
push dword [ebp + 8]
mov esi, 0x50fa20
push str.ChecksumFileByMem_memcmp_return_not_same__path:_ws
call fcn.004831f9
pop ecx
pop ecx
jmp 0x472ad1
mov dword [ebp - 0x18], 1
cmp dword [ebp - 0xc], edi
je 0x472adf
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x10], edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x472aef
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x472b3b
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 0xc], 0
and dword [ebp - 4], 0
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, ecx
push 0
lea ecx, [ebp - 4]
push ecx
mov dword [ebp - 8], eax
push eax
jmp 0x472b72
mov eax, dword [ebp - 4]
add ebx, eax
sub dword [ebp - 8], eax
je 0x472b7e
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push ebx
push dword [ebp + 8]
call esi
test eax, eax
jne 0x472b5f
jmp 0x472b85
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
pop esi
pop ebx
leave
ret

Function at 0x472b8c
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov eax, 0x4cf97f
call fcn.004cc470
push ecx
push ebx
push esi
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.0043295b
push dword [ebp + 8]
and dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x472bd7
xor esi, esi
inc esi
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.004011c0
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0
push dword [ebp + 8]
call esi
test eax, eax
jne 0x472bb8
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov ebx, 0xb7
cmp eax, ebx
je 0x472bb8
lea ecx, [ebp - 0x10]
call fcn.0047c622
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], 0
jne 0x472c0e
xor esi, esi
jmp 0x472bbb
push eax
call fcn.00472b8c
test eax, eax
pop ecx
je 0x472c0a
push 0
push dword [ebp + 8]
call esi
test eax, eax
jne 0x472bb8
call edi
cmp eax, ebx
jne 0x472c0a
jmp 0x472bb8

Function at 0x472cd0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
and dword [ebp - 4], 0
test byte [0x50fda0], 1
jne 0x472d0d
mov eax, dword [0x50dc24]
or dword [0x50fda0], 1
mov ecx, 0x50dc24
call dword [eax + 0xc]
add eax, 0x10
push 0x4d2eb0
mov dword [0x50fd9c], eax
call fcn.00494c94
pop ecx
mov eax, dword [0x50fd9c]
cmp dword [eax - 0xc], 0
jne 0x472d69
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x472d64
push ebx
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.00495089
pop ecx
lea ecx, [ebp - 0x20c]
mov ebx, eax
mov esi, 0x50fd9c
push ecx
mov eax, esi
call fcn.00401400
call fcn.00472afe
push str.drivers_
push esi
call fcn.00432697
pop esi
pop ebx
mov eax, dword [0x50fd9c]
add eax, 0xfffffff0
call fcn.00401367
add eax, 0x10
mov dword [edi], eax
mov eax, edi
leave
ret

Function at 0x474558
Capabilities:
Delete file
Set file attributes

Disassembly:
push 0
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x47456b
xor al, al
ret
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
setne al
ret
Function at 0x474eef
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x37d4
call fcn.004aea50
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov edi, 0x2710
push dword [ebp - 4]
lea eax, [ebp - 0x120]
push str..PhysicalDrive_d
push eax
call fcn.004752c3
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x47508e
push 0xc
lea eax, [ebp - 0x1c]
push ebx
push eax
mov dword [ebp - 0xc], ebx
call fcn.00495180
push edi
lea eax, [ebp - 0x37d0]
push ebx
push eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call fcn.00495180
add esp, 0x18
push ebx
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 0x37d0]
push eax
push 0xc
lea eax, [ebp - 0x1c]
push eax
push 0x2d1400
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x47507f
mov eax, dword [ebp - 0x37c4]
push ebx
lea esi, [ebp - 0xcd8]
lea ecx, [ebp - 0x37d0]
call fcn.00474dab
mov eax, dword [ebp - 0x37c0]
push ebx
lea esi, [ebp - 0x8f0]
lea ecx, [ebp - 0x37d0]
call fcn.00474dab
mov eax, dword [ebp - 0x37bc]
push ebx
lea esi, [ebp - 0x10c0]
lea ecx, [ebp - 0x37d0]
call fcn.00474dab
mov eax, dword [ebp - 0x37b8]
push 1
lea esi, [ebp - 0x508]
lea ecx, [ebp - 0x37d0]
call fcn.00474dab
add esp, 0x10
cmp byte [0x50f148], bl
jne 0x47504f
movsx eax, byte [ebp - 0x508]
push eax
call fcn.0049a59f
test eax, eax
pop ecx
jne 0x475023
movsx eax, byte [ebp - 0x4f5]
push eax
call fcn.0049a59f
test eax, eax
pop ecx
je 0x47504f
lea eax, [ebp - 0x508]
push eax
push 0x50f148
call fcn.004752de
lea eax, [ebp - 0x8f0]
push eax
push 0x50f548
call fcn.004752de
add esp, 0x10
mov dword [ebp - 0x10], 1
push edi
lea eax, [ebp - 0x37d0]
push ebx
push eax
call fcn.00495180
add esp, 0xc
push ebx
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 0x37d0]
push eax
push ebx
push ebx
push 0x700a0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
jmp 0x475085
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x10
jl 0x474f0c
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x475bd1
Capabilities:
Access firewall settings via inetfwmgr

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
xor esi, esi
push esi
push esi
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
xor ebx, ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jge 0x475bf3
xor eax, eax
inc eax
jmp 0x475c5d
cmp dword [edi], esi
je 0x475bfc
xor ebx, ebx
inc ebx
jmp 0x475c41
lea eax, [ebp - 8]
push eax
push 0x4ed05c
push 1
push esi
push 0x4ed04c
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jge 0x475c1b
push 2
jmp 0x475c40
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
lea edx, [ebp - 4]
push edx
push eax
call dword [ecx + 0x1c]
test eax, eax
jge 0x475c30
push 3
jmp 0x475c40
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x1c]
test eax, eax
jge 0x475c41
push 4
pop ebx
mov eax, dword [ebp - 4]
cmp eax, esi
je 0x475c4e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 8]
cmp eax, esi
je 0x475c5b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, ebx
pop esi
pop ebx
leave
ret

Function at 0x4790a5
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push edi
xor edi, edi
cmp dword [ebp + 8], edi
je 0x4791a2
cmp dword [ebp + 0xc], edi
je 0x4791a2
mov eax, dword [esi + 0xc]
push ebx
lea ecx, [ebp + 0xc]
push ecx
push dword [ebp + 0x10]
xor ebx, ebx
push edi
push eax
push dword [ebp + 8]
mov dword [ebp + 0xc], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x47918f
push 0x208
lea eax, [ebp - 0x20e]
push edi
push eax
mov dword [ebp + 8], edi
mov word [ebp - 0x210], di
call fcn.00495180
mov eax, dword [esi + 0x10]
add esp, 0xc
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp - 0x210]
push ecx
lea ecx, [ebp + 8]
push ecx
push edi
push eax
push dword [ebp + 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x47918f
mov eax, dword [esi + 0x18]
cmp eax, dword [ebp + 8]
jne 0x47918f
cmp eax, 1
je 0x47913f
cmp eax, 2
jne 0x479169
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp + 0x10]
push eax
call fcn.0043295b
mov eax, dword [ebp + 0x10]
cmp dword [eax - 0xc], edi
jne 0x479161
add eax, 0xfffffff0
call fcn.004011c0
jmp 0x47918f
add eax, 0xfffffff0
call fcn.004011c0
cmp dword [esi + 0x18], 4
jne 0x47918c
push 4
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp + 0x10]
push eax
mov dword [ebp + 0x10], edi
call fcn.004979b0
add esp, 0xc
cmp dword [ebp + 0x10], edi
jbe 0x47918f
xor ebx, ebx
inc ebx
cmp dword [ebp + 0xc], edi
je 0x47919d
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
pop ebx
jmp 0x4791a4
xor eax, eax
pop edi
leave
ret 0xc
Function at 0x479552
Capabilities:
Query environment variable

Disassembly:
push 0x14
push 0x4f9180
call fcn.004cc2dc
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 8], eax
je 0x479600
cmp dword [ebp + 0xc], eax
je 0x479600
push eax
push eax
push dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
call edi
mov esi, eax
cmp esi, 1
jb 0x479600
mov ebx, 0x103
cmp esi, ebx
ja 0x479600
and dword [ebp - 4], 0
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0049391c
pop ecx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4795fc
lea ecx, [esi + esi]
push ecx
push 0
push eax
call fcn.00495180
add esp, 0xc
push esi
push dword [ebp - 0x24]
push dword [ebp + 8]
call edi
test eax, eax
je 0x4795fc
cmp eax, ebx
ja 0x4795fc
push eax
push dword [ebp - 0x24]
push ebx
push dword [ebp + 0xc]
call fcn.00499a26
add esp, 0x10
mov dword [ebp - 0x20], 1
jmp 0x4795fc
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x1c], 0
je 0x47960f
push dword [ebp - 0x1c]
call fcn.004951fa
pop ecx
mov eax, dword [ebp - 0x20]
call fcn.004cc317
ret 8
Function at 0x479897
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d2414
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb0
push ebx
push esi
xor esi, esi
push edi
mov ebx, ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], esi
call fcn.0047f266
mov dword [esp + 0x1c], eax
call fcn.0047f1bd
mov dword [esp + 0x10], eax
lea eax, [esp + 0x30]
call fcn.0049102b
lea edi, [esp + 0x40]
mov dword [esp + 0xc4], esi
call fcn.00433dda
mov byte [esp + 0xc4], 1
push dword [0x50f998]
mov esi, 0x4e5970
push esi
lea eax, [esp + 0x98]
call fcn.004328d6
push dword [0x50f99c]
lea eax, [esp + 0xa0]
push esi
call fcn.004328d6
add esp, 0x10
push dword [0x50f9c0]
lea eax, [esp + 0xa0]
push eax
call fcn.00432935
push dword [0x50f9c4]
lea eax, [esp + 0xa8]
push eax
call fcn.00432935
call fcn.0047f30f
mov dword [esp + 0x58], eax
lea eax, [esp + 0x18]
push eax
call fcn.004817d9
pop ecx
mov byte [esp + 0xc4], 2
push dword [eax]
lea eax, [esp + 0xa4]
push eax
call fcn.00432935
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.004011c0
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x1c]
mov dword [esp + 0x60], 3
cdq
mov dword [esp + 0x20], vtable.cf::time::KTimeSpan.0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov byte [esp + 0xc4], 3
mov ecx, dword [ebx + 0xc]
xor esi, esi
cmp ecx, esi
je 0x4799f1
mov eax, dword [esp + 0x10]
xor edx, edx
div ecx
push esi
push 0x15180
push dword [esp + 0x34]
push dword [esp + 0x34]
mov edi, edx
imul edi, dword [ebx + 0x10]
add edi, dword [ebx + 8]
call fcn.004a3b00
cmp eax, edi
jge 0x4799e9
mov dword [esp + 0xc], 0x165
jmp 0x4799f1
mov dword [esp + 0x14], 1
push esi
push dword [esp + 0x14]
lea ecx, [esp + 0x48]
push dword [esp + 0x14]
push 1
push 0x1e
call fcn.004340e3
cmp dword [esp + 0x14], esi
je 0x479a15
cmp dword [ebx + 0x14], esi
je 0x479a15
xor esi, esi
inc esi
lea ecx, [esp + 0x40]
call fcn.00433e85
mov ecx, dword [esp + 0xbc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x479e58
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d2414
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb0
and dword [esp], 0
push ebx
push esi
push edi
mov ebx, ecx
mov dword [esp + 0x14], 1
call fcn.0047f266
mov dword [esp + 0x1c], eax
call fcn.0047f1bd
mov dword [esp + 0x10], eax
lea eax, [esp + 0x30]
call fcn.0049102b
and dword [esp + 0xc4], 0
lea edi, [esp + 0x40]
call fcn.00433dda
mov byte [esp + 0xc4], 1
push dword [0x50f998]
mov esi, 0x4e5970
push esi
lea eax, [esp + 0x98]
call fcn.004328d6
push dword [0x50f99c]
lea eax, [esp + 0xa0]
push esi
call fcn.004328d6
add esp, 0x10
push dword [0x50f9c0]
lea eax, [esp + 0xa0]
push eax
call fcn.00432935
push dword [0x50f9c4]
lea eax, [esp + 0xa8]
push eax
call fcn.00432935
call fcn.0047f30f
mov dword [esp + 0x58], eax
lea eax, [esp + 0x18]
push eax
call fcn.004817d9
pop ecx
mov byte [esp + 0xc4], 2
push dword [eax]
lea eax, [esp + 0xa4]
push eax
call fcn.00432935
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.004011c0
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x1c]
mov dword [esp + 0x60], 3
cdq
mov dword [esp + 0x20], vtable.cf::time::KTimeSpan.0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
xor esi, esi
push esi
push 0x15180
push edx
push eax
mov byte [esp + 0xd4], 3
call fcn.004a3b00
cmp eax, dword [ebx + 0xc]
jg 0x479f99
mov eax, dword [esp + 0x10]
cmp eax, dword [ebx + 8]
jb 0x479f99
mov dword [esp + 0xc], 0x167
jmp 0x479f9d
mov dword [esp + 0x14], esi
push esi
push dword [esp + 0x14]
lea ecx, [esp + 0x48]
push dword [esp + 0x14]
push 1
push 0x1e
call fcn.004340e3
lea ecx, [esp + 0x40]
call fcn.00433e85
mov ecx, dword [esp + 0xbc]
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x47c17b
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 8]
mov eax, dword [eax]
xor ecx, ecx
cmp eax, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], ecx
je 0x47c216
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea edx, [ebp - 4]
push edx
push ecx
lea edx, [ebp - 8]
push edx
push ecx
mov ebx, str.ProgramPath
push ebx
push eax
call edi
cmp dword [ebp - 8], 1
je 0x47c1bd
cmp dword [ebp - 8], 2
jne 0x47c214
push esi
mov esi, dword [ebp + 0xc]
call fcn.0040146d
mov eax, dword [ebp - 4]
shr eax, 1
inc eax
push eax
call fcn.004011f9
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 8]
push 0
push ebx
push dword [eax]
call edi
test eax, eax
jne 0x47c1fc
mov eax, dword [ebp - 4]
shr eax, 1
and word [esi + eax*2], 0
mov dword [ebp - 0xc], 1
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
test eax, eax
je 0x47c20c
push eax
call fcn.00495089
pop ecx
mov edx, esi
call fcn.004011d8
pop esi
pop edi
pop ebx
mov eax, dword [ebp - 0xc]
leave
ret 8
Function at 0x47c71a
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x47c731
test al, 0x10
jne 0x47c731
xor eax, eax
inc eax
ret
xor eax, eax
ret

Function at 0x47cb5f
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push str.DownloadControl____Start
mov esi, 0x50fa20
mov edi, eax
call fcn.004831f9
pop ecx
mov eax, edi
call fcn.0047c89b
test eax, eax
jne 0x47cb9a
push str.DownloadControl_curlExecuter_Invalid
call fcn.004831f9
pop ecx
mov eax, pe_nt_image_headers32
jmp 0x47cce4
push dword [ebp + 8]
push edi
call fcn.0047ca26
mov ebx, eax
test ebx, ebx
je 0x47cbbb
push str.DownloadControl_GetDownloadFileLength_Failure
call fcn.004831f9
pop ecx
mov eax, ebx
jmp 0x47cce4
push dword [edi + 4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x47cbd2
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ebx, [edi + 0x10]
mov eax, dword [ebx]
test eax, eax
mov dword [ebp - 0x10], ebx
je 0x47cbe8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebx], 0
push dword [edi + 4]
call fcn.0047dba0
test eax, eax
pop ecx
je 0x47cc00
push dword [edi + 4]
push ebx
call fcn.0047c734
jmp 0x47cc05
mov eax, 0x80004005
test eax, eax
jge 0x47cc1e
push str.DownloadControl_CreateFile_Failure
call fcn.004831f9
pop ecx
mov eax, 0x102
jmp 0x47cce4
and dword [ebp - 4], 0
mov dword [ebp - 0xc], 0x103
mov dword [ebp - 8], 1
lea eax, [ebp - 4]
push eax
mov ebx, edi
call fcn.0047cceb
push dword [ebp - 4]
mov ebx, eax
push dword [edi + 0xc]
push dword [ebp - 8]
push ebx
push str.DownloadControl____ExE_CurlCode___d__Count___d__CurrentSize___d__ResCode___d
call fcn.004831f9
add esp, 0x14
test ebx, ebx
jne 0x47cc6a
cmp dword [ebp - 4], 0xce
je 0x47cc88
cmp dword [ebp - 4], 0xc8
je 0x47cc88
cmp ebx, 0x1c
je 0x47cc7a
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x25d
jle 0x47cc30
jmp 0x47cc8c
and dword [ebp - 0xc], 0
push dword [ebp - 0x10]
lea edi, [ebp - 0x18]
call fcn.0047c7c9
push dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
push dword [ebp - 0x18]
call fcn.0047c80c
mov eax, dword [esi]
test eax, eax
je 0x47ccb5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esi], 0
mov eax, dword [ebp + 8]
test eax, eax
je 0x47ccc9
test ebx, ebx
je 0x47ccc4
mov dword [eax], ebx
jmp 0x47ccc9
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
push dword [ebp - 8]
mov esi, 0x50fa20
push dword [ebp - 0xc]
push str.DownloadControl____End_HRESULT___d__Count___d
call fcn.004831f9
mov eax, dword [ebp - 0xc]
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x47d49d
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
je 0x47d521
push edi
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x47d520
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
inc eax
push eax
call fcn.0049391c
mov esi, eax
cmp esi, ebx
pop ecx
je 0x47d518
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x47d511
mov eax, dword [ebp - 4]
push esi
push dword [ebp + 0xc]
mov byte [esi + eax], bl
call fcn.004311b3
push esi
call fcn.004951fa
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
mov eax, dword [ebp - 8]
pop ebx
leave
ret

Function at 0x47d527
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
xor edi, edi
push edi
push edi
push 2
push edi
push 1
push 0x40000000
push dword [ebp + 8]
mov esi, eax
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x47d5a7
mov eax, dword [esi]
push ebx
mov dword [ebp - 4], edi
mov ebx, dword [eax - 0xc]
push edi
lea eax, [ebp - 4]
push eax
push ebx
call fcn.0043c92a
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x10], eax
mov eax, dword [esi]
cmp eax, edi
jne 0x47d57e
xor eax, eax
jmp 0x47d585
push eax
call fcn.00496e20
pop ecx
mov edx, esi
call fcn.00419455
cmp dword [ebp - 0x10], edi
je 0x47d59d
cmp dword [ebp - 4], ebx
jne 0x47d59d
mov dword [ebp - 0xc], 1
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
mov eax, dword [ebp - 0xc]
pop edi
pop esi
leave
ret