joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40905a
Capabilities:
Get common file path

Disassembly:
mov eax, 0x411f4f
call fcn.0040bb78
sub esp, 0x288
push ebx
push esi
push edi
push 0x13
mov ebx, ecx
pop ecx
xor eax, eax
lea edi, [ebp - 0x70]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x294]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
mov eax, dword [ebx + 0x14]
inc eax
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00409662
and dword [ebp - 4], 0
cmp dword [ebx + 0x18], 0x10
mov ecx, dword [ebx + 0x14]
lea eax, [ebx + 4]
mov dword [ebp - 0x14], eax
jb 0x4090ae
mov eax, dword [eax]
mov edi, dword [ebp - 0x20]
mov esi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0xd]
lea eax, [ebp - 0x24]
mov byte [ebp - 0xd], 0
call fcn.00409680
lea eax, [ebp - 0x190]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x294]
mov dword [ebp - 0x44], eax
xor edi, edi
lea eax, [ebp - 0x70]
inc edi
push eax
mov byte [ebp - 0x190], 0
mov dword [ebp - 0x70], 0x4c
mov dword [ebp - 0x50], 0x104
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x3c], 0x280c
call dword [0x413298]
test eax, eax
jne 0x409122
xor bl, bl
jmp 0x409188
mov edx, dword [ebx + 0x18]
cmp edx, 0x10
mov eax, dword [ebp - 0x14]
jb 0x409131
mov ecx, dword [eax]
jmp 0x409134
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ebx + 0x14]
add ebx, ecx
cmp edx, 0x10
jb 0x409140
mov eax, dword [eax]
inc eax
push ebx
push eax
lea esi, [ebp - 0x8c]
call fcn.00409633
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x190]
push eax
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.00401988
xor ebx, ebx
cmp word [ebp - 0x36], bx
jne 0x409179
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x8c]
call fcn.00403140
push ebx
push edi
lea ecx, [ebp - 0x8c]
call fcn.004019f6
mov bl, 1
lea esi, [ebp - 0x24]
call fcn.00403301
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, bl
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x4091f3
Capabilities:
Check if file exists
Get file attributes

Disassembly:
cmp dword [eax + 0x18], 0x10
jb 0x4091fe
mov eax, dword [eax + 4]
jmp 0x409201
add eax, 4
push eax
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov al, cl
ret

Function at 0x409213
Capabilities:
Copy file
Get file attributes
Set file attributes

Disassembly:
cmp dword [esi + 0x18], 0x10
push edi
lea edi, [esi + 4]
jb 0x409221
mov ecx, dword [edi]
jmp 0x409223
mov ecx, edi
cmp dword [eax + 0x18], 0x10
jb 0x40922e
mov eax, dword [eax + 4]
jmp 0x409231
add eax, 4
push 0
push ecx
push eax
call dword [sym.imp.kernel32.dll_CopyFileA]
test eax, eax
jne 0x409243
xor al, al
pop edi
ret
cmp dword [esi + 0x18], 0x10
jb 0x40924d
mov eax, dword [edi]
jmp 0x40924f
mov eax, edi
push eax
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
and eax, 0xfffffffe
cmp dword [esi + 0x18], 0x10
jb 0x409261
mov edi, dword [edi]
push eax
push edi
call dword [sym.imp.kernel32.dll_SetFileAttributesA]
mov al, 1
pop edi
ret
Function at 0x40936a
Capabilities:
Create process on windows

