joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4019b0
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebx, dword [esp + 0x40]
mov eax, dword [ebx]
test eax, eax
je 0x401b08
mov edi, dword [esp + 0x44]
mov dword [esp + 8], 0
mov edx, dword [edi + 4]
add edx, dword [ebx + 8]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0040dc90
test eax, eax
mov eax, dword [esp + 0x44]
js 0x401b50
mov ebp, dword [eax + 0xc]
mov dword [esp], ebp
call sub.msvcrt.dll_malloc
mov dword [esp + 0x1c], eax
test eax, eax
je 0x401b6d
mov eax, dword [esp + 0x44]
cmp byte [eax + 0x10], 1
je 0x401ae0
mov esi, ebp
xor edi, edi
test ebp, ebp
je 0x401abc
mov ebp, dword [esp + 0x1c]
mov ecx, ebx
jmp 0x401a44
sub esi, dword [esp + 0x10]
sbb edi, dword [esp + 0x14]
add ebp, ebx
mov eax, edi
or eax, esi
je 0x401b00
xor eax, eax
mov edx, 0x2000
mov dword [esp + 0x40], ecx
mov ebx, eax
cmp edx, esi
sbb ebx, edi
cmovae eax, edi
cmovae edx, esi
mov dword [esp + 0x14], eax
mov eax, dword [ecx]
mov ebx, edx
mov dword [esp + 8], 1
mov dword [esp + 0xc], eax
mov dword [esp + 4], edx
mov dword [esp], ebp
mov dword [esp + 0x10], edx
call sub.msvcrt.dll_fread
mov ecx, dword [esp + 0x40]
test eax, eax
jne 0x401a30
mov eax, dword [esp + 0x44]
mov dword [esp + 4], str.Failed_to_extract__s:_failed_to_read_data_chunk__n
mov ebx, ecx
mov dword [esp], str.fread
add eax, 0x12
mov dword [esp + 8], eax
call fcn.00402480
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [esp + 0x1c], 0
mov eax, dword [ebx]
test eax, eax
je 0x401ad0
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [ebx], 0
mov eax, dword [esp + 0x1c]
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x44]
xor ecx, ecx
mov dword [esp], eax
mov eax, ebx
call fcn.00401600
test eax, eax
je 0x401abc
jmp 0x401aa8
mov ebx, ecx
jmp 0x401abc
lea eax, [ebx + 0x70]
mov dword [esp + 4], 0x418184
mov dword [esp], eax
call fcn.004036e0
mov dword [ebx], eax
test eax, eax
jne 0x4019c5
mov eax, dword [esp + 0x44]
mov dword [esp], str.Failed_to_extract__s:_failed_to_open_archive_file__n
add eax, 0x12
mov dword [esp + 4], eax
call fcn.00402430
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0x1c]
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
add eax, 0x12
mov dword [esp + 4], str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
mov dword [esp + 8], eax
mov dword [esp], str.fseek
call fcn.00402480
jmp 0x401b3c
mov eax, dword [esp + 0x44]
mov dword [esp + 0xc], ebp
mov dword [esp + 4], str.Failed_to_extract__s:_failed_to_allocate_data_buffer___u_bytes___n
add eax, 0x12
mov dword [esp], 0x4180d2
mov dword [esp + 8], eax
call fcn.00402480
jmp 0x401ab4
Function at 0x406480
Capabilities:
Query environment variable

Disassembly:
push ebx
mov eax, 0x4018
call fcn.0040d3d0
sub esp, eax
mov eax, dword [esp + 0x4020]
mov dword [esp + 8], 0
lea ebx, [esp + 0x10]
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00407860
mov dword [esp + 8], 0x2000
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
sub esp, 0xc
test eax, eax
jne 0x4064e0
add esp, 0x4018
xor eax, eax
pop ebx
ret
lea eax, [esp + 0x2010]
mov dword [esp + 8], 0x2000
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
sub esp, 0xc
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0
call fcn.00407680
test eax, eax
je 0x4064cc
cmp byte [eax], 0
je 0x4064cc
mov dword [esp], eax
call sub.msvcrt.dll__strdup
add esp, 0x4018
pop ebx
ret

Function at 0x4065a0
Capabilities:
Set environment variable

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [esp + 0x20]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00407860
mov dword [esp + 4], 0
mov ebx, eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
sub esp, 8
mov esi, eax
mov dword [esp], ebx
call sub.msvcrt.dll_free
add esp, 0x14
mov eax, esi
pop ebx
pop esi
ret
Function at 0x4065f0
Capabilities:
Create directory
Query environment variable

Disassembly:
push ebp
mov eax, 0x401c
push edi
push esi
push ebx
call fcn.0040d3d0
sub esp, eax
mov eax, dword [esp + 0x4030]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00407860
test eax, eax
je 0x406750
lea edi, [esp + 0x10]
mov ebx, eax
mov dword [esp + 8], 0x1000
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
sub esp, 0xc
mov esi, eax
mov dword [esp], ebx
call sub.msvcrt.dll_free
test esi, esi
je 0x406730
mov dword [esp], edi
call fcn.00407cf0
test eax, eax
jne 0x406720
mov dword [esp + 8], 0x1000
mov dword [esp + 4], edi
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__wfullpath]
mov esi, eax
test esi, esi
je 0x406760
lea ebp, [esp + 0x2010]
xor eax, eax
mov ecx, 0x800
mov edi, ebp
rep stosd dword es:[edi], eax
mov dword [esp + 4], 0x5c
mov dword [esp], esi
call sub.msvcrt.dll_wcschr
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebx, eax
test eax, eax
je 0x406702
lea esi, [esi]
nop
mov eax, ebx
mov dword [esp + 4], esi
add ebx, 2
sub eax, esi
mov dword [esp], ebp
sar eax, 1
add eax, 1
mov dword [esp + 8], eax
call sub.msvcrt.dll_wcsncpy
mov dword [esp + 4], 0
mov dword [esp], ebp
call edi
sub esp, 8
mov dword [esp], ebx
mov dword [esp + 4], 0x5c
call sub.msvcrt.dll_wcschr
mov ebx, eax
test eax, eax
jne 0x4066c0
mov dword [esp], esi
mov dword [esp + 4], 0
call edi
mov eax, esi
sub esp, 8
add esp, 0x401c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__wcsdup]
mov esi, eax
jmp 0x406682
mov dword [esp], str.LOADER:_Failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
xor esi, esi
call fcn.00402430
add esp, 0x401c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.LOADER:_Failed_to_convert_runtime_tmpdir_to_a_wide_string._n
xor esi, esi
call fcn.00402430
jmp 0x40673e
mov dword [esp], str.LOADER:_Failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
xor esi, esi
call fcn.00402430
jmp 0x40673e
Function at 0x406770
Capabilities:
Get common file path
Set environment variable

Disassembly:
push ebp
mov eax, 0x204c
push edi
push esi
push ebx
call fcn.0040d3d0
sub esp, eax
mov ecx, dword [esp + 0x2064]
test ecx, ecx
je 0x4067d7
mov dword [esp], 0x41a37b
call fcn.00406480
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x2064]
mov dword [esp], eax
call fcn.004065f0
mov ebx, eax
test eax, eax
je 0x406870
mov dword [esp + 4], eax
mov dword [esp], 0x41a380
call dword [sym.imp.msvcrt.dll__wputenv_s]
mov dword [esp], ebx
mov esi, eax
call sub.msvcrt.dll_free
test esi, esi
jne 0x406880
lea edi, [esp + 0x40]
mov dword [esp], 0x1000
mov ebx, 5
mov dword [esp + 4], edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
sub esp, 8
call sub.msvcrt.dll__getpid
lea esi, [esp + 0x20]
mov dword [esp + 8], str._MEI_d
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x10
mov dword [esp], esi
call fcn.004062f0
mov dword [esp + 4], esi
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__wtempnam]
mov dword [esp], eax
mov ebp, eax
call fcn.00407aa0
test eax, eax
je 0x406890
mov dword [esp], ebp
call sub.msvcrt.dll_free
sub ebx, 1
jne 0x406819
mov eax, dword [esp + 0x2064]
test eax, eax
je 0x406870
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x4068e8
mov dword [esp + 4], edi
mov dword [esp], 0x41a37b
call fcn.00406530
mov dword [esp], edi
call sub.msvcrt.dll_free
xor eax, eax
add esp, 0x204c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.LOADER:_Failed_to_set_the_TMP_environment_variable._n
call fcn.00402430
jmp 0x406870
mov eax, dword [esp + 0x2060]
mov dword [esp + 8], 0x1000
mov dword [esp + 4], ebp
mov dword [esp], eax
call fcn.00407680
mov dword [esp], ebp
call sub.msvcrt.dll_free
mov edx, dword [esp + 0x2064]
test edx, edx
je 0x4068de
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x406927
mov dword [esp + 4], edi
mov dword [esp], 0x41a37b
call fcn.00406530
mov dword [esp], edi
call sub.msvcrt.dll_free
mov eax, 1
jmp 0x406872
mov dword [esp + 8], 0
mov dword [esp + 4], 0x41a37b
mov dword [esp], 0
call fcn.00407860
mov dword [esp + 4], 0
mov ebx, eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
sub esp, 8
mov dword [esp], ebx
call sub.msvcrt.dll_free
jmp 0x406870
mov dword [esp + 8], 0
mov dword [esp + 4], 0x41a37b
mov dword [esp], 0
call fcn.00407860
mov dword [esp + 4], 0
mov ebx, eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
sub esp, 8
mov dword [esp], ebx
call sub.msvcrt.dll_free
jmp 0x4068de
Function at 0x4069e0
Capabilities:
Delete directory

Disassembly:
push ebp
mov eax, 0x445c
push edi
push esi
push ebx
call fcn.0040d3d0
sub esp, eax
mov eax, dword [esp + 0x4470]
mov dword [esp + 8], 0x1000
lea ebp, [esp + 0x44c]
mov dword [esp + 4], eax
lea eax, [esp + 0x244e]
mov dword [esp], eax
call fcn.00407860
lea eax, [esp + 0x244e]
mov dword [esp], ebp
mov dword [esp + 4], eax
call sub.msvcrt.dll_wcscpy
mov dword [esp], ebp
call sub.msvcrt.dll_wcslen
mov dword [esp + 0x22c], eax
mov esi, eax
movzx eax, word [esp + eax*2 + 0x44a]
cmp ax, 0x2f
je 0x406a55
cmp ax, 0x5c
jne 0x406ae8
mov dword [esp + 4], 0x41a408
lea ebx, [esp + 0x230]
mov dword [esp], ebp
call sub.msvcrt.dll_wcscat
mov dword [esp + 4], ebx
mov dword [esp], ebp
call dword [sym.imp.msvcrt.dll__wfindfirst]
mov dword [esp + 0x228], eax
cmp eax, 0xffffffff
jne 0x406aa0
lea eax, [esp + 0x244e]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__wrmdir]
add esp, 0x445c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, 0x87
mov edi, esp
mov esi, ebx
mov eax, ebp
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x22c]
call fcn.00406b10
mov eax, dword [esp + 0x228]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__wfindnext]
test eax, eax
je 0x406aa0
mov eax, dword [esp + 0x228]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__findclose]
jmp 0x406a85
mov dword [esp + 4], 0x41a404
add esi, 1
mov dword [esp], ebp
call sub.msvcrt.dll_wcscat
mov dword [esp + 0x22c], esi
jmp 0x406a55

Function at 0x406b10
Capabilities:
Delete directory
Delete file

Disassembly:
push edi
push esi
push ebx
push eax
mov eax, 0x101c
call fcn.0040d3d0
sub esp, eax
mov edi, edx
mov eax, dword [esp + eax]
lea esi, [esp + 0x1044]
mov dword [esp + 4], 0x41a40c
mov dword [esp], esi
mov ebx, eax
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x406b50
add esp, 0x1020
pop ebx
pop esi
pop edi
ret
mov dword [esp + 4], 0x41a410
mov dword [esp], esi
call sub.msvcrt.dll_wcscmp
test eax, eax
je 0x406b42
xor eax, eax
mov word [ebx + edi*2], ax
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.msvcrt.dll_wcscat
test byte [esp + 0x1030], 0x10
mov dword [esp], ebx
je 0x406bb0
call fcn.00407c70
test eax, eax
jne 0x406be0
mov dword [esp + 4], ebx
lea ebx, [esp + 0x1f]
mov dword [esp + 8], 0x1000
mov dword [esp], ebx
call fcn.00407680
mov dword [esp], ebx
call fcn.004069e0
jmp 0x406b42
mov esi, dword [sym.imp.msvcrt.dll__wremove]
call esi
test eax, eax
je 0x406b42
mov dword [esp], 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
mov dword [esp], ebx
call esi
jmp 0x406b42
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__wrmdir]
jmp 0x406b42
Function at 0x406d90
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push edi
mov eax, 0x1010
push esi
push ebx
call fcn.0040d3d0
sub esp, eax
mov eax, dword [esp + 0x1020]
mov dword [esp + 4], 0x41a44c
mov dword [esp], eax
call fcn.004036e0
mov ebx, eax
mov eax, dword [esp + 0x1028]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1024]
mov dword [esp], eax
call fcn.00406bf0
mov edi, eax
test ebx, ebx
je 0x406ea8
test eax, eax
je 0x406e9c
lea esi, [esp + 0x10]
lea esi, [esi]
nop
mov dword [esp], ebx
call sub.msvcrt.dll_feof
test eax, eax
jne 0x406e98
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 1
mov dword [esp], esi
call sub.msvcrt.dll_fread
test eax, eax
jne 0x406e40
mov dword [esp], ebx
call sub.msvcrt.dll_ferror
test eax, eax
je 0x406df0
mov dword [esp], ebx
call sub.msvcrt.dll_clearerr
jmp 0x406e70
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call sub.msvcrt.dll_fwrite
test eax, eax
je 0x406e68
mov dword [esp], edi
call sub.msvcrt.dll_ferror
test eax, eax
je 0x406df0
mov dword [esp], edi
call sub.msvcrt.dll_clearerr
mov esi, 0xffffffff
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp], edi
call sub.msvcrt.dll_fclose
add esp, 0x1010
mov eax, esi
pop ebx
pop esi
pop edi
ret
xor esi, esi
jmp 0x406e75
test ebx, ebx
je 0x406ea8
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
test edi, edi
je 0x406eb4
mov dword [esp], edi
call sub.msvcrt.dll_fclose
mov esi, 0xffffffff
jmp 0x406e85
Function at 0x406f50
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
push ebp
mov eax, 0x20ac
push edi
push esi
push ebx
call fcn.0040d3d0
sub esp, eax
mov eax, dword [esp + 0x20c0]
lea edi, [esp + 0xa0]
mov dword [esp + 8], 0x1000
mov dword [esp], edi
mov dword [esp + 4], eax
mov dword [esp + 0x3c], 0
call fcn.00407860
mov dword [esp + 4], 1
mov dword [esp], 0x4062c0
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
sub esp, 8
lea ebp, [esp + 0x5c]
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 1
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, 1
mov esi, dword [fcn.00415ba0]
sub esp, 4
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x88], 0x101
mov word [esp + 0x8c], ax
mov dword [esp], 0
call esi
mov dword [esp], eax
call sub.msvcrt.dll__fileno_1
mov ebx, dword [sym.imp.msvcrt.dll__get_osfhandle]
mov dword [esp], eax
call ebx
mov dword [esp], 1
mov dword [esp + 0x94], eax
call esi
mov dword [esp], eax
call sub.msvcrt.dll__fileno_1
mov dword [esp], eax
call ebx
mov dword [esp], 2
mov dword [esp + 0x98], eax
call esi
mov dword [esp], eax
call sub.msvcrt.dll__fileno_1
mov dword [esp], eax
call ebx
mov dword [esp + 0x9c], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea edx, [esp + 0x4c]
mov dword [esp], edi
mov dword [esp + 0x24], edx
lea edx, [esp + 0x40]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
sub esp, 0x28
test eax, eax
je 0x4070f8
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
lea eax, [esp + 0x3c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
sub esp, 8
mov eax, dword [esp + 0x3c]
add esp, 0x20ac
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], str.Error_creating_child_process__n
mov dword [esp], str.CreateProcessW
call fcn.004024b0
add esp, 0x20ac
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4072e0
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov dword [esp], 0x2000
mov edi, dword [esp + 0x58]
call sub.msvcrt.dll_malloc
mov ebx, eax
test eax, eax
je 0x407428
mov eax, dword [esp + 0x50]
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0040dc90
test eax, eax
js 0x407428
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call fcn.0040dd70
mov dword [esp + 0x24], 0
cdq
cmp eax, edi
mov dword [esp + 0x20], edi
mov ecx, edx
sbb ecx, dword [esp + 0x24]
jb 0x407428
mov ebp, ebx
mov esi, 0x2000
xor ecx, ecx
mov ebx, edx
cmp eax, esi
sbb ebx, ecx
cmovae esi, eax
cmovae ecx, edx
mov dword [esp + 0x18], esi
mov esi, eax
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
add ecx, 0xffffe000
adc ebx, 0xffffffff
sub esi, ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebx
cmp esi, edi
jb 0x407422
mov eax, dword [esp + 0x50]
mov dword [esp + 8], 0
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040dc90
test eax, eax
js 0x407422
mov eax, dword [esp + 0x50]
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], ebp
call sub.msvcrt.dll_fread
cmp eax, esi
jne 0x407422
sub eax, edi
mov ebx, ebp
lea esi, [eax + 1]
jmp 0x4073f8
mov eax, dword [esp + 0x54]
lea ebp, [esi - 1]
mov dword [esp + 8], edi
mov dword [esp + 4], eax
lea eax, [ebx + ebp]
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x407440
mov esi, ebp
test esi, esi
jne 0x4073d8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov ebp, ebx
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x2c]
add eax, 0xffffffff
adc edx, 0xffffffff
mov esi, ebx
add eax, ecx
adc edx, ebx
or esi, ecx
jne 0x40734e
mov ebx, ebp
lea esi, [esi]
xor esi, esi
xor edi, edi
mov dword [esp], ebx
call sub.msvcrt.dll_free
add esp, 0x3c
mov eax, esi
mov edx, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
add eax, 0xffffdfff
adc edx, 0xffffffff
xor edi, edi
add esi, eax
adc edi, edx
jmp 0x40742c
Function at 0x407aa0
Capabilities:
Create directory

Disassembly:
push ebp
mov eax, 0x203c
push edi
push esi
push ebx
call fcn.0040d3d0
sub esp, eax
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x24], 0
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edx, [esp + 0x20]
mov dword [esp + 4], 8
mov dword [esp + 8], edx
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
sub esp, 0xc
lea edi, [esp + 0x24]
test eax, eax
jne 0x407bb8
xor ebx, ebx
lea esi, [esp + 0x30]
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x20]
cmp eax, 0xffffffff
je 0x407b19
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov ebx, dword [esp + 0x30]
mov eax, str.S_1_3_4
mov dword [esp], esi
mov dword [esp + 8], str.D:_A__FA____s_
test ebx, ebx
mov dword [esp + 4], 0x1000
cmovne eax, ebx
mov dword [esp + 0xc], eax
call dword [sym.imp.msvcrt.dll__snwprintf]
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
sub esp, 4
lea eax, [esp + 0x28]
mov dword [esp + 0x24], 0xc
mov dword [esp + 0x2c], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
sub esp, 0x10
test eax, eax
je 0x407c60
mov eax, dword [esp + 0x2050]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
sub esp, 8
cmp eax, 1
sbb eax, eax
add esp, 0x203c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], eax
call esi
sub esp, 0x14
test eax, eax
jne 0x407bf9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x407af6
mov ebp, dword [esp + 0x24]
mov dword [esp], 1
mov dword [esp + 4], ebp
call sub.msvcrt.dll_calloc
mov ebx, eax
mov eax, dword [esp + 0x20]
test ebx, ebx
je 0x407af6
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebp
mov dword [esp + 8], ebx
mov dword [esp + 4], 1
mov dword [esp], eax
call esi
sub esp, 0x14
lea esi, [esp + 0x30]
test eax, eax
je 0x407afc
mov dword [esp + 4], esi
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
sub esp, 8
jmp 0x407afc
mov eax, 0xffffffff
jmp 0x407ba8
Function at 0x40c6b0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.00415ba0
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.00415ba0
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x40c710
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x4302ac]
test esi, esi
jle 0x40c830
mov eax, dword [0x4302b0]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x40c744
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40c7c7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x40c730
mov dword [esp], ebx
call fcn.0040d100
mov edi, eax
test eax, eax
je 0x40c857
mov eax, dword [0x4302b0]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.0040d240
mov edx, dword [0x4302b0]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x40c837
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x40c7c0
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x40c7d0
add dword [0x4302ac], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x4302b0]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x40c7c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.0040c6b0
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x40c74e
mov eax, dword [0x4302b0]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.0040c6b0
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.0040c6b0
lea esi, [esi]
nop
Function at 0x40cd70
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x4302c8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x4302c0]
sub esp, 4
test ebx, ebx
je 0x40cdc5
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x40cdbe
test esi, esi
je 0x40cdbe
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40cda0
mov dword [esp], 0x4302c8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40d100
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x40d125
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x40d130
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x40d125
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x40d178
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40d16e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40d17a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x40d160
xor eax, eax
pop ebx
pop esi
ret