joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001fe2
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x70
push 0x10012b0
call fcn.010021cc
xor ebx, ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
or edi, 0xffffffff
mov dword [ebp - 4], edi
cmp word [0x1000000], 0x5a4d
jne 0x1002035
mov eax, dword [0x100003c]
lea eax, [eax + 0x1000000]
cmp dword [eax], 0x4550
jne 0x1002035
movzx ecx, word [eax + 0x18]
cmp ecx, 0x10b
je 0x100204d
cmp ecx, 0x20b
je 0x100203a
mov dword [ebp - 0x1c], ebx
jmp 0x1002061
cmp dword [eax + 0x84], 0xe
jbe 0x1002035
xor ecx, ecx
cmp dword [eax + 0xf8], ebx
jmp 0x100205b
cmp dword [eax + 0x74], 0xe
jbe 0x1002035
xor ecx, ecx
cmp dword [eax + 0xe8], ebx
setne cl
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 1
push 2
call dword [sym.imp.msvcrt.dll___set_app_type]
pop ecx
mov dword [0x100304c], edi
mov dword [0x1003050], edi
call dword [sym.imp.msvcrt.dll___p__fmode]
mov ecx, dword [0x1003040]
mov dword [eax], ecx
call dword [sym.imp.msvcrt.dll___p__commode]
mov ecx, dword [0x100303c]
mov dword [eax], ecx
mov eax, dword [sym.imp.msvcrt.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x1003054], eax
call fcn.0100228e
cmp dword [0x1003030], ebx
jne 0x10020be
push fcn.0100228e
call dword [sym.imp.msvcrt.dll___setusermatherr]
pop ecx
call fcn.0100227c
push 0x1003010
push 0x100300c
call sub.msvcrt.dll__initterm
mov eax, dword [0x1003038]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push dword [0x1003034]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.msvcrt.dll___getmainargs]
mov dword [ebp - 0x38], eax
push 0x1003008
push section..data
call sub.msvcrt.dll__initterm
add esp, 0x24
mov eax, dword [sym.imp.msvcrt.dll__acmdln]
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
cmp byte [eax], 0x22
jne 0x1002149
inc eax
mov dword [ebp - 0x20], eax
mov cl, byte [eax]
cmp cl, bl
je 0x1002129
cmp cl, 0x22
jne 0x100211a
cmp byte [eax], 0x22
jne 0x1002132
inc eax
mov dword [ebp - 0x20], eax
mov cl, byte [eax]
cmp cl, bl
je 0x100213d
cmp cl, 0x20
jbe 0x100212e
test byte [ebp - 0x54], 1
je 0x1002154
movzx ecx, word [ebp - 0x50]
jmp 0x1002157
cmp byte [eax], 0x20
jbe 0x1002132
inc eax
mov dword [ebp - 0x20], eax
jmp 0x1002149
push 0xa
pop ecx
push ecx
push eax
push ebx
push 0x1000000
call fcn.01001cbe
mov esi, eax
mov dword [ebp - 0x3c], esi
cmp dword [ebp - 0x1c], ebx
jne 0x1002175
push esi
call dword [sym.imp.msvcrt.dll_exit]
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], edi
jmp 0x10021b1
mov eax, esi
jmp 0x10021c5
call fcn.01002207
ret
Function at 0x401000
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
push esi
push edi
lea edi, [ebp - 0xa0]
mov ecx, 0x28
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x40e06c]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov word [ebp - 0x98], ax
push 0x8e
push 0
lea ecx, [ebp - 0x96]
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
mov esi, esp
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, esp
call fcn.004078f8
mov esi, esp
push 0x48
lea edx, [ebp - 0x98]
push edx
push str.logYSLoader
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp esi, esp
call fcn.004078f8
test eax, eax
jbe 0x4010c8
mov esi, esp
lea eax, [ebp - 0x98]
push eax
push 0x40a228
call dword [sym.imp.MSVCR100.dll__wcsicmp]
add esp, 8
cmp esi, esp
call fcn.004078f8
test eax, eax
je 0x4010bc
mov esi, esp
lea ecx, [ebp - 0x98]
push ecx
push 0x40a230
call dword [sym.imp.MSVCR100.dll__wcsicmp]
add esp, 8
cmp esi, esp
call fcn.004078f8
test eax, eax
jne 0x4010c8
mov dword [ebp - 0xa0], 1
jmp 0x4010d2
mov dword [ebp - 0xa0], 0
mov al, byte [ebp - 0xa0]
push edx
mov ecx, ebp
push eax
lea edx, [0x401108]
call fcn.0040791b
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004078e9
add esp, 0xa0
cmp ebp, esp
call fcn.004078f8
mov esp, ebp
pop ebp
ret
Function at 0x4026b0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408f28
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push esi
push edi
lea edi, [ebp - 0x3c]
mov ecx, 0xc
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x40e06c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebp + 0x14], 2
je 0x4026f6
mov eax, 0x57
jmp 0x4027dd
cmp dword [ebp + 0x20], 0
jne 0x402706
mov eax, 0x57
jmp 0x4027dd
push 1
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00404670
mov dword [ebp - 4], 0
cmp dword [ebp + 0x18], 0
jne 0x40272b
lea edx, [ebp - 0x24]
mov dword [ebp + 0x18], edx
mov esi, esp
mov eax, dword [ebp + 0x20]
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 0x18]
push edx
push 0
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp esi, esp
call fcn.004078f8
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x402773
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x30], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00404810
mov eax, dword [ebp - 0x30]
jmp 0x4027dd
mov eax, dword [ebp + 0x18]
cmp dword [eax], 1
je 0x402796
mov dword [ebp - 0x34], 0x65e
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00404810
mov eax, dword [ebp - 0x34]
jmp 0x4027dd
mov ecx, dword [ebp + 0x20]
mov edx, dword [ecx]
shr edx, 1
mov eax, dword [ebp + 0x1c]
movzx ecx, word [eax + edx*2 - 2]
test ecx, ecx
je 0x4027c4
mov dword [ebp - 0x38], 0xea
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00404810
mov eax, dword [ebp - 0x38]
jmp 0x4027dd
mov dword [ebp - 0x3c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00404810
mov eax, dword [ebp - 0x3c]
push edx
mov ecx, ebp
push eax
lea edx, [0x40280c]
call fcn.0040791b
pop eax
pop edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0x3c
cmp ebp, esp
call fcn.004078f8
mov esp, ebp
pop ebp
ret
Function at 0x403820
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4090b3
mov eax, dword fs:[0]
push eax
sub esp, 0x260
push esi
push edi
lea edi, [ebp - 0x26c]
mov ecx, 0x98
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x40e06c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x240], 0x22c
push 0x228
push 0
lea eax, [ebp - 0x23c]
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x240]
push ecx
mov edx, dword [ebp + 8]
push edx
call sub.KERNEL32.dll_Process32FirstW
mov dword [ebp - 0x248], eax
cmp dword [ebp - 0x248], 0
je 0x4038cc
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x238]
jne 0x4038b4
mov eax, dword [ebp - 0x228]
jmp 0x403943
lea ecx, [ebp - 0x240]
push ecx
mov edx, dword [ebp + 8]
push edx
call sub.KERNEL32.dll_Process32NextW
mov dword [ebp - 0x248], eax
jmp 0x403895
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.004078f8
push eax
push str.Win32_error__u_attempting_to_find_parent_process
lea eax, [ebp - 0x264]
push eax
call fcn.00404dc0
add esp, 0xc
mov dword [ebp - 0x268], eax
mov ecx, dword [ebp - 0x268]
mov dword [ebp - 0x26c], ecx
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x26c]
call fcn.004050a0
push eax
lea ecx, [ebp - 0x25c]
call fcn.004043c0
push 0x40c390
lea edx, [ebp - 0x25c]
push edx
call sub.MSVCR100.dll__CxxThrowException
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x264]
call fcn.00405060
push edx
mov ecx, ebp
push eax
lea edx, [0x40397c]
call fcn.0040791b
pop eax
pop edx
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.004078e9
add esp, 0x26c
cmp ebp, esp
call fcn.004078f8
mov esp, ebp
pop ebp
ret

Function at 0x4041e0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
mov eax, 0xcccccccc
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
mov dword [ebp - 4], 0x7fffffff
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
cmp esi, esp
call fcn.004078f8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40422c
push str.catastrophic_error_in_YSLoader_WinMain:_GetCommandLineW_failed
call fcn.00401120
add esp, 4
jmp 0x40426e
mov esi, esp
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp esi, esp
call fcn.004078f8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x404261
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00401320
add esp, 8
mov dword [ebp - 4], eax
jmp 0x40426e
push str.catastrophic_error_in_YSLoader_WinMain:_CommandLineToArgvW_failed
call fcn.00401120
add esp, 4
mov eax, dword [ebp - 4]
push edx
mov ecx, ebp
push eax
lea edx, [0x404294]
call fcn.0040791b
pop eax
pop edx
pop esi
add esp, 0x18
cmp ebp, esp
call fcn.004078f8
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4078e9
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40e06c]
jne 0x4078f3
repz ret
jmp fcn.00407dac
Function at 0x401080
Capabilities:
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
lea ebx, [ebp - 0xc]
sub esp, 0x30
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
mov eax, 0
cmovne eax, dword [ebp - 0xc]
lea esp, [ebp - 8]
pop ecx
pop ebx
pop ebp
lea esp, [ecx - 4]
ret

Function at 0x4010e0
Capabilities:
Read file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
lea ebx, [ebp - 0xc]
sub esp, 0x30
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
mov eax, 0
cmovne eax, dword [ebp - 0xc]
lea esp, [ebp - 8]
pop ecx
pop ebx
pop ebp
lea esp, [ecx - 4]
ret

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

Disassembly:
push ebx
mov ebx, eax
sub esp, 0x18
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x401758
test al, 0x10
je 0x401758
add esp, 0x18
mov eax, 1
pop ebx
ret
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CreateDirectoryW]
sub esp, 8
test eax, eax
jne 0x40174b
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xb7
sete al
add esp, 0x18
movzx eax, al
pop ebx
ret

Function at 0x401790
Capabilities:
Get process heap flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov eax, dword fs:[0x18]
mov ebp, esp
push ecx
sub esp, 0x14
mov edx, dword [ecx]
mov dword [esp + 4], 0
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ecx, dword [ebp - 4]
sub esp, 0xc
leave
lea esp, [ecx - 4]
ret
Function at 0x4017d0
Capabilities:
Get process heap flags

Disassembly:
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x14
cmp word [eax], 0
je 0x4018e0
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4017e8
sub eax, esi
sar eax, 1
cmp word [ebx], 0
je 0x40180f
mov edx, ebx
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x401800
sub edx, ebx
sar edx, 1
add eax, edx
lea eax, [eax + eax + 4]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov ecx, eax
test eax, eax
je 0x4018d2
xor eax, eax
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x401848
cmp word [ecx], 0
mov eax, ecx
je 0x4018c0
add eax, 2
cmp word [eax], 0
jne 0x401860
cmp word [eax - 2], 0x5c
je 0x4018a9
mov edx, ecx
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x401878
xor eax, eax
mov esi, 0x5c
jmp 0x401897
movzx esi, word [eax + 0x40b018]
mov word [edx + eax], si
add eax, 2
test si, si
jne 0x401890
cmp word [ecx], 0
je 0x4018e7
mov eax, ecx
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4018b0
lea esi, [esi]
movzx edx, word [ebx]
add ebx, 2
add eax, 2
mov word [eax - 2], dx
test dx, dx
jne 0x4018c0
add esp, 0x14
mov eax, ecx
pop ebx
pop esi
ret
xor eax, eax
jmp 0x4017f5
mov eax, ecx
jmp 0x4018c0

Function at 0x4018f0
Capabilities:
Get process heap flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov eax, dword fs:[0x18]
mov ebp, esp
push ecx
sub esp, 0x14
mov edx, dword [ecx]
mov dword [esp + 4], 0
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov ecx, dword [ebp - 4]
sub esp, 0xc
leave
lea esp, [ecx - 4]
ret
Function at 0x401930
Capabilities:
Check if file exists
Get file attributes
Get process heap flags

Disassembly:
push esi
push ebx
sub esp, 0x14
test eax, eax
je 0x401a60
cmp word [eax], 0
mov ebx, eax
je 0x401a70
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x401950
sub eax, ebx
add eax, 2
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov esi, eax
test eax, eax
je 0x401a60
xor eax, eax
nop
movzx edx, word [ebx + eax]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x401990
mov dword [esp], esi
call sym._PathRemoveFileSpecW_4
sub esp, 4
test eax, eax
jne 0x4019e0
xor ebx, ebx
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, ebx
sub esp, 0xc
add esp, 0x14
pop ebx
pop esi
ret
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x4019fa
mov ebx, 1
test al, 0x10
jne 0x4019b1
movzx eax, word [esi]
mov ebx, esi
test ax, ax
jne 0x401a1c
jmp 0x401a4a
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x401a4a
cmp ax, 0x5c
jne 0x401a10
xor edx, edx
mov eax, esi
mov word [ebx], dx
call sym._create_directory
test eax, eax
je 0x4019af
mov eax, 0x5c
add ebx, 2
mov word [ebx - 2], ax
movzx eax, word [ebx]
test ax, ax
jne 0x401a1c
mov eax, esi
call sym._create_directory
mov ebx, eax
jmp 0x4019b1
xor ebx, ebx
add esp, 0x14
mov eax, ebx
pop ebx
pop esi
ret
mov eax, 2
jmp 0x40195e
Function at 0x401a80
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get process heap flags

Disassembly:
test eax, eax
je 0x401bc0
push ebp
mov edx, 0x40b01c
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x27c
call sym._path_combine.part.0
mov edi, eax
test eax, eax
je 0x401b95
lea ebp, [esp + 0x20]
mov dword [esp], eax
mov dword [esp + 4], ebp
call dword [sym.imp.kernel32.dll_FindFirstFileW]
sub esp, 8
mov esi, eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 0x14], eax
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 0x18], eax
call eax
sub esp, 0xc
cmp esi, 0xffffffff
je 0x401b89
lea edi, [esp + 0x4c]
mov dword [esp + 4], 0x40b020
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
je 0x401b65
mov dword [esp + 4], 0x40b024
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
je 0x401b65
mov edx, edi
mov eax, ebx
call sym._path_combine.part.0
test eax, eax
je 0x401b65
test byte [esp + 0x20], 0x10
je 0x401ba0
mov dword [esp + 0x1c], eax
call sym._delete_directory.isra.0
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [esp + 0x18]
call eax
sub esp, 0xc
mov dword [esp + 4], ebp
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_FindNextFileW]
sub esp, 8
test eax, eax
jne 0x401af8
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
sub esp, 4
add esp, 0x27c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
sub esp, 4
mov edx, dword [esp + 0x1c]
jmp 0x401b43
ret
Function at 0x401bd0
Capabilities:
Extract cabinet on windows

Disassembly:
push ebp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x5c
lea eax, [esp + 0x44]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], dbg.cabinet_seek
mov dword [esp + 0x14], dbg.cabinet_close
mov dword [esp + 0x10], dbg.cabinet_write
mov dword [esp + 0xc], dbg.cabinet_read
mov dword [esp + 8], dbg.cabinet_open
mov dword [esp + 4], dbg.cabinet_free
mov dword [esp], dbg.cabinet_alloc
mov dword [esp + 0x34], edx
call sym._FDICreate
test eax, eax
je 0x401d68
mov ebx, eax
test esi, esi
je 0x401d60
mov ecx, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
call ecx
sub esp, 0x20
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp + 0x38], eax
mov ebp, dword fs:[0x18]
mov eax, dword [ebp + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x401d60
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 8], esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call ecx
sub esp, 0x20
mov eax, dword [esp + 0x34]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], dbg.cabinet_notify
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], ebx
call sym._FDICopy
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov esi, eax
mov eax, dword [ebp + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov dword [esp], ebx
call sym._FDIDestroy
add esp, 0x5c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
xor esi, esi
jmp 0x401d4c
add esp, 0x5c
xor esi, esi
pop ebx
mov eax, esi
pop esi
pop edi
pop ebp
ret
Function at 0x401d80
Capabilities:
Create directory
Get common file path
Get process heap flags

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x23c
lea esi, [esp + 0x28]
mov dword [esp + 0x1c], eax
mov dword [esp + 4], esi
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathW]
sub esp, 8
test eax, eax
je 0x401ebb
mov dword [esp + 8], 0xc
mov edi, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [esp + 4], 0
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x30]
mov dword [esp + 0x18], ecx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401ebb
mov ecx, dword [esp + 0x18]
mov dword [esp + 8], 0x230
mov dword [esp + 4], 0
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov edi, dword [sym.imp.kernel32.dll_GetTempFileNameW]
mov ebp, dword [sym.imp.kernel32.dll_CreateDirectoryW]
sub esp, 0xc
test eax, eax
mov dword [ebx + 8], eax
mov edx, eax
mov ecx, dword [esp + 0x18]
jne 0x401e4e
jmp 0x401ef7
mov dword [esp + 4], 0
mov eax, dword [ebx + 8]
mov dword [esp], eax
call ebp
sub esp, 8
test eax, eax
jne 0x401ed0
mov edx, dword [ebx + 8]
mov eax, dword [global_id]
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0x40b02a
add eax, 1
mov dword [esp], esi
mov dword [global_id], eax
mov dword [esp + 8], eax
call edi
sub esp, 0x10
test eax, eax
jne 0x401e30
mov eax, dword [ebx + 8]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
xor edx, edx
add esp, 0x23c
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebx + 8]
lea eax, [ecx + 8]
mov dword [ebx], eax
mov eax, dword [ecx + 0xc]
mov dword [ebx + 4], eax
mov eax, dword [ecx + 0xc]
mov dword [eax], ebx
mov eax, edx
mov dword [ecx + 0xc], ebx
add esp, 0x23c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp + 0x18], eax
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov edx, dword [esp + 0x18]
jmp 0x401ebd
Function at 0x402620
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap force flags

Disassembly:
push ebp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x2c
mov eax, dword [eax]
test edx, edx
je 0x4026c2
test eax, eax
je 0x4026c2
mov edi, edx
mov ebx, ecx
cmp ecx, 0xffffffff
je 0x4026d0
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
lea ebp, [ecx + ebx + 1]
cmp ebp, edx
jbe 0x40269e
add edx, edx
mov dword [esp + 8], eax
cmp edx, ebp
mov dword [esp + 4], 0
cmovae ebp, edx
mov edx, dword fs:[0x18]
lea ecx, [ebp + ebp]
mov dword [esp + 0x1c], edx
mov dword [esp + 0xc], ecx
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
sub esp, 0x10
test eax, eax
mov edx, dword [esp + 0x1c]
je 0x402708
mov dword [esi], eax
mov ecx, dword [esi + 4]
mov dword [esi + 8], ebp
lea edx, [ebx + ebx]
lea eax, [eax + ecx*2]
mov dword [esp + 4], edi
mov dword [esp + 8], edx
mov dword [esp], eax
call sym._memcpy
mov eax, dword [esi]
add ebx, dword [esi + 4]
xor edx, edx
mov word [eax + ebx*2], dx
mov dword [esi + 4], ebx
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp word [edx], 0
je 0x402730
mov ecx, edx
lea esi, [esi]
nop
add ecx, 2
cmp word [ecx], 0
jne 0x4026e0
sub ecx, edi
mov edx, dword [esi + 8]
mov ebx, ecx
mov ecx, dword [esi + 4]
sar ebx, 1
lea ebp, [ecx + ebx + 1]
cmp ebp, edx
jbe 0x40269e
jmp 0x402656
mov eax, dword [esi]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esi], 0
sub esp, 0xc
jmp 0x4026c2
xor ebx, ebx
jmp 0x402648