joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4df990
Capabilities:
Write clipboard data

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x2c]
push ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x1c], 0
xor eax, eax
push fcn.004df970
push ebp
push 0x414060
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 8]
mov edx, dword [edx]
call dword [edx + 0x70]
push eax
push 2
call sub.kernel32.dll_GlobalAlloc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4df9e3
jmp 0x4dfa60
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 8]
mov edx, dword [edx]
call dword [edx + 0x70]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
push dword [ebp - 0x24]
push dword [ebp - 0x28]
lea eax, [ebp - 0x1c]
call fcn.0046a890
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x2c]
call fcn.0046a7e0
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
call fcn.0046afa0
mov ebx, eax
mov eax, str._DataSize
push eax
push dword [ebp - 0x18]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 0x24]
mov edx, str.TWin32WidgetSet.ClipboardGetOwnerShip_DataHandle
mov eax, ebx
call fcn.0046c450
mov eax, dword [ebp - 0xc]
mov byte [eax - 0x10], 0
jmp 0x4dfab7
push dword [ebp - 0x10]
call sub.kernel32.dll_GlobalLock
mov dword [ebp - 0x14], eax
xor eax, eax
push fcn.004df950
push ebp
push 0x414060
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 8]
mov edx, dword [edx]
call dword [edx + 0x70]
mov ecx, eax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
mov ebx, dword [ebp - 8]
mov ebx, dword [ebx]
call dword [ebx + pe_nt_image_headers32]
xor edx, edx
pop eax
add esp, 0xc
mov dword fs:[edx], eax
mov eax, ebp
call fcn.004df950
push dword [ebp - 0x10]
push dword [ebp - 4]
call sub.user32.dll_SetClipboardData
xor edx, edx
pop eax
add esp, 0xc
mov dword fs:[edx], eax
mov eax, ebp
call fcn.004df970
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x50b0c0
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x10]
push ebx
push esi
push edi
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], edx
mov dword [ebp - 4], ecx
cmp dword [ebp - 8], 1
je 0x50b0db
jmp 0x50b0e8
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call dword [edx + 0x34]
mov dword [ebp - 0xc], eax
nop
cmp dword [ebp - 0xc], 0
je 0x50b0f0
jmp 0x50b0f8
jmp 0x50b1aa
xor eax, eax
push 0x50b187
push ebp
push 0x4143e0
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 0xc]
mov edx, 0
call fcn.0040d010
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov dword [edx + 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x20], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x14], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x18], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x30], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x34], 0
mov dword [ebp - 0x10], 1
cmp dword [ebp - 0xc], 0
jne 0x50b169
jmp 0x50b17c
cmp dword [ebp - 8], 0
jne 0x50b171
jmp 0x50b17c
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx]
call dword [edx + 0x44]
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
jmp 0x50b1aa
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x54de30
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x18]
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
xor eax, eax
push fcn.0054de10
push ebp
push 0x414060
push dword fs:[eax]
mov dword fs:[eax], esp
push dword [ebp - 4]
call sub.user32.dll_GetWindowTextLengthW
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
lea eax, [ebp - 0x10]
call fcn.0040a890
cmp dword [ebp - 0xc], 0
jg 0x54de7c
jmp 0x54de9c
mov eax, dword [ebp - 0xc]
lea eax, [eax + 1]
push eax
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x54de8f
mov eax, 0x5e12f0
push eax
push dword [ebp - 4]
call sub.user32.dll_GetWindowTextW
mov dword [ebp - 0xc], eax
nop
mov edx, dword [ebp - 0xc]
lea eax, [ebp - 0x10]
call fcn.0040a890
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x18]
call fcn.0040afd0
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
test edx, edx
je 0x54dec5
mov edx, dword [edx - 4]
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x54ded1
mov eax, 0x5e12f0
call fcn.0042f280
mov eax, dword [ebp - 8]
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.0054de10
mov esp, ebp
pop ebp
ret
Function at 0x54f510
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x10]
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
mov edx, 0x5d2d20
call fcn.0040e720
mov dword [ebp - 0x10], 0
xor eax, eax
push fcn.0054f500
push ebp
push 0x414060
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
mov dword [eax + 8], 0
mov eax, dword [ebp - 0xc]
mov dword [eax], 0
mov eax, dword [ebp - 0xc]
lea eax, [eax + 0x34]
mov edx, 0
call fcn.00408a70
mov eax, dword [ebp - 0xc]
mov edx, fcn.004dc530
mov dword [eax + 0x2c], edx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
mov dword [edx + 0x24], eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov dword [edx + 0x28], eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x1c]
mov dword [edx + 4], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
lea ecx, [ebp - 0x10]
mov dx, 0
call fcn.004093c0
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
lea eax, [eax + 0x30]
call fcn.00408a70
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0xc]
mov dword [edx + 0xc], eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x10]
mov dword [edx + 0x10], eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
mov dword [edx + 0x18], eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x18]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 0xc]
lea ecx, [eax + 0x10]
mov eax, dword [ebp - 0xc]
lea edx, [eax + 0xc]
mov eax, dword [ebp - 4]
call fcn.0054d4a0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.0054fba0
mov eax, dword [ebp - 4]
test dword [eax + 0x28], 0x10
je 0x54f615
jmp 0x54f634
mov eax, dword [ebp - 4]
call fcn.004fe960
test al, al
je 0x54f623
jmp 0x54f634
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x24]
or eax, 0x8000000
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x24], eax
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.0054f500
mov esp, ebp
pop ebp
ret
Function at 0x567c40
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x18]
push ebx
push esi
mov ebx, eax
mov esi, edx
mov eax, esi
xor cl, cl
mov edx, 0x20
call fcn.00403710
lea eax, [ebp - 8]
push eax
push 0
lea eax, [esi + 0x10]
push eax
lea eax, [esi + 0xc]
push eax
lea eax, [esi + 8]
push eax
push 0
lea eax, [esi + 4]
push eax
mov eax, esi
push eax
push 0
push 0
push 0
push dword [ebx + 0x14]
call sub.advapi32.dll_RegQueryInfoKeyA
mov dword [ebx + 4], eax
test eax, eax
sete bl
jne 0x567ca8
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 8]
push eax
call sub.kernel32.dll_FileTimeToSystemTime
lea eax, [ebp - 0x18]
call fcn.0044cc80
fstp qword [esi + 0x18]
mov esi, esi
mov al, bl
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x567fc0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x44]
push ebx
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x44], 0
xor eax, eax
push fcn.00567fa0
push ebp
push 0x414060
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x40], 0
lea eax, [ebp - 0x40]
push eax
mov edx, 0x5dbfb8
mov eax, dword [ebp - 8]
mov ecx, 1
call fcn.0040cb60
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 4]
call fcn.00567c40
test al, al
je 0x568130
cmp dword [ebp - 0x20], 0
jle 0x568130
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x2c], eax
mov edx, eax
shl edx, 1
lea eax, [ebp - 0x30]
call fcn.0040f970
xor eax, eax
push fcn.00567f90
push ebp
push 0x414060
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x40]
push eax
mov edx, 0x5dbfb8
mov eax, dword [ebp - 8]
mov ecx, 1
call fcn.0040cb60
mov eax, dword [ebp - 0x20]
lea ebx, [eax - 1]
mov dword [ebp - 0x34], 0xffffffff
lea esi, [esi]
add dword [ebp - 0x34], 1
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x2c], eax
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x34]
mov eax, dword [ebp - 4]
push dword [eax + 0x14]
call sub.advapi32.dll_RegEnumValueW
mov dword [ebp - 0x38], eax
cmp eax, 0x103
je 0x56811d
cmp dword [ebp - 0x38], 0
je 0x5680e4
mov eax, dword [ebp - 0x38]
lea edx, [ebp - 0x44]
call fcn.00453470
mov ecx, dword [ebp - 0x44]
mov edx, 1
mov eax, 0x5dbd90
call fcn.00451030
mov edx, 0x5680ba
mov ecx, ebp
call fcn.00413f20
nop
cmp dword [ebp - 0x2c], 0
jne 0x5680f6
lea eax, [ebp - 0x3c]
xor edx, edx
call fcn.0040b060
jmp 0x568101
lea edx, [ebp - 0x3c]
mov eax, dword [ebp - 0x30]
call fcn.0040b010
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x34]
lea eax, [eax + edx*4]
mov edx, dword [ebp - 0x3c]
call fcn.0040b060
cmp ebx, dword [ebp - 0x34]
ja 0x568080
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.00567f90
lea esi, [esi]
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.00567fa0
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401cc0
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x424200]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 0
mov byte [ebp - 0xc], 0
mov byte [ebp - 0xb], 0
mov byte [ebp - 0xa], 0
mov byte [ebp - 9], 0
mov byte [ebp - 8], 0
mov byte [ebp - 7], 5
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x401d31
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x10]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
nop
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402284
mov esp, ebp
pop ebp
ret

