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

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
xor edx, edx
push ebp
push 0x49462a
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [eax + 0x30]
call fcn.004945c0
mov ebx, eax
lea edx, [ebp - 4]
mov eax, edi
call fcn.00483c4c
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0xc]
call fcn.0048384c
mov edx, dword [esi + 8]
mov eax, dword [ebx + 0x10]
mov ecx, dword [eax]
call dword [ecx + 8]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x494631
lea eax, [ebp - 4]
call fcn.004044e4
ret

Function at 0x498198
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x498239
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x104
call fcn.00409940
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push ebx
call sub.user32.dll_GetActiveWindow
push eax
call sub.shell32.dll_SHGetSpecialFolderLocation
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.shell32.dll_SHGetPathFromIDListA
test eax, eax
je 0x4981fd
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 8]
call fcn.004046dc
mov eax, dword [ebp - 0x10]
mov edx, esi
call fcn.0040d514
lea eax, [ebp - 0xc]
push eax
call sub.shell32.dll_SHGetMalloc
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [eax]
call dword [eax + 0x14]
mov eax, dword [ebp - 8]
call fcn.0040999c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x498240
lea eax, [ebp - 0x10]
call fcn.004044e4
lea eax, [ebp - 0xc]
call fcn.004060c0
ret
Function at 0x498d10
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, 0x498738
call fcn.0040688c
xor eax, eax
push ebp
push 0x498e29
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x498e38
push 0
push 0
call fcn.00406acc
mov dword [0x4a2b64], eax
xor eax, eax
push ebp
push 0x498e0c
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.kernel32.dll_GetLastError
cmp eax, 0xb7
jne 0x498d6d
call fcn.00403f04
jmp 0x498e13
push 0
call sub.ole32.dll_CoInitialize
xor eax, eax
push ebp
push 0x498dda
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x14]
call fcn.004982f4
mov edx, dword [ebp - 0x14]
mov eax, 0x4a2b60
call fcn.00404538
cmp dword [0x4a2b60], 0
jne 0x498daf
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.00403f04
jmp 0x498e13
push 1
push 0
push 0
mov eax, dword [0x4a2b60]
call fcn.004049a4
push eax
push 0x498e48
call sub.user32.dll_GetActiveWindow
push eax
call sub.shell32.dll_ShellExecuteA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x498de9
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x498e13
call fcn.0047f930
mov eax, dword [0x4a2b64]
push eax
call sub.kernel32.dll_ReleaseMutex
call sub.ole32.dll_CoUninitialize
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x498e30
lea eax, [ebp - 0x14]
call fcn.004044e4
ret
Function at 0x408951
Capabilities:
Encode data using xor

Disassembly:
push 0x4085d8
pop ecx
and edx, edi
call fcn.0040897f
and edi, edx
sub edi, edx
xor dword [eax], ecx
push 0x50aef980
pop edx
sub edi, 0x1359bd0a
inc eax
add edi, edx
push 0x1f91b19a
pop edx
cmp eax, esi
jne fcn.00408951
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x40105e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 0xc]
mov esi, eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4010b5
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x4010a7
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x4010a3
cmp edi, eax
jae 0x4010a7
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x401095
cmp edi, eax
jb 0x4010ab
xor eax, eax
jmp 0x4010b4
movzx eax, word [edi]
neg eax
sbb eax, eax
and eax, edi
pop edi
pop esi
pop ebp
ret

Function at 0x4014c3
Capabilities:
Delete directory
Delete file

Disassembly:
cmp dword [edi + 0xc], 0x8004ffff
push esi
je 0x401507
xor esi, esi
cmp dword [edi + 0x14], esi
je 0x4014ef
test esi, esi
js 0x40153c
cmp esi, dword [edi + 0x14]
jge 0x40153c
mov eax, dword [edi + 0x10]
push dword [eax + esi*4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
inc esi
cmp esi, dword [edi + 0x14]
jne 0x4014d4
lea esi, [edi + 0x10]
call fcn.004027de
lea esi, [edi + 0x1c]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
call fcn.00402726
mov eax, dword [edi + 0x20]
sub eax, 0x10
call fcn.00401153
mov eax, dword [edi + 0x1c]
sub eax, 0x10
call fcn.00401153
lea esi, [edi + 0x10]
call fcn.004027de
mov eax, dword [edi + 8]
sub eax, 0x10
call fcn.00401153
mov eax, dword [edi + 4]
sub eax, 0x10
pop esi
jmp fcn.00401153
push 0
push 0
push 1
push 0xc000008c
call dword [sym.imp.KERNEL32.dll_RaiseException]

Function at 0x401951
Capabilities:
Create directory
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push edi
mov edi, eax
mov eax, dword [edi]
push 0
push eax
call ebx
test eax, eax
jne 0x40197e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40197e
xor al, al
jmp 0x401a03
mov eax, dword [0x413b20]
push esi
mov ecx, 0x413b20
call dword [eax + 0xc]
add eax, 0x10
push 0x104
lea esi, [ebp - 4]
mov dword [ebp - 4], eax
call fcn.00402b4b
mov edi, dword [edi]
push eax
push 0
push 0x411398
push edi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov edi, eax
or eax, 0xffffffff
call fcn.00402b80
test edi, edi
je 0x4019f5
cmp edi, 0x6f
je 0x4019f5
mov esi, dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push esi
call ebx
test eax, eax
jne 0x4019db
lea eax, [esi - 0x10]
jmp 0x4019fb
mov edi, dword [ebp + 8]
add edi, 0x1c
lea eax, [ebp - 4]
call fcn.0040266b
lea eax, [esi - 0x10]
call fcn.00401153
mov al, 1
jmp 0x401a02
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.00401153
xor al, al
pop esi
pop edi
pop ebx
leave
ret 4
Function at 0x401a09
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x413b20]
push ebx
push esi
push edi
mov ecx, 0x413b20
call dword [eax + 0xc]
add eax, 0x10
mov edi, 0x104
push edi
lea esi, [ebp - 4]
mov dword [ebp - 4], eax
call fcn.00402b4b
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ebx, eax
or eax, 0xffffffff
call fcn.00402b80
test ebx, ebx
je 0x401a75
cmp ebx, edi
jae 0x401a75
mov esi, dword [ebp + 8]
push esi
lea eax, [ebp - 4]
call fcn.00401951
test al, al
je 0x401a75
lea edi, [esi + 0x20]
lea eax, [ebp - 4]
call fcn.0040266b
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.00401153
mov al, 1
jmp 0x401a82
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.00401153
xor al, al
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x401a89
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
je 0x401ae1
mov eax, dword [0x413b20]
mov ecx, 0x413b20
call dword [eax + 0xc]
add eax, 0x10
push 0x104
lea esi, [ebp - 4]
mov dword [ebp - 4], eax
call fcn.00402b4b
push eax
push 0
push 0
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edi, eax
or eax, 0xffffffff
call fcn.00402b80
test edi, edi
jns 0x401af2
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.00401153
push dword [ebp + 8]
call fcn.00401a09
test al, al
jne 0x401b18
or eax, 0xffffffff
jmp 0x401b1a
mov esi, dword [ebp + 8]
push esi
lea eax, [ebp - 4]
call fcn.00401951
test al, al
je 0x401ad6
lea edi, [esi + 0x20]
lea eax, [ebp - 4]
call fcn.0040266b
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.00401153
xor eax, eax
pop edi
pop esi
leave
ret 4
Function at 0x401b20
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x413310]
xor eax, ebp
mov dword [ebp - 4], eax
or dword [ebp - 0x214], 0xffffffff
push ebx
push esi
push edi
xor eax, eax
push 0x206
mov word [ebp - 0x210], ax
xor edi, edi
lea eax, [ebp - 0x20e]
push edi
push eax
mov ebx, ecx
call fcn.00408620
mov eax, dword [ebx + 0x20]
add esp, 0xc
lea ecx, [ebp - 0x210]
push ecx
push edi
push 0x4113a0
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x401c5d
lea eax, [ebp - 0x210]
push eax
lea esi, [ebp - 0x21c]
call fcn.00402608
lea esi, [ebx + 0x10]
lea ebx, [ebp - 0x21c]
call fcn.00402768
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
call fcn.00401153
push 0x4112f4
push 0x66
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
cmp esi, edi
je 0x401c5d
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
je 0x401c5d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
cmp ebx, edi
je 0x401c5d
push edi
push edi
push 4
push edi
push edi
push 0xc0000000
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x214], eax
cmp eax, 0xffffffff
je 0x401c5d
push dword [ebp - 0x214]
xor eax, eax
lea edi, [ebp - 0x220]
push esi
stosd dword es:[edi], eax
xor esi, esi
push esi
stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
mov ecx, ebx
call fcn.00401f69
pop ecx
pop ecx
test eax, eax
jne 0x401c4a
push esi
push esi
push dword [ebp - 0x21c]
push dword [ebp - 0x220]
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x401c5d
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x214], 0xffffffff
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x214]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407466
leave
ret
Function at 0x401c72
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov ebx, eax
mov eax, dword [0x413b20]
push edi
mov ecx, 0x413b20
call dword [eax + 0xc]
add eax, 0x10
mov edi, 0x104
push edi
lea esi, [ebp - 8]
mov dword [ebp - 8], eax
call fcn.00402b4b
push edi
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 4], eax
or eax, 0xffffffff
call fcn.00402b80
cmp dword [ebp - 4], 0
je 0x401d3e
cmp dword [ebp - 4], edi
jae 0x401d3e
push dword [ebx + 0x1c]
lea esi, [ebp - 4]
call fcn.00402608
mov eax, dword [ebp - 4]
mov esi, dword [eax - 0xc]
mov edi, 0x4112ac
push edi
call fcn.004073a9
lea eax, [eax + esi + 1]
pop ecx
push eax
lea esi, [ebp - 4]
call fcn.00402b4b
push edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
or eax, 0xffffffff
call fcn.00402b80
mov edi, dword [ebp - 4]
mov esi, dword [ebp - 8]
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x401d1c
lea eax, [edi - 0x10]
call fcn.00401153
lea eax, [esi - 0x10]
jmp 0x401d44
lea esi, [ebx + 0x10]
lea ebx, [ebp - 4]
call fcn.00402768
lea eax, [edi - 0x10]
call fcn.00401153
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
call fcn.00401153
mov al, 1
jmp 0x401d4b
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
call fcn.00401153
xor al, al
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401f69
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x413310]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0xd
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x9c], eax
jb 0x40211f
xor ebx, ebx
lea eax, [ebp - 0x8c]
mov edx, edi
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x8c], 0x401f4d
mov dword [ebp - 0x88], 0x401f5b
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x68], ebx
call fcn.00404e2b
sub dword [ebp + 8], 0xd
xor eax, eax
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov eax, dword [edi + 5]
push eax
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x7c], eax
call fcn.0040993f
mov esi, eax
pop ecx
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp + 8]
push eax
add edi, 0xd
push edi
lea eax, [ebp - 0x7c]
push eax
push esi
lea edi, [ebp - 0x78]
mov dword [ebp - 0x84], esi
mov dword [ebp - 0x80], ebx
call fcn.00404ce1
add esp, 0x14
push dword [ebp - 0x68]
mov edi, eax
lea eax, [ebp - 0x8c]
push eax
call dword [ebp - 0x88]
push dword [ebp - 0x64]
lea eax, [ebp - 0x8c]
push eax
mov dword [ebp - 0x68], ebx
call dword [ebp - 0x88]
add esp, 0x10
mov dword [ebp - 0x64], ebx
cmp edi, ebx
je 0x402050
or edi, 0xffffffff
push esi
call fcn.0040af62
pop ecx
mov eax, edi
jmp 0x402122
mov ecx, dword [esi]
add esi, 4
mov edi, dword [esi]
push 4
pop eax
add esi, eax
mov ebx, dword [esi]
add esi, eax
mov edx, dword [esi]
add esi, eax
mov dword [ebp - 0x90], edx
mov edx, dword [esi]
push ecx
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x94], edx
add esi, eax
call fcn.0040993f
pop ecx
push dword [ebp - 0x80]
mov dword [ebp - 0x7c], eax
push eax
push dword [ebp - 0x94]
mov eax, dword [ebp - 0x90]
push eax
lea edx, [eax + ebx]
lea eax, [ebx + edi]
add eax, esi
push eax
push ebx
lea eax, [edi + esi]
push eax
add edx, edi
push edi
add edx, esi
push esi
call fcn.00404e98
add esp, 0x24
test eax, eax
je 0x4020c9
push dword [ebp - 0x7c]
call fcn.0040af62
mov esi, dword [ebp - 0x84]
xor edi, edi
pop ecx
inc edi
jmp 0x402042
mov esi, dword [ebp - 0x80]
push 0
lea eax, [ebp - 0x98]
push eax
push esi
push dword [ebp - 0x7c]
push dword [ebp - 0x9c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40210a
cmp dword [ebp - 0x98], esi
jne 0x40210a
push dword [ebp - 0x7c]
call fcn.0040af62
pop ecx
push dword [ebp - 0x84]
call fcn.0040af62
pop ecx
xor eax, eax
jmp 0x402122
push dword [ebp - 0x7c]
call fcn.0040af62
pop ecx
push dword [ebp - 0x84]
call fcn.0040af62
pop ecx
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407466
leave
ret
Function at 0x402131
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x413310]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x11c
lea eax, [ebp - 0x120]
push 0
push eax
call fcn.00408620
add esp, 0xc
lea eax, [ebp - 0x120]
push eax
mov dword [ebp - 0x120], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x402179
xor al, al
jmp 0x40219c
cmp dword [ebp - 0x11c], 5
jb 0x402175
jbe 0x402188
mov al, 1
jmp 0x40219c
xor eax, eax
inc eax
cmp dword [ebp - 0x118], eax
jae 0x40219c
cmp word [ebp - 0xc], 4
sbb al, al
inc al
xor ecx, ecx
test al, al
setne cl
lea eax, [ecx - 1]
mov ecx, dword [ebp - 4]
xor ecx, ebp
and eax, 0x80040703
call fcn.00407466
leave
ret

Function at 0x40314c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [eax]
push ebx
push esi
push edi
sub eax, 0x10
call fcn.00402d15
lea esi, [eax + 0x10]
push 0x44
xor ebx, ebx
lea eax, [ebp - 0x5c]
push ebx
push eax
mov dword [ebp - 8], esi
call fcn.00408620
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0xc
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
or dword [ebp - 0x30], 0x81
xor eax, eax
inc eax
mov word [ebp - 0x2c], ax
cmp dword [esi - 4], eax
jle 0x4031ab
push dword [esi - 0xc]
lea eax, [ebp - 8]
push eax
call fcn.00402e01
mov esi, dword [ebp - 8]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x5c]
push eax
push ebx
push ebx
push 0x400
push ebx
push ebx
push ebx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x4031e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
lea eax, [esi - 0x10]
call fcn.00401153
pop edi
pop esi
mov al, bl
pop ebx
leave
ret
push 0xffffffffffffffff
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov byte [ebp - 1], 1
cmp dword [ebp + 8], ebx
je 0x403209
push dword [ebp + 8]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
setne byte [ebp - 1]
push dword [ebp - 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x14]
call edi
mov bl, byte [ebp - 1]
jmp 0x4031d4
Function at 0x40324d
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push edi
mov esi, eax
call fcn.004032e6
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x4032de
push edi
push edi
push edi
push 2
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 8], eax
cmp eax, edi
je 0x4032d9
push edi
push edi
push edi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edx, eax
mov dword [esi + 0xc], edx
cmp edx, edi
je 0x4032d0
push 6
pop ecx
mov dword [ebp - 0x1c], edi
xor eax, eax
lea edi, [ebp - 0x18]
rep stosd dword es:[edi], eax
push 0x1c
lea eax, [ebp - 0x1c]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4032d0
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x10], eax
mov al, 1
jmp 0x4032e0
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004032e6
xor al, al
pop edi
pop esi
leave
ret 4

Function at 0x40331e
Capabilities:
Parse pe header

Disassembly:
test ecx, ecx
jne 0x403325
xor al, al
ret
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x403322
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x403322
mov eax, dword [eax + 0x98]
test eax, eax
je 0x40334b
lea edx, [eax + ecx]
jmp 0x40334d
xor edx, edx
test edx, edx
je 0x403322
lea eax, [edx + 8]
test eax, eax
je 0x403322
cmp byte [eax], 0x30
lea ecx, [eax + 1]
jne 0x40337b
cmp byte [ecx], 0x82
jne 0x40337b
movzx eax, byte [ecx + 1]
movzx ecx, byte [ecx + 2]
shl eax, 8
lea eax, [eax + ecx + 0x13]
and eax, 0xffffff8
jmp 0x40337d
xor eax, eax
test eax, eax
je 0x403322
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], edx
mov al, 1
ret

Function at 0x403410
Capabilities:
Delete file

Disassembly:
push esi
xor esi, esi
cmp dword [edi + 0x10], esi
je 0x403433
test esi, esi
js 0x403447
cmp esi, dword [edi + 0x10]
jge 0x403447
mov eax, dword [edi + 0xc]
push dword [eax + esi*4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
inc esi
cmp esi, dword [edi + 0x10]
jne 0x403418
lea esi, [edi + 0xc]
call fcn.004027de
mov eax, dword [edi + 4]
sub eax, 0x10
pop esi
jmp fcn.00401153
push 0
push 0
push 1
push 0xc000008c
call dword [sym.imp.KERNEL32.dll_RaiseException]
Function at 0x403459
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4022c
call fcn.00409580
mov eax, dword [0x413310]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x40220], eax
xor ebx, ebx
push ebx
lea eax, [ebp - 0x40224]
push eax
mov esi, 0x200
push esi
lea eax, [ebp - 0x4020c]
push eax
push dword [edi]
mov byte [ebp - 0x4020d], 1
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403560
cmp dword [ebp - 0x40224], esi
jne 0x403560
push 4
lea eax, [ebp - 0x4010b]
push 0x411318
push eax
call fcn.0040994a
add esp, 0xc
test eax, eax
jne 0x4034df
mov eax, dword [ebp - 0x40220]
mov byte [eax], 1
mov al, 1
jmp 0x403562
push 5
lea eax, [ebp - 0x4010b]
push 0x411310
push eax
call fcn.0040994a
add esp, 0xc
test eax, eax
jne 0x403560
mov eax, dword [edi + 4]
sub eax, 0x10
call fcn.00402d15
add eax, 0x10
mov dword [ebp - 0x40214], eax
push 0x4113c0
lea eax, [ebp - 0x40214]
push eax
call fcn.00403699
lea eax, [ebp - 0x4020c]
push eax
lea eax, [ebp - 0x40214]
push eax
call fcn.00403699
mov esi, dword [ebp - 0x40214]
push ebx
push 0x100
push 2
push ebx
push ebx
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x40220], eax
cmp eax, 0xffffffff
jne 0x403572
lea eax, [esi - 0x10]
call fcn.00401153
xor al, al
mov ecx, dword [ebp - 8]
pop esi
xor ecx, ebp
pop ebx
call fcn.00407466
leave
ret 4
push 8
lea eax, [ebp - 0x40190]
push ebx
push eax
call fcn.0040b339
add esp, 0xc
push 1
push ebx
push ebx
push dword [edi]
mov esi, eax
mov dword [ebp - 0x40218], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add eax, dword [ebp - 0x40218]
neg esi
and esi, 0x1ff
add esi, eax
mov dword [ebp - 0x40228], esi
cmp dword [ebp - 0x40218], ebx
jbe 0x40362d
mov ecx, dword [ebp - 0x40218]
mov eax, 0x40000
mov dword [ebp - 0x4021c], eax
cmp ecx, eax
jae 0x4035d1
mov dword [ebp - 0x4021c], ecx
push ebx
lea eax, [ebp - 0x40224]
push eax
push dword [ebp - 0x4021c]
lea eax, [ebp - 0x4000c]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403627
push ebx
lea eax, [ebp - 0x40224]
push eax
push dword [ebp - 0x4021c]
lea eax, [ebp - 0x4000c]
push eax
push dword [ebp - 0x40220]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403627
mov eax, dword [ebp - 0x4021c]
sub dword [ebp - 0x40218], eax
jne 0x4035b6
jmp 0x40362d
mov byte [ebp - 0x4020d], bl
push dword [ebp - 0x40220]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x4020d], bl
je 0x403670
cmp byte [edi + 8], bl
je 0x40365c
lea esi, [edi + 0xc]
lea ebx, [ebp - 0x40214]
call fcn.00402768
mov esi, dword [ebp - 0x40228]
xor ebx, ebx
mov eax, dword [edi + 0x18]
cmp eax, ebx
je 0x403670
push dword [ebp - 0x40214]
push dword [edi + 0x1c]
call eax
pop ecx
pop ecx
cmp esi, 0xffffffff
je 0x403680
push ebx
push ebx
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x40214]
add eax, 0xfffffff0
call fcn.00401153
mov al, byte [ebp - 0x4020d]
jmp 0x403562