Disassembly:
mov eax, 0x411f0e
call fcn.0040bb78
sub esp, 0xe4
push ebx
push esi
push edi
push 0x11
pop ecx
xor eax, eax
lea edi, [ebp - 0xf0]
rep stosd dword es:[edi], eax
push 0x4149cc
lea ecx, [ebp - 0x90]
mov dword [ebp - 0xf0], 0x44
call fcn.00401896
mov esi, eax
xor ebx, ebx
push 0x414858
lea ecx, [ebp - 0x74]
mov dword [ebp - 4], ebx
call fcn.00401896
push dword [ebp + 8]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0xac]
push eax
call fcn.0040979f
push esi
push eax
lea eax, [ebp - 0x58]
push eax
mov byte [ebp - 4], 2
call fcn.0040979f
push dword [ebp + 0xc]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.0040979f
add esp, 0x24
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x58]
call fcn.004019f6
push ebx
push edi
lea ecx, [ebp - 0xac]
call fcn.004019f6
push ebx
push edi
lea ecx, [ebp - 0x74]
call fcn.004019f6
push ebx
push edi
lea ecx, [ebp - 0x90]
call fcn.004019f6
cmp dword [ebp - 0x24], 0x10
mov eax, dword [ebp - 0x38]
jae 0x40942c
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0xf0]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
push ebx
call dword [sym.imp.kernel32.dll_CreateProcessA]
test eax, eax
jne 0x40944e
mov byte [ebp - 0xd], bl
jmp 0x409472
cmp byte [ebp + 0x10], bl
je 0x40945e
push 0xffffffffffffffff
push dword [ebp - 0x20]
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
push dword [ebp - 0x20]
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
call esi
push dword [ebp - 0x1c]
call esi
mov byte [ebp - 0xd], 1
push ebx
push edi
lea ecx, [ebp - 0x3c]
call fcn.004019f6
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xd]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x409d52
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
and dword [ebp - 4], 0
push ebx
push esi
mov esi, dword [ecx]
mov dword [eax], esi
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov dword [ebp - 0x24], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov ebx, dword [ecx + 0xc]
mov dword [ebp - 0x20], edx
mov dword [eax + 0xc], ebx
mov edx, dword [ecx + 0x10]
mov dword [eax + 0x10], edx
mov dword [ebp - 0x18], edx
mov edx, dword [ecx + 0x14]
mov dword [eax + 0x14], edx
mov dword [ebp - 0x14], edx
mov edx, dword [ecx + 0x18]
mov dword [eax + 0x18], edx
mov ecx, dword [ecx + 0x1c]
mov dword [ebp - 0x10], edx
push edi
mov dword [ebp - 0xc], ecx
mov dword [eax + 0x1c], ecx
lea edx, [eax + 0x24]
shr ecx, 0x18
mov ecx, dword [ecx*4 + 0x41ac20]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
shr eax, 0x10
movzx edi, al
xor ecx, dword [edi*4 + 0x41a820]
mov eax, dword [ebp - 0xc]
shr eax, 8
movzx edi, al
xor ecx, dword [edi*4 + 0x41a420]
movzx edi, byte [ebp - 0xc]
xor ecx, dword [edi*4 + 0x41b020]
mov edi, dword [ebp - 4]
xor ecx, dword [edi + 0x41a3e0]
add dword [ebp - 4], 4
xor esi, ecx
mov ecx, dword [ebp - 0x24]
xor ecx, esi
xor dword [ebp - 0x20], ecx
mov dword [edx], ecx
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x20]
xor ebx, ecx
mov dword [edx + 4], ecx
mov eax, ebx
shr eax, 0x10
movzx edi, al
mov dword [edx - 4], esi
mov dword [edx + 8], ebx
mov ecx, ebx
shr ecx, 0x18
mov ecx, dword [ecx*4 + 0x41b020]
xor ecx, dword [edi*4 + 0x41ac20]
mov eax, ebx
shr eax, 8
movzx edi, al
xor ecx, dword [edi*4 + 0x41a820]
mov eax, dword [ebp - 8]
movzx edi, bl
xor ecx, dword [edi*4 + 0x41a420]
mov edi, dword [ebp - 0xc]
xor dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x18]
mov dword [edx + 0xc], ecx
mov ecx, dword [ebp - 0x14]
xor ecx, dword [ebp - 0x18]
add edx, 0x20
xor dword [ebp - 0x10], ecx
mov dword [edx - 0x10], ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x10]
xor edi, ecx
cmp dword [ebp - 4], 0x18
mov dword [edx - 0xc], ecx
mov dword [edx - 8], edi
mov dword [ebp - 0xc], edi
mov ecx, edi
jb 0x409da2
mov dword [ebp - 8], ebx
mov ebx, ecx
shr ebx, 0x10
movzx edi, bl
mov edx, ecx
shr edx, 0x18
mov edx, dword [edx*4 + 0x41ac20]
xor edx, dword [edi*4 + 0x41a820]
mov ebx, ecx
shr ebx, 8
movzx edi, bl
xor edx, dword [edi*4 + 0x41a420]
mov ebx, dword [ebp - 8]
movzx ecx, cl
xor edx, dword [ecx*4 + 0x41b020]
mov ecx, dword [ebp - 0x24]
xor edx, dword [0x41a3f8]
add eax, 0xf0
and dword [eax], 0
xor esi, edx
mov edx, dword [ebp - 0x20]
xor ecx, esi
xor edx, ecx
xor ebx, edx
mov dword [eax - 0x10], esi
mov dword [eax - 4], ebx
mov dword [eax - 0xc], ecx
mov dword [eax - 8], edx
pop edi
pop esi
mov byte [eax], pe_nt_image_headers32
xor eax, eax
pop ebx
leave
ret
Function at 0x40a0fe
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
movzx eax, dl
push ebx
push eax
mov byte [ebp - 3], dl
mov byte [ebp - 2], 0x1b
call fcn.0040a0da
cmp dl, 2
pop ecx
mov bl, al
mov byte [ebp - 1], 0x80
mov byte [ebp - 4], 1
mov byte [ebp - 5], 0
jae 0x40a12c
mov al, dl
jmp 0x40a1a4
push esi
jmp 0x40a197
cmp byte [ebp - 1], bl
jb 0x40a160
movzx esi, bl
movzx eax, byte [ebp - 1]
cdq
idiv esi
mov cl, al
imul byte [ebp - 3]
xor byte [ebp - 2], al
mov al, byte [ebp - 4]
imul cl
xor byte [ebp - 5], al
movzx eax, byte [ebp - 2]
push eax
call fcn.0040a0da
cmp al, bl
pop ecx
mov byte [ebp - 1], al
jae 0x40a137
cmp byte [ebp - 1], 0
je 0x40a1a0
cmp bl, byte [ebp - 1]
jb 0x40a197
movzx esi, byte [ebp - 1]
movzx eax, bl
cdq
idiv esi
mov cl, al
imul byte [ebp - 2]
xor byte [ebp - 3], al
mov al, byte [ebp - 5]
imul cl
xor byte [ebp - 4], al
movzx eax, byte [ebp - 3]
push eax
call fcn.0040a0da
mov bl, al
cmp bl, byte [ebp - 1]
pop ecx
jae 0x40a16f
test bl, bl
jne 0x40a12f
mov al, byte [ebp - 4]
jmp 0x40a1a3
mov al, byte [ebp - 5]
pop esi
pop ebx
leave
ret
Function at 0x40a5cc
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, eax
mov eax, dword [ebp + 0xc]
sar eax, 4
test byte [ebp + 0xc], 0xf
je 0x40a5e9
xor eax, eax
inc eax
jmp 0x40a6e5
test bl, 3
push esi
push edi
jne 0x40a648
test byte [ebp + 0x10], 3
jne 0x40a648
test eax, eax
je 0x40a6e1
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
mov esi, ecx
lea edi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push ebx
movsd dword es:[edi], dword [esi]
call fcn.00409a80
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
xor dword [ebx], eax
mov eax, dword [edi + 4]
xor dword [ebx + 4], eax
mov eax, dword [edi + 8]
xor dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
xor dword [ebx + 0xc], eax
add dword [ebp + 8], 0x10
lea esi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add ebx, 0x10
dec dword [ebp + 0xc]
pop ecx
movsd dword es:[edi], dword [esi]
jne 0x40a601
jmp 0x40a6e1
test eax, eax
je 0x40a6e1
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
mov esi, ecx
lea edi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push ebx
movsd dword es:[edi], dword [esi]
call fcn.00409a80
mov edi, dword [ebp + 0x10]
mov al, byte [edi]
xor byte [ebx], al
mov al, byte [edi + 1]
xor byte [ebx + 1], al
mov al, byte [edi + 2]
xor byte [ebx + 2], al
mov al, byte [edi + 3]
xor byte [ebx + 3], al
mov al, byte [edi + 4]
xor byte [ebx + 4], al
mov al, byte [edi + 5]
xor byte [ebx + 5], al
mov al, byte [edi + 6]
xor byte [ebx + 6], al
mov al, byte [edi + 7]
xor byte [ebx + 7], al
mov al, byte [edi + 8]
xor byte [ebx + 8], al
mov al, byte [edi + 9]
xor byte [ebx + 9], al
mov al, byte [edi + 0xa]
xor byte [ebx + 0xa], al
mov al, byte [edi + 0xb]
xor byte [ebx + 0xb], al
mov al, byte [edi + 0xc]
xor byte [ebx + 0xc], al
mov al, byte [edi + 0xd]
xor byte [ebx + 0xd], al
mov al, byte [edi + 0xe]
xor byte [ebx + 0xe], al
mov al, byte [edi + 0xf]
xor byte [ebx + 0xf], al
add dword [ebp + 8], 0x10
lea esi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add ebx, 0x10
dec dword [ebp + 0xc]
pop ecx
movsd dword es:[edi], dword [esi]
jne 0x40a653
pop edi
xor eax, eax
pop esi
pop ebx
leave
ret
Function at 0x40aeb4
Capabilities:
Terminate process

Disassembly:
push 8
push 0x413370
call fcn.0040bec8
push 8
call fcn.0040c2db
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x417e54], esi
jne 0x40aee8
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.kernel32.dll_TerminateProcess]
mov dword [0x417e50], esi
mov al, byte [ebp + 0x10]
mov byte [0x417e4c], al
cmp dword [ebp + 0xc], edi
jne 0x40af32
cmp dword [0x41e82c], edi
je 0x40af22
mov eax, dword [0x41e828]
sub eax, 4
mov dword [0x41e828], eax
cmp eax, dword [0x41e82c]
jb 0x40af22
mov eax, dword [eax]
cmp eax, edi
je 0x40af03
call eax
jmp 0x40af03
push 0x417038
mov eax, 0x417030
call fcn.0040ae32
pop ecx
push 0x417044
mov eax, 0x41703c
call fcn.0040ae32
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40af63
cmp dword [ebp + 0x10], edi
jne 0x40af71
mov dword [0x417e54], esi
push dword [ebp + 8]
call fcn.0040adf0
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40af70
push 8
call fcn.0040c226
pop ecx
ret
call fcn.0040bf03
ret
Function at 0x40b102
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x413380
call fcn.0040bec8
mov edi, 0x94
mov eax, edi
call fcn.0040e080
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.kernel32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x417e14], ecx
mov eax, dword [esi + 4]
mov dword [0x417e20], eax
mov edx, dword [esi + 8]
mov dword [0x417e24], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x417e18], esi
cmp ecx, 2
je 0x40b162
or esi, 0x8000
mov dword [0x417e18], esi
shl eax, 8
add eax, edx
mov dword [0x417e1c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.kernel32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40b19d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40b19d
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40b1b5
cmp eax, 0x20b
je 0x40b1a2
mov dword [ebp - 0x1c], esi
jmp 0x40b1c9
cmp dword [ecx + 0x84], 0xe
jbe 0x40b19d
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40b1c3
cmp dword [ecx + 0x74], 0xe
jbe 0x40b19d
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040e02d
pop ecx
test eax, eax
jne 0x40b1dd
push 0x1c
call fcn.0040b0de
pop ecx
call fcn.0040cc1d
test eax, eax
jne 0x40b1ee
push 0x10
call fcn.0040b0de
pop ecx
call fcn.0040c398
mov dword [ebp - 4], esi
call fcn.0040de15
test eax, eax
jge 0x40b207
push 0x1b
call fcn.0040b0b9
pop ecx
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [0x41e820], eax
call fcn.0040dcf3
mov dword [0x417e58], eax
call fcn.0040dc51
test eax, eax
jge 0x40b22d
push 8
call fcn.0040b0b9
pop ecx
call fcn.0040da1e
test eax, eax
jge 0x40b23e
push 9
call fcn.0040b0b9
pop ecx
push 1
call fcn.0040ae4a
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40b254
push eax
call fcn.0040b0b9
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.kernel32.dll_GetStartupInfoA]
call fcn.0040d9c1
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40b275
movzx eax, word [ebp - 0x40]
jmp 0x40b278
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00404758
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40b296
push edi
call fcn.0040af77
call fcn.0040af99
jmp 0x40b2c8
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040bf03
ret
Function at 0x40d6ad
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x417444]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4172f8]
je 0x40d6e2
inc eax
cmp eax, 0x13
jb 0x40d6d3
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4172f8]
jne 0x40d808
mov eax, dword [0x417e60]
cmp eax, 1
je 0x40d7e0
cmp eax, edx
jne 0x40d712
cmp dword [0x4170ac], 1
je 0x40d7e0
cmp ecx, 0xfc
je 0x40d808
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40d748
lea eax, [ebp - 0x80]
push 0x4138fc
push eax
call fcn.0040c090
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040b2e0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40d77c
mov eax, edi
push eax
call fcn.0040b2e0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4138f8
push edi
call fcn.004108b0
add esp, 0x10
push edi
call fcn.0040b2e0
push dword [esi + 0x4172fc]
mov ebx, eax
call fcn.0040b2e0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040e080
mov ebx, esp
push 0x4138dc
push ebx
call fcn.0040c090
push edi
push ebx
call fcn.0040c0a0
push 0x4138d8
push ebx
call fcn.0040c0a0
push dword [esi + 0x4172fc]
push ebx
call fcn.0040c0a0
push 0x12010
push 0x4138b0
push ebx
call fcn.004107b5
add esp, 0x2c
jmp 0x40d808
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4172fc]
push dword [esi]
call fcn.0040b2e0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.kernel32.dll_GetStdHandle]
push eax
call dword [sym.imp.kernel32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0040fe9d
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40de15
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x48
push ebx
mov ebx, 0x480
push ebx
call fcn.0040bc78
test eax, eax
pop ecx
jne 0x40de31
or eax, 0xffffffff
jmp 0x40e00e
mov dword [0x41e4e0], eax
mov dword [0x41e4c8], 0x20
lea ecx, [eax + 0x480]
jmp 0x40de66
or dword [eax], 0xffffffff
and dword [eax + 8], 0
mov byte [eax + 4], 0
mov byte [eax + 5], 0xa
mov ecx, dword [0x41e4e0]
add eax, 0x24
add ecx, 0x480
cmp eax, ecx
jb 0x40de48
push ebp
push esi
push edi
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.kernel32.dll_GetStartupInfoA]
cmp word [esp + 0x46], 0
je 0x40df6d
mov eax, dword [esp + 0x48]
test eax, eax
je 0x40df6d
mov edi, dword [eax]
lea ebp, [eax + 4]
lea eax, [edi + ebp]
mov dword [esp + 0x10], eax
mov eax, 0x800
cmp edi, eax
jl 0x40dea7
mov edi, eax
cmp dword [0x41e4c8], edi
jge 0x40defd
mov esi, 0x41e4e4
push ebx
call fcn.0040bc78
test eax, eax
pop ecx
je 0x40def7
add dword [0x41e4c8], 0x20
mov dword [esi], eax
lea ecx, [eax + 0x480]
jmp 0x40dee6
or dword [eax], 0xffffffff
and dword [eax + 8], 0
mov byte [eax + 4], 0
mov byte [eax + 5], 0xa
mov ecx, dword [esi]
add eax, 0x24
add ecx, ebx
cmp eax, ecx
jb 0x40ded0
add esi, 4
cmp dword [0x41e4c8], edi
jl 0x40deb4
jmp 0x40defd
mov edi, dword [0x41e4c8]
xor ebx, ebx
test edi, edi
jle 0x40df6d
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x40df62
mov cl, byte [ebp]
test cl, 1
je 0x40df62
test cl, 8
jne 0x40df26
push eax
call dword [sym.imp.kernel32.dll_GetFileType]
test eax, eax
je 0x40df62
mov ecx, ebx
mov eax, ebx
and eax, 0x1f
lea eax, [eax + eax*8]
sar ecx, 5
mov ecx, dword [ecx*4 + 0x41e4e0]
lea esi, [ecx + eax*4]
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [esi], eax
mov al, byte [ebp]
mov byte [esi + 4], al
lea eax, [esi + 0xc]
push 0xfa0
push eax
call fcn.0040f7e6
test eax, eax
pop ecx
pop ecx
je 0x40df8d
inc dword [esi + 8]
add dword [esp + 0x10], 4
inc ebx
inc ebp
cmp ebx, edi
jl 0x40df03
xor ebx, ebx
mov ecx, dword [0x41e4e0]
lea eax, [ebx + ebx*8]
lea esi, [ecx + eax*4]
cmp dword [esi], 0xffffffff
jne 0x40dfef
test ebx, ebx
mov byte [esi + 4], 0x81
jne 0x40df92
push 0xfffffffffffffff6
pop eax
jmp 0x40df9c
or eax, 0xffffffff
jmp 0x40e00b
mov eax, ebx
dec eax
neg eax
sbb eax, eax
add eax, 0xfffffff5
push eax
call dword [sym.imp.kernel32.dll_GetStdHandle]
mov edi, eax
cmp edi, 0xffffffff
je 0x40dfe9
push edi
call dword [sym.imp.kernel32.dll_GetFileType]
test eax, eax
je 0x40dfe9
and eax, 0xff
cmp eax, 2
mov dword [esi], edi
jne 0x40dfc7
or byte [esi + 4], 0x40
jmp 0x40dfd0
cmp eax, 3
jne 0x40dfd0
or byte [esi + 4], 8
lea eax, [esi + 0xc]
push 0xfa0
push eax
call fcn.0040f7e6
test eax, eax
pop ecx
pop ecx
je 0x40df8d
inc dword [esi + 8]
jmp 0x40dff3
or byte [esi + 4], 0x40
jmp 0x40dff3
or byte [esi + 4], 0x80
inc ebx
cmp ebx, 3
jl 0x40df6f
push dword [0x41e4c8]
call dword [sym.imp.kernel32.dll_LockResource]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
Function at 0x40f5ad
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x40f5db
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x40f5e2
cmp ebx, dword [eax + 4]
jae 0x40f5e2
xor eax, eax
jmp 0x40f7d2
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40f5f3
xor eax, eax
inc eax
jmp 0x40f7d1
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40f609
cmp ecx, edx
jae 0x40f74e
cmp dword [eax + 4], 0
je 0x40f612
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40f5fa
cmp dword [ebp + 8], 0
je 0x40f634
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40f74e
cmp eax, esi
jae 0x40f74e
mov eax, dword [0x4180e8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40f659
cmp dword [esi*4 + 0x4180f0], edi
je 0x40f752
inc esi
cmp esi, eax
jl 0x40f647
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.kernel32.dll_VirtualQuery]
test eax, eax
je 0x40f7ce
cmp dword [ebp - 8], 0x1000000
jne 0x40f7ce
test byte [ebp - 0xc], 0xcc
je 0x40f6d7
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40f7ce
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40f7ce
cmp word [eax + 0x18], 0x10b
jne 0x40f7ce
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40f7ce
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40f6d7
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40f6d7
test byte [ecx + 0x27], 0x80
jne 0x40f74e
push 1
push 0x418130
call dword [sym.imp.kernel32.dll_InterlockedExchange]
test eax, eax
jne 0x40f5eb
mov ecx, dword [0x4180e8]
test ecx, ecx
mov edx, ecx
jle 0x40f70b
lea eax, [ecx*4 + 0x4180ec]
cmp dword [eax], edi
je 0x40f70b
dec edx
sub eax, 4
test edx, edx
jg 0x40f6ff
test edx, edx
jne 0x40f73c
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40f718
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40f730
lea eax, [edx*4 + 0x4180f0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40f71e
cmp ecx, 0x10
jge 0x40f73c
inc ecx
mov dword [0x4180e8], ecx
push 0
push 0x418130
call dword [sym.imp.kernel32.dll_InterlockedExchange]
jmp 0x40f5eb
xor eax, eax
jmp 0x40f7d1
test esi, esi
jle 0x40f5eb
mov ebx, dword [sym.imp.kernel32.dll_InterlockedExchange]
push 1
push 0x418130
call ebx
test eax, eax
jne 0x40f5eb
cmp dword [esi*4 + 0x4180f0], edi
je 0x40f7a8
mov eax, dword [0x4180e8]
lea esi, [eax - 1]
test esi, esi
jl 0x40f796
cmp dword [esi*4 + 0x4180f0], edi
je 0x40f792
dec esi
jns 0x40f786
test esi, esi
jge 0x40f7a6
cmp eax, 0x10
jge 0x40f7a1
inc eax
mov dword [0x4180e8], eax
lea esi, [eax - 1]
jmp 0x40f7a8
je 0x40f7c0
xor ecx, ecx
test esi, esi
jl 0x40f7c0
lea eax, [ecx*4 + 0x4180f0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40f7ae
push 0
push 0x418130
call ebx
jmp 0x40f5eb
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret