joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4672f7
Capabilities:
Delete registry value
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea eax, [ebp - 8]
push eax
push 0xf003f
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x467320
xor al, al
leave
ret
mov eax, dword [ebp + 8]
push esi
mov esi, dword [eax]
mov eax, dword [esi - 0xc]
cmp eax, 0x4f
push edi
jle 0x467336
lea esi, [esi + eax*2 - 0x9e]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0
push 0
push esi
push dword [ebp - 8]
mov dword [ebp - 0xc], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test edi, edi
je 0x467361
cmp edi, 0xea
jne 0x46736d
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov edi, eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test edi, edi
pop edi
sete al
pop esi
leave
ret

Function at 0x46781e
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [eax]
push ebx
push esi
push edi
xor edi, edi
cmp dword [eax - 0xc], edi
jne 0x467836
xor eax, eax
jmp 0x4678dd
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x467857
push eax
jmp 0x4678d4
mov eax, dword [ebp + 0xc]
sub dword [ebp + 0x10], 2
push edi
push edi
add eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4678cf
mov eax, dword [ebp + 0x10]
shr eax, 1
push eax
push 0x78
pop ecx
lea edx, [ebp - 4]
call fcn.0043dc64
push edi
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
lea esi, [ebp - 4]
call fcn.0040d3d2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4678c7
cmp dword [ebp - 8], edi
je 0x4678c7
mov eax, esi
push eax
push dword [ebp + 8]
call fcn.00467448
lea ecx, [ebp - 4]
movzx esi, al
call fcn.004058e3
cmp ebx, edi
je 0x4678c3
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x4678dd
lea ecx, [ebp - 4]
call fcn.004058e3
cmp ebx, edi
je 0x4678da
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 2
pop eax
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x469b55
Capabilities:
Create process on windows
Delete file
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x430
mov eax, dword [0x502344]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x428], eax
lea eax, [ebp - 0x41c]
push eax
push 0x104
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor ebx, ebx
mov dword [ebp - 0x430], eax
cmp eax, ebx
je 0x469cf1
lea eax, [ebp - 0x214]
push eax
push ebx
push 0x4dcc3c
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x469cf1
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.00405d54
push str..url
lea eax, [ebp - 0x420]
push eax
call fcn.00438cdb
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x420]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x469c13
push eax
jmp 0x469ce0
lea eax, [ebp - 0x424]
push eax
call fcn.00439967
push dword [esi]
lea eax, [ebp - 0x42c]
push eax
call fcn.0043998e
push dword [ebp - 0x42c]
lea eax, [ebp - 0x424]
push str._InternetShortcut__r_nURL_s_r_n
call fcn.00439d36
mov eax, dword [ebp - 0x424]
pop ecx
pop ecx
mov ecx, dword [eax - 0xc]
push ebx
lea edx, [ebp - 0x430]
push edx
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
cmp edi, ebx
je 0x469c6e
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
cmp esi, ebx
je 0x469c88
push 5
push ebx
push ebx
push dword [ebp - 0x420]
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov eax, dword [ebp - 0x428]
add eax, 0x18
push eax
push 0x5c
lea esi, [ebp - 0x420]
call fcn.00438b7f
lea ecx, [ebp - 0x428]
push ecx
mov ecx, esi
push ecx
mov ecx, eax
call fcn.0042df91
push eax
call fcn.0044fd50
pop ecx
pop ecx
lea ecx, [ebp - 0x428]
call fcn.004058e3
lea eax, [ebp - 0x42c]
push eax
call fcn.004399d0
lea eax, [ebp - 0x424]
push eax
call fcn.004399d0
cmp edi, ebx
je 0x469ce6
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x420]
call fcn.004058e3
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049cdcb
leave
ret 4
Function at 0x46a985
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
lea esi, [edi + 4]
push dword [esi]
call fcn.00470ae2
pop ecx
push esi
call fcn.00410e66
mov eax, dword [edi + 0x28]
push dword [eax]
mov ebx, dword [sym.imp.USER32.dll_SetWindowTextW]
push dword [esi]
call ebx
lea ecx, [ebp - 4]
call fcn.00409513
push 0xdc
lea eax, [ebp - 4]
push eax
call fcn.00405ac1
push 0x40a
push dword [esi]
call dword [sym.imp.USER32.dll_GetDlgItem]
push dword [ebp - 4]
push eax
call ebx
lea eax, [edi + 0x40]
push eax
mov eax, dword [esi]
call fcn.00473449
lea eax, [ebp - 8]
push eax
xor eax, eax
push eax
lea ecx, [edi + 0x30]
push ecx
push 0x46aa09
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
lea ecx, [ebp - 4]
mov dword [edi + 0x38], eax
call fcn.004058e3
pop esi
xor eax, eax
pop ebx
leave
ret

Function at 0x46be15
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [esi + 0xc]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0x4e1f4c
test eax, eax
je 0x46be67
push 0xea60
push eax
mov byte [esi + 0x71], 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 4]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x46be62
cmp dword [ebp - 4], 0x103
jne 0x46be62
push 0
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0xc]
call edi
lea ecx, [esi + 0x68]
call fcn.004058e3
mov eax, dword [esi + 0x60]
test eax, eax
je 0x46be7d
push eax
call edi
and dword [esi + 0x60], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x46be8b
push eax
call edi
and dword [esi + 0x58], 0
lea ecx, [esi + 0x38]
call fcn.004058e3
lea ecx, [esi + 0x20]
call fcn.004058e3
lea ecx, [esi + 0x1c]
call fcn.004058e3
lea ecx, [esi + 0x18]
call fcn.004058e3
pop edi
leave
ret

Function at 0x46beae
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x20]
call fcn.00438b14
mov eax, dword [ebp + 0xc]
lea edi, [esi + 0x1c]
call fcn.00438b14
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x40], eax
mov al, byte [ebp + 0x1c]
mov byte [esi + 0x54], al
mov eax, dword [ebp + 0x10]
xor edi, edi
mov dword [esi + 0x74], eax
mov eax, dword [esi + 0xc]
mov dword [esi + 4], edi
mov dword [esi + 8], edi
cmp eax, edi
je 0x46bef3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp + 0x14]
push edi
mov dword [esi + 0xc], edi
mov byte [esi + 0x3c], al
mov dword [esi + 0x80], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp + 8]
push eax
push edi
push esi
push 0x46c248
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0xc], eax
cmp eax, edi
jne 0x46bf2b
push esi
call fcn.0046d8d3
jmp 0x46bf2d
xor eax, eax
pop edi
pop esi
pop ebp
ret 0x18
Function at 0x46c876
Capabilities:
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, eax
push dword [edi + 0x58]
lea ebx, [edi + 0x34]
mov byte [ebx], 0
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push dword [ebp + 0x14]
mov byte [edi + 0x3d], 0
push dword [ebp + 0x10]
mov dword [edi + 0x30], 3
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x46c90c
push edi
call fcn.0046d8d3
cmp eax, 0x3e5
jne 0x46c90e
jmp 0x46c8e9
push edi
call fcn.0046d8d3
cmp eax, 0x3e5
jne 0x46c8ee
lea esi, [edi + 0x6c]
push ebx
call fcn.00479e8b
mov eax, esi
call fcn.00479e74
test al, al
jne 0x46c8f9
push 0xa
push dword [edi + 0x58]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [ebx], 0
je 0x46c8bd
cmp dword [edi + 0x2c], 0
jne 0x46c900
mov eax, dword [edi + 0x28]
jmp 0x46c90e
mov eax, 0xe0000008
jmp 0x46c90e
mov edi, dword [edi + 0x28]
test edi, edi
jle 0x46c90c
mov eax, dword [ebp + 0x14]
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x46c915
Capabilities:
Query remote server for available data

Disassembly:
push ebx
push esi
push edi
mov edi, eax
push dword [edi + 0x58]
lea ebx, [edi + 0x34]
mov byte [ebx], 0
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0
push 0
push dword [esp + 0x1c]
mov byte [edi + 0x3d], 0
push dword [esp + 0x1c]
mov dword [edi + 0x30], 8
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
jne 0x46c9a9
push edi
call fcn.0046d8d3
cmp eax, 0x3e5
jne 0x46c9ab
jmp 0x46c985
push edi
call fcn.0046d8d3
cmp eax, 0x3e5
jne 0x46c98a
lea esi, [edi + 0x6c]
push ebx
call fcn.00479e8b
mov eax, esi
call fcn.00479e74
test al, al
jne 0x46c995
push 0xa
push dword [edi + 0x58]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [ebx], 0
je 0x46c959
cmp dword [edi + 0x2c], 0
jne 0x46c99c
mov eax, dword [edi + 0x28]
jmp 0x46c9ab
mov eax, 0xe0000008
jmp 0x46c9ab
mov edi, dword [edi + 0x28]
test edi, edi
jle 0x46c9a9
mov eax, dword [esp + 0x14]
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
ret 8
Function at 0x46d4d7
Capabilities:
Parse url

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push 0x3c
lea eax, [ebp - 0x3c]
push 0
push eax
call fcn.0049d850
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
add esp, 0xc
lea ecx, [ebp - 0x3c]
push ecx
push 0
push 0
push eax
mov dword [ebp - 0x3c], 0x3c
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
jne 0x46d516
push dword [ebp + 8]
call fcn.0046d8d3
jmp 0x46d539
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
cmp eax, 3
je 0x46d537
cmp eax, 4
je 0x46d537
cmp eax, 1
je 0x46d537
cmp eax, 2
je 0x46d537
push 2
pop eax
jmp 0x46d539
xor eax, eax
leave
ret 0xc

Function at 0x46e6cd
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, eax
xor ebx, ebx
cmp dword [esi], ebx
jne 0x46e6e5
xor al, al
pop esi
pop ebx
leave
ret 8
lea ecx, [ebp - 0xc]
call fcn.00409513
mov eax, dword [ebp + 8]
push dword [eax]
lea eax, [ebp - 0xc]
push str.SELECT__Value__FROM__Property__WHERE__Property____s
push eax
call fcn.0043e52f
mov esi, dword [esi]
add esp, 0xc
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 4], ebx
push esi
call sub.msi.dll_MsiEnumClientsA
test eax, eax
je 0x46e730
cmp dword [ebp - 4], ebx
je 0x46e726
push dword [ebp - 4]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
lea ecx, [ebp - 0xc]
call fcn.004058e3
jmp 0x46e6dd
push ebx
push dword [ebp - 4]
call sub.msi.dll_MsiViewModify
test eax, eax
jne 0x46e719
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
mov dword [ebp - 8], ebx
call sub.msi.dll_MsiDatabaseIsTablePersistentA
test eax, eax
je 0x46e779
cmp dword [ebp - 8], ebx
je 0x46e75d
push dword [ebp - 8]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 4], ebx
je 0x46e76a
push dword [ebp - 4]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
lea ecx, [ebp - 0xc]
call fcn.004058e3
mov al, bl
jmp 0x46e6df
push dword [ebp + 0xc]
push dword [ebp - 8]
call fcn.0046e87c
mov byte [ebp + 0xb], al
cmp dword [ebp - 8], ebx
je 0x46e794
push dword [ebp - 8]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 4], ebx
je 0x46e7a1
push dword [ebp - 4]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov bl, byte [ebp + 0xb]
jmp 0x46e76a

Function at 0x46ea88
Capabilities:
Get graphical window text

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push 0x7d1
push dword [ebp + 4]
lea esi, [ebp + 0x20]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ebx, eax
test ebx, ebx
je 0x46eac8
push edi
push ebx
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea edi, [eax + 1]
push edi
call fcn.00405c39
push edi
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowTextW]
call fcn.004094c6
pop edi
jmp 0x46eacd
call fcn.00405b06
push 1
push dword [ebp + 4]
call dword [sym.imp.USER32.dll_EndDialog]
pop esi
pop ebp
xor eax, eax
pop ebx
ret 4
Function at 0x46eb2a
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x502344]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
test ecx, ecx
jne 0x46eb4b
xor al, al
jmp 0x46ec6b
push 2
lea esi, [ebp - 0x408]
pop edi
jmp 0x46eb5d
mov word [esi], ax
add ecx, edi
add esi, edi
movzx eax, word [ecx]
test ax, ax
jne 0x46eb56
xor eax, eax
mov word [esi], ax
push 0x5c
xor dl, dl
pop ebx
sub esi, edi
xor al, al
mov byte [ebp - 0x409], dl
cmp word [ebp - 0x408], bx
jne 0x46eb9b
cmp word [ebp - 0x406], bx
jne 0x46eb9b
mov byte [ebp - 0x409], 1
cmp word [esi], bx
je 0x46eba2
inc al
jmp 0x46eba2
cmp word [esi], bx
jne 0x46eba2
mov dl, 1
lea ecx, [ebp - 0x404]
mov dword [ebp - 0x410], ecx
cmp word [ebp - 0x404], bx
je 0x46ebc4
add ecx, edi
cmp word [ecx], bx
jne 0x46ebb7
mov dword [ebp - 0x410], ecx
test al, al
jne 0x46ebce
test dl, dl
je 0x46ebde
jmp 0x46ebd7
add esi, edi
mov eax, ebx
mov word [esi], ax
add esi, edi
xor eax, eax
mov word [esi], ax
sub esi, edi
and dword [ebp - 0x418], 0
and dword [ebp - 0x414], 0
lea eax, [ebp - 0x420]
push eax
push eax
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
jne 0x46ec4c
cmp word [esi], bx
jne 0x46ec1a
jmp 0x46ec18
cmp word [esi], bx
je 0x46ec24
sub esi, edi
lea eax, [ebp - 0x408]
cmp esi, eax
ja 0x46ec13
cmp esi, dword [ebp - 0x410]
jb 0x46eb44
cmp byte [ebp - 0x409], 0
jne 0x46ec41
cmp esi, dword [ebp - 0x410]
jne 0x46ec43
add esi, edi
xor eax, eax
mov word [esi], ax
sub esi, edi
jmp 0x46ebec
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x414]
ja 0x46ec69
jb 0x46ec64
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x418]
jae 0x46ec69
xor eax, eax
inc eax
jmp 0x46ec6b
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049cdcb
leave
ret
Function at 0x46ef66
Capabilities:
Parse url

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
push edi
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.0049d850
add esp, 0xc
push 0x64
pop eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x40], esi
mov edi, dword [eax - 0xc]
mov ebx, 0x504d64
push eax
mov ecx, ebx
lea esi, [ebp - 4]
call fcn.0042e1c6
lea eax, [ebp - 0x40]
push eax
push 0
push 0
push dword [ebp - 4]
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
jne 0x46efda
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea ecx, [ebp - 4]
call fcn.004058e3
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
push dword [ebp - 0x30]
mov edi, dword [ebp - 0x2c]
mov ecx, ebx
lea esi, [ebp + 8]
call fcn.0042e1c6
mov edi, dword [ebp + 0x14]
mov eax, esi
call fcn.00438b14
mov ecx, esi
call fcn.004058e3
push dword [ebp - 0x14]
mov edi, dword [ebp - 0x10]
mov ecx, ebx
lea esi, [ebp + 8]
call fcn.0042e1c6
mov edi, dword [ebp + 0x18]
mov eax, esi
call fcn.00438b14
mov ecx, esi
call fcn.004058e3
cmp dword [ebp - 0x24], 0
je 0x46f043
push dword [ebp - 0x24]
mov edi, dword [ebp - 0x20]
mov ecx, ebx
lea esi, [ebp + 8]
call fcn.0042e1c6
mov edi, dword [ebp + 0x1c]
mov eax, esi
call fcn.00438b14
mov ecx, esi
call fcn.004058e3
cmp dword [ebp - 0x1c], 0
je 0x46f06a
push dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
mov ecx, ebx
lea esi, [ebp + 8]
call fcn.0042e1c6
mov edi, dword [ebp + 0x20]
mov eax, esi
call fcn.00438b14
mov ecx, esi
call fcn.004058e3
cmp dword [ebp - 0xc], 0
je 0x46f091
push dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov ecx, ebx
lea esi, [ebp + 8]
call fcn.0042e1c6
mov edi, dword [ebp + 0x24]
mov eax, esi
call fcn.00438b14
mov ecx, esi
call fcn.004058e3
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov ax, word [ebp - 0x28]
mov ecx, dword [ebp + 0x10]
mov word [ecx], ax
xor esi, esi
jmp 0x46efcb
Function at 0x46f1ac
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x502344]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 3
push SysReAllocStringLen
push ecx
mov dword [ebp - 0x90], eax
mov byte [eax], bl
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x98], esi
cmp esi, 0xffffffff
jne 0x46f1f6
push eax
jmp 0x46f234
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
je 0x46f22f
cmp eax, dword [ebp + 0xc]
jbe 0x46f22f
sub eax, dword [ebp + 0xc]
mov edi, 0x10000
mov dword [ebp - 0x8c], eax
push edi
lea eax, [ebp - 0x80]
push eax
mov dword [ebp - 0x80], ebx
call fcn.00438364
cmp dword [ebp - 0x80], ebx
jne 0x46f24b
push ebx
call fcn.0049d65c
pop ecx
cmp esi, ebx
je 0x46f23a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049cdcb
leave
ret
lea eax, [ebp - 0x78]
mov dword [ebp - 0x84], ebx
mov dword [ebp - 0x88], ebx
mov byte [ebp - 0x79], bl
call fcn.0049ab40
jmp 0x46f26a
mov esi, dword [ebp - 0x98]
push ebx
lea eax, [ebp - 0x88]
push eax
push edi
push dword [ebp - 0x80]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46f2c6
mov esi, dword [ebp - 0x88]
cmp esi, ebx
je 0x46f2c6
mov eax, dword [ebp - 0x84]
lea ecx, [esi + eax]
cmp ecx, dword [ebp - 0x8c]
jbe 0x46f2ae
mov esi, dword [ebp - 0x8c]
sub esi, eax
mov dword [ebp - 0x88], esi
mov byte [ebp - 0x79], 1
push dword [ebp - 0x80]
mov eax, esi
lea ecx, [ebp - 0x78]
call fcn.0049a960
add dword [ebp - 0x84], esi
cmp byte [ebp - 0x79], bl
je 0x46f264
lea esi, [ebp - 0x78]
call fcn.0049aa20
mov ebx, dword [ebp - 0x90]
mov eax, esi
call fcn.0049aaf0
push dword [ebp - 0x80]
mov bl, al
call fcn.0049d65c
cmp dword [ebp - 0x98], 0
pop ecx
je 0x46f2fb
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
jmp 0x46f23c

Function at 0x46f754
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
push ebx
xor ebx, ebx
cmp byte [esi], bl
je 0x46f765
mov al, 1
jmp 0x46f7e8
mov eax, dword [ebp + 8]
push edi
lea edi, [esi + 4]
mov byte [esi], 1
mov byte [esi + 1], bl
call fcn.00438b14
push str..pipeToServer
lea eax, [ebp + 8]
push eax
call fcn.00405d54
mov edi, dword [edi]
push dword [edi - 0xc]
lea eax, [ebp + 8]
push edi
call fcn.00438d54
pop edi
cmp byte [esi + 1], bl
je 0x46f7c0
push ebx
push 0x1388
mov eax, 0x7f90
push eax
push eax
push 0xff
push 6
push 3
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [esi + 8], eax
cmp byte [esi + 1], bl
jne 0x46f7d7
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 8], eax
cmp dword [esi + 8], 0xffffffff
lea ecx, [ebp + 8]
setne bl
call fcn.004058e3
mov al, bl
pop ebx
pop ebp
ret 4
Function at 0x46f918
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [esi + 0xc]
push ebx
push 0
lea ecx, [ebp + 8]
push ecx
push 0x7f90
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp + 8]
mov edx, dword [esi + 0xc]
xor ebx, ebx
shr ecx, 1
mov word [edx + ecx*2], bx
pop ebx
test eax, eax
je 0x46f96e
cmp dword [ebp + 8], 0
je 0x46f96e
push dword [esi + 0xc]
lea eax, [ebp - 4]
push eax
call fcn.00405d54
lea eax, [ebp - 4]
push eax
push edi
call fcn.0041f0fb
lea ecx, [ebp - 4]
call fcn.004058e3
jmp 0x46f975
mov ecx, edi
call fcn.00409513
mov eax, edi
leave
ret 4

Function at 0x46f97b
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 8], 0xffffffff
push edi
mov edi, eax
jne 0x46f990
mov ecx, edi
call fcn.00409513
jmp 0x46f9b7
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push 0
lea edx, [ebp + 0xc]
push edx
add ecx, ecx
push ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46f987
push dword [ebp + 8]
call fcn.0046f918
mov eax, edi
pop edi
pop ebp
ret 8

Function at 0x46fdd4
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov ebx, ecx
push edi
xor esi, esi
mov edi, eax
mov dword [ebx + 0x10], edi
cmp dword [ebx + 4], esi
je 0x46fe61
cmp edi, esi
je 0x46fe0c
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push eax
lea esi, [ebx + 0x14]
call fcn.004125fe
push dword [ebx + 0x14]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x20]
xor esi, esi
lea eax, [ebp - 4]
push eax
push esi
push ebx
push 0x46fe68
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, eax
cmp edi, esi
je 0x46fe2c
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x46fe56
mov edi, dword [ebp - 4]
cmp ebx, esi
je 0x46fe52
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x46fe63
cmp ebx, esi
je 0x46fe61
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x470365
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x2e
mov esi, ebx
mov edi, eax
call fcn.00438b7f
test eax, eax
jg 0x470387
mov al, 1
jmp 0x4704c1
lea ecx, [ebp - 8]
push ecx
push ebx
mov ecx, eax
call fcn.0042df91
lea ecx, [ebp - 0x14]
call fcn.00409513
push dword [ebp - 8]
mov eax, dword [ebp + 0xc]
push dword [ebx]
push dword [eax]
lea eax, [ebp - 0x14]
push str.__verbose___log_file__s____remove_pack_file___s____s_
push eax
call fcn.0043e52f
add esp, 0x14
cmp dword [edi + 0x10], 0
je 0x4703c5
mov ecx, dword [edi + 0x10]
mov eax, dword [ecx]
push ebx
call dword [eax + 0x14]
push 0
push 0x8000008
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0xc]
push eax
call fcn.0046020e
add esp, 0x14
lea esi, [ebp - 8]
mov byte [ebp - 1], 1
call fcn.004502d0
test al, al
je 0x4703fd
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x470492
lea ecx, [ebp - 0x10]
call fcn.00409513
push dword [ebp + 0xc]
lea ecx, [ebp - 0x10]
call fcn.0046089a
pop ecx
lea ecx, [ebp - 0xc]
call fcn.00409513
push 0xca
lea esi, [ebp - 0x18]
call fcn.0046ec7a
mov eax, dword [ebp - 8]
mov ebx, dword [eax - 0xc]
mov eax, dword [ebp - 0x18]
pop ecx
push 0x5c
lea esi, [ebp - 8]
mov dword [ebp - 0x1c], eax
call fcn.00438b7f
mov ecx, ebx
sub ecx, eax
lea eax, [ebp - 0x20]
push eax
mov eax, esi
push eax
call fcn.0042df35
push dword [ebp - 0x10]
push dword [eax]
lea eax, [ebp - 0xc]
push dword [ebp - 0x1c]
push eax
call fcn.0043e52f
add esp, 0x10
lea ecx, [ebp - 0x20]
call fcn.004058e3
push 0
lea esi, [ebp - 0xc]
call fcn.004667bc
pop ecx
lea ecx, [ebp - 0x18]
mov byte [ebp - 1], 0
call fcn.004058e3
mov ecx, esi
call fcn.004058e3
lea ecx, [ebp - 0x10]
call fcn.004058e3
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [edi + 0x10], 0
je 0x4704ae
mov edi, dword [edi + 0x10]
mov eax, dword [edi]
push ebx
mov ecx, edi
call dword [eax + 0x18]
lea ecx, [ebp - 0x14]
call fcn.004058e3
lea ecx, [ebp - 8]
call fcn.004058e3
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
leave
ret 8