Function at 0x401d50
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x424200]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.00401cc0
test eax, eax
jne 0x401dfa
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x401dfa
mov dword [ebp - 0x144], 0x3c
push 0x38
push 0
lea ecx, [ebp - 0x140]
push ecx
call fcn.00404f50
add esp, 0xc
mov dword [ebp - 0x138], str.runas
lea edx, [ebp - 0x108]
mov dword [ebp - 0x134], edx
mov dword [ebp - 0x130], 0x424008
mov dword [ebp - 0x13c], 0
mov dword [ebp - 0x128], 0
lea eax, [ebp - 0x144]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
jne 0x401df2
push 1
call fcn.004074e5
nop
push 0
call fcn.004074e5
nop
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402284
mov esp, ebp
pop ebp
ret

Function at 0x401fc0
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0xf0000000
push 0x18
push 0
push 0
lea eax, [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x40200c
mov ecx, dword [ebp + 8]
push ecx
push 0x20
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov eax, dword [ebp + 0xc]
push eax
push 0x10
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
jmp 0x402021
push str.Failed_to_acquire_cryptographic_context._n
call fcn.004021b0
add esp, 4
push 1
call fcn.004074e5
nop
mov esp, ebp
pop ebp
ret
Function at 0x402030
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x424200]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 2
jge 0x402077
call fcn.00401d50
push 0
push 0
push 0x4241c0
mov eax, 4
imul ecx, eax, 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
xor eax, eax
jmp 0x402119
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x34]
push edx
call fcn.00401fc0
add esp, 8
call fcn.00401e10
push str.__food
mov eax, 4
shl eax, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
call fcn.00406f10
add esp, 8
test eax, eax
jne 0x4020c0
push 0
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x34]
push ecx
call fcn.00401970
add esp, 0xc
jmp 0x402117
push str.__rest
mov edx, 4
shl edx, 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx]
push ecx
call fcn.00406f10
add esp, 8
test eax, eax
jne 0x4020f4
push 1
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x34]
push eax
call fcn.00401970
add esp, 0xc
jmp 0x402117
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
push eax
push str.Invalid_parameter:__s_n
call fcn.004021b0
add esp, 8
mov eax, 1
jmp 0x402119
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402284
mov esp, ebp
pop ebp
ret

Function at 0x402e38
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x402e77
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x402e77
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402e77
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x402e77
cmp dword [ecx + 0x74], 0xe
jbe 0x402e77
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x40e342
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41de6c
push 0x41de64
push str.FlsAlloc
push 0x1f
call fcn.0040e1c1
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40e376
push dword [ebp + 8]
mov ecx, esi
call dword [0x41c1ac]
call esi
jmp 0x40e37c
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40e3c0
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41de7c
push 0x41de74
push str.FlsGetValue
push 0x21
call fcn.0040e1c1
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40e3f7
push dword [ebp + 8]
mov ecx, esi
call dword [0x41c1ac]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40e3ff
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41de84
push 0x41de7c
push str.FlsSetValue
push 0x22
call fcn.0040e1c1
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40e439
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41c1ac]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x40f2b7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x425320]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40f2f7
cmp byte [ebx], 0xa
jne 0x40f2f7
or byte [edi + eax + 0x28], 4
jmp 0x40f2fc
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x40f3fb
mov dl, byte [eax]
cmp dl, 0x1a
je 0x40f3de
inc eax
cmp dl, 0xd
je 0x40f328
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x40f34e
cmp eax, ecx
jae 0x40f35c
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x40f310
jmp 0x40f3fb
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f3d9
cmp dword [ebp - 0x10], 0
je 0x40f3d9
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x425320]
test byte [eax + edi + 0x28], 0x48
je 0x40f3b3
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x40f39e
mov byte [esi], dl
jmp 0x40f3af
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x425320]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x40f3fb
cmp byte [ebp - 1], 0xa
jne 0x40f3c2
cmp esi, ebx
jne 0x40f3c2
mov byte [esi], 0xa
jmp 0x40f3fa
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004162c3
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40f3fb
mov byte [esi], 0xd
jmp 0x40f3fa
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x425320]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40f3f8
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40f3fb
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40f404
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x425320]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40f44a
cmp word [ebx], dx
jne 0x40f44a
or byte [eax + edi + 0x28], 4
jmp 0x40f44f
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x40f5b2
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x40f592
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x40f490
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x40f4c6
cmp eax, edx
jae 0x40f4d4
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x40f46b
jmp 0x40f5b2
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f58d
cmp dword [ebp - 0x18], 0
je 0x40f58d
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x425320]
test byte [eax + edi + 0x28], 0x48
je 0x40f563
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x40f527
mov word [esi], cx
jmp 0x40f55e
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x425320]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x425320]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x425320]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x40f5b2
pop eax
cmp word [ebp - 4], ax
jne 0x40f573
cmp esi, ebx
jne 0x40f573
mov word [esi], ax
jmp 0x40f5af
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004162c3
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x40f5b2
push 0xd
pop eax
jmp 0x40f56e
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x425320]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x40f5ac
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x40f5b2
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4131cb
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x413268
push ebx
push esi
call fcn.00413194
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0040d31e
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x413215
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x413267
push edi
push eax
call fcn.0040d11a
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x413235
call fcn.0040d0e0
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x413266
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040d31e
add esp, 0x20
test eax, eax
jne 0x413254
push edi
call fcn.0040d0e0
jmp 0x41325c
push ebx
call fcn.0040d0e0
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x419515
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00419491
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x419684
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x419684
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x419639
jg 0x419571
test eax, eax
je 0x41962f
push 1
push 0x1000
call fcn.0040e031
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x419594
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x419626
push 0x8000
push ebx
call fcn.0040be3b
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x4195bd
jg 0x4195b8
cmp ecx, 0x1000
jb 0x4195bd
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004106bb
add esp, 0x10
cmp eax, 0xffffffff
je 0x419602
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x4195b8
jl 0x4195e9
test ecx, ecx
jne 0x4195aa
push dword [ebp - 0xc]
push ebx
call fcn.0040be3b
push esi
call fcn.0040d0e0
add esp, 0xc
xor ebx, ebx
jmp 0x419692
cmp byte [edi + 0x24], 0
je 0x419619
cmp dword [edi + 0x20], 5
jne 0x419619
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x419624
mov ebx, dword [edi + 0x18]
jmp 0x419626
xor ebx, ebx
push esi
call fcn.0040d0e0
pop ecx
jmp 0x419692
test ecx, ecx
jg 0x4195fb
jl 0x419639
test eax, eax
jae 0x4195fb
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004162c3
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x419659
cmp byte [edi + 0x1c], 0
je 0x4195fb
jmp 0x41968a
push ebx
call fcn.004139bf
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4195fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x419692
cmp byte [edi + 0x1c], 0
je 0x41968f
mov ebx, dword [edi + 0x18]
jmp 0x419692
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004162c3
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x41ac20
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41ac4d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41ac4d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret