joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405c60
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
mov eax, dword [ebx + 0x130]
push edi
lea edi, [ebx + 0x130]
push esi
push dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov ecx, edi
call eax
test al, al
je 0x405e68
push ecx
push dword [ebp + 8]
mov ecx, edi
call fcn.00409190
test al, al
je 0x405e68
mov dword [ebx + 0x34c], edi
mov eax, 0x44e4b0
mov edi, dword [ebp + 0x10]
xor ecx, ecx
mov dword [ebx + 8], edi
cmp dword [eax], edi
je 0x405d18
add ecx, 0x10
add eax, 0x10
cmp ecx, 0x50
jb 0x405cb1
mov ebx, dword [ebp + 8]
mov ecx, ebx
push 0x44ea3c
call fcn.00401e30
push edi
push 0x44ead0
push eax
call fcn.00406410
add esp, 0xc
cmp byte [esi + 0x11c], 0
je 0x405cec
add esi, 0xc
jmp 0x405cef
mov esi, dword [esi + 8]
push 0x44ea50
mov ecx, ebx
call fcn.00401e30
lea ecx, [esi + 4]
push ecx
push 0x44ead8
push eax
call fcn.00406410
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [eax + 4]
mov ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
push 0
push 0x80
push edx
push 0
push eax
push ecx
mov dword [ebp - 4], ecx
mov ecx, esi
mov dword [ebp + 0xc], edx
mov dword [ebp + 0x10], eax
call fcn.00402400
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx + 4], eax
mov edi, 1
cmp eax, 0xffffffff
jne 0x405dd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esi + 8]
cmp eax, 0x20
jne 0x405d7f
cmp edi, 3
jge 0x405de7
cmp byte [ebx + 0x350], 0
je 0x405daa
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x405daa
cmp eax, 5
jne 0x405de7
lea ecx, [esi + 8]
cmp edi, 3
jge 0x405de7
cmp byte [esi + 0x11c], 0
lea eax, [esi + 0xc]
jne 0x405d9b
mov eax, dword [esi + 8]
push 0x80
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0x80
push dword [ebp + 0xc]
mov ecx, esi
push 0
push dword [ebp + 0x10]
push dword [ebp - 4]
call fcn.00402400
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
inc edi
mov dword [ebx + 4], eax
cmp eax, 0xffffffff
je 0x405d55
push esi
lea ecx, [ebx + 0xc]
call fcn.00402540
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
test eax, eax
jne 0x405e22
lea esi, [ecx + 4]
cmp byte [ecx + 0x114], al
jne 0x405df8
mov esi, dword [ecx]
mov ecx, dword [ebp + 8]
push 0x44ea60
call fcn.00401e30
lea ecx, [esi + 4]
push ecx
push 0x44ead8
push eax
call fcn.00406410
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp byte [ecx + 0x114], 0
lea edi, [ecx + 4]
jne 0x405e30
mov edi, dword [ecx]
mov ecx, dword [ebp + 8]
push eax
call fcn.00407350
push 0x44ea50
mov esi, eax
push 0x44ead8
push esi
call fcn.00406410
lea ecx, [edi + 4]
push ecx
push 0x44ead8
push esi
call fcn.00406410
add esp, 0x18
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp + 8]
push 0x44a75c
call fcn.00401e30
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x409400
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push esi
call fcn.00409580
test al, al
je 0x409469
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call fcn.0040cf60
push esi
mov ecx, eax
call fcn.0040cad0
mov esi, eax
cmp byte [esi], 0
je 0x4094ce
mov ecx, esi
call fcn.0040ce80
mov eax, dword [esi + 4]
test eax, eax
jg 0x409441
mov dword [esi + 4], 0
pop esi
ret
mov dword [esi + eax*8 + 0xfc8], 0
mov dword [esi + eax*8 + 0xfcc], 0
add dword [esi + 4], 0xffffffff
je 0x4094ce
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
pop esi
ret
call fcn.00409950
test al, al
je 0x4094ce
cmp byte [0x4599d6], 0
je 0x4094ce
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
call fcn.0040d320
mov esi, eax
cmp byte [esi + 4], 0
je 0x4094ce
push ecx
mov ecx, esi
call fcn.0040d440
mov eax, dword [esi + 0xc]
test eax, eax
jg 0x4094a8
mov dword [esi + 0xc], 0
pop esi
ret
mov dword [esi + eax*8 + 0xfb0], 0
mov dword [esi + eax*8 + 0xfb4], 0
add dword [esi + 0xc], 0xffffffff
je 0x4094ce
lea eax, [esi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
pop esi
ret

Function at 0x409d80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push 0
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [ebp + 0x10]
lea eax, [ebp - 4]
push 0
push eax
push edi
push dword [ebp + 0xc]
mov dword [ebp - 4], 0
push dword [esi - 0x350]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x409dfe
lea edi, [esi - 0x33c]
cmp byte [esi - 0x22c], al
jne 0x409dc8
mov edi, dword [esi - 0x340]
mov ecx, dword [ebp + 8]
call fcn.004073e0
push 0x44eab0
mov esi, eax
push 0x44ead8
push esi
call fcn.00406410
lea ecx, [edi + 4]
push ecx
push 0x44ead8
push esi
call fcn.00406410
add esp, 0x18
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebp - 4], edi
je 0x409e97
cmp byte [esi - 0x22c], 0
lea eax, [esi - 0x33c]
jne 0x409e1c
mov eax, dword [esi - 0x340]
mov ecx, dword [ebp + 8]
push 0x4503a8
mov dword [ebp + 0x10], eax
call fcn.00401e30
push 0x4503b8
mov esi, eax
push 0x44ead8
push esi
call fcn.00406410
push edi
push 0x44ead0
push esi
call fcn.00406410
push 0x4503c4
push 0x44ead8
push esi
call fcn.00406410
push dword [ebp - 4]
push 0x44ead0
push esi
call fcn.00406410
push 0x4503d4
push 0x44ead8
push esi
call fcn.00406410
mov eax, dword [ebp + 0x10]
add eax, 4
push eax
push 0x44ead8
push esi
call fcn.00406410
add esp, 0x48
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
pop edi
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x409eb0
Capabilities:
Hash data with md5
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x474
mov eax, dword [0x45604c]
xor eax, esp
mov dword [esp + 0x470], eax
push esi
push 0x44ec34
push ecx
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0
push eax
mov esi, edx
call fcn.0042ad68
mov eax, dword [esp + 0x10]
add esp, 0xc
test eax, eax
jne 0x409f05
xor al, al
pop esi
mov ecx, dword [esp + 0x470]
xor ecx, esp
call fcn.004224f6
mov esp, ebp
pop ebp
ret
push eax
push 0x400
lea eax, [esp + 0x78]
mov dword [esp + 0x14], 0
push 1
push eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0x67452301
mov dword [esp + 0x24], 0xefcdab89
mov dword [esp + 0x28], 0x98badcfe
mov dword [esp + 0x2c], 0x10325476
call fcn.0042b387
add esp, 0x10
test eax, eax
je 0x409f7a
nop
push eax
lea edx, [esp + 0x74]
lea ecx, [esp + 0xc]
call fcn.0040d7d0
push dword [esp + 8]
lea eax, [esp + 0x78]
push 0x400
push 1
push eax
call fcn.0042b387
add esp, 0x14
test eax, eax
jne 0x409f50
mov edx, esi
lea ecx, [esp + 8]
call fcn.0040d890
push dword [esp + 4]
call fcn.0042aed4
mov ecx, dword [esp + 0x478]
add esp, 4
mov al, 1
pop esi
xor ecx, esp
call fcn.004224f6
mov esp, ebp
pop ebp
ret
Function at 0x40c670
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0x14]
mov esi, ecx
mov eax, dword [ebx]
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 0
push edi
push dword [esi + 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40c755
test edi, edi
je 0x40c70b
cmp word [edi], 0
je 0x40c70b
cmp byte [esi + 0x128], 0
lea ebx, [esi + 0x18]
jne 0x40c6c5
mov ebx, dword [esi + 0x14]
mov ecx, dword [ebp + 8]
push eax
call fcn.00407350
push 0x45064c
mov esi, eax
push 0x44ead8
push esi
call fcn.00406410
add esp, 0xc
lea ecx, [ebx + 4]
push ecx
push 0x44ead8
push esi
call fcn.00406410
add esp, 0xc
push 0x44a758
push 0x44ead8
push esi
call fcn.00406410
add esp, 0xc
push edi
jmp 0x40c73c
cmp byte [esi + 0x128], 0
lea edi, [esi + 0x18]
jne 0x40c71a
mov edi, dword [esi + 0x14]
mov ecx, dword [ebp + 8]
push eax
call fcn.00407350
push 0x45064c
mov esi, eax
push 0x44ead8
push esi
call fcn.00406410
add esp, 0xc
lea ecx, [edi + 4]
push ecx
push 0x44ead8
push esi
call fcn.00406410
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x18]
je 0x40c7c5
test edi, edi
je 0x40c78a
cmp word [edi], 0
je 0x40c78a
cmp byte [esi + 0x128], 0
lea ebx, [esi + 0x18]
jne 0x40c776
mov ebx, dword [esi + 0x14]
mov ecx, dword [ebp + 8]
push 0
call fcn.00407350
push 0x45065c
jmp 0x40c6d3
cmp byte [esi + 0x128], 0
je 0x40c798
add esi, 0x18
jmp 0x40c79b
mov esi, dword [esi + 0x14]
mov ecx, dword [ebp + 8]
push 0x45065c
call fcn.00401e30
lea ecx, [esi + 4]
push ecx
push 0x44ead8
push eax
call fcn.00406410
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebp + 0x10]
pop edi
mov dword [ebx], eax
mov al, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
Function at 0x40e190
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43c710
mov eax, dword fs:[0]
push eax
sub esp, 0x36c
mov eax, dword [0x45604c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
test eax, eax
je 0x40e1e9
push eax
call fcn.00429f67
add esp, 4
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
push ecx
lea ecx, [ebp - 0x370]
call fcn.00405ac0
mov dword [ebp - method.t_fileRead.virtual_0], vtable.t_fileRead.0
mov dword [ebp - 0x1c], 0x4508d0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
push 0
push esi
push ebx
lea ecx, [ebp - 0x370]
mov dword [ebp - 4], 0
call fcn.00405c60
test al, al
je 0x40e37f
lea eax, [ebp - 0x378]
mov dword [ebp - 0x378], 0
push eax
push dword [ebp - 0x36c]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x374], eax
cmp eax, 0xffffffff
jne 0x40e26e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40e268
xor eax, eax
jmp 0x40e26e
mov eax, dword [ebp - 0x374]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x378]
push eax
push dword [ebp - 0x36c]
mov dword [ebp - 0x378], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x374], eax
cmp eax, 0xffffffff
jne 0x40e2b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40e2ad
xor eax, eax
mov dword [ebp - 0x374], eax
jmp 0x40e2b3
mov eax, dword [ebp - 0x374]
add eax, 4
push eax
call fcn.00429f82
add esp, 4
mov dword [ebp - 0x378], eax
test eax, eax
jne 0x40e2ec
mov dword [edi + 0x24], 2
cmp byte [esi + 0x11c], al
je 0x40e2e2
add esi, 0xc
push 0x450788
jmp 0x40e32c
mov esi, dword [esi + 8]
push 0x450788
jmp 0x40e32c
push dword [ebp - 0x374]
lea ecx, [ebp - 0x1c]
push eax
push ebx
call fcn.0040e7a0
test al, al
jne 0x40e347
mov ecx, dword [ebp - 0x378]
push ecx
mov dword [edi + 0x24], 3
call fcn.00429f67
add esp, 4
cmp byte [esi + 0x11c], 0
je 0x40e324
add esi, 0xc
jmp 0x40e327
mov esi, dword [esi + 8]
push 0x44ea50
mov ecx, ebx
call fcn.00401e30
lea ecx, [esi + 4]
push ecx
push 0x44ead8
push eax
call fcn.00406410
add esp, 0xc
jmp 0x40e386
lea ecx, [ebp - 0x370]
call fcn.00405e80
mov ecx, dword [ebp - 0x378]
xor edx, edx
mov eax, dword [ebp - 0x374]
push ecx
push eax
push ecx
mov dword [ecx + eax], edx
mov ecx, edi
push ebx
call fcn.0040e4a0
test al, al
jne 0x40e37b
mov dword [edi + 0x24], 4
jmp 0x40e316
mov bl, 1
jmp 0x40e388
mov dword [edi + 0x24], 1
xor bl, bl
lea ecx, [ebp - 0x370]
mov dword [ebp - method.t_fileRead.virtual_0], vtable.t_fileRead.0
mov dword [ebp - 0x1c], vtable.t_byteStreamRead.0
call fcn.00405ba0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004224f6
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40e7a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push 0
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x40e890
push 0
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push edi
push dword [ebp + 0xc]
push dword [esi - 0x350]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40e811
cmp byte [esi - 0x22c], al
je 0x40e7ec
add esi, 0xfffffcc4
jmp 0x40e7f2
mov esi, dword [esi - 0x340]
mov ecx, dword [ebp + 8]
call fcn.004073e0
push 0x44ea80
mov edi, eax
push 0x44ead8
push edi
call fcn.00406410
add esp, 0xc
jmp 0x40e83d
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x40e859
cmp byte [esi - 0x22c], cl
je 0x40e828
add esi, 0xfffffcc4
jmp 0x40e82e
mov esi, dword [esi - 0x340]
mov ecx, dword [ebp + 8]
push 0x44ea90
call fcn.00401e30
mov edi, eax
lea eax, [esi + 4]
push eax
push 0x44ead8
push edi
call fcn.00406410
add esp, 0xc
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
cmp ecx, edi
je 0x40e890
cmp byte [esi - 0x22c], 0
lea eax, [esi - 0x33c]
jne 0x40e872
mov eax, dword [esi - 0x340]
add eax, 4
push eax
push ecx
push edi
push str.penc_rN
push dword [ebp + 8]
call fcn.004072b0
add esp, 0x14
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
add dword [esi + 8], edi
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc

Function at 0x4121a0
Capabilities:
Hash data with md5
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x484
mov eax, dword [0x45604c]
xor eax, esp
mov dword [esp + 0x480], eax
mov eax, dword [ebp + 8]
push esi
push 0x44ec34
push eax
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0
push eax
call fcn.0042ad68
mov eax, dword [esp + 0x10]
add esp, 0xc
test eax, eax
je 0x4122ac
push eax
push 0x400
lea eax, [esp + 0x88]
mov dword [esp + 0x14], 0
push 1
push eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0x67452301
mov dword [esp + 0x24], 0xefcdab89
mov dword [esp + 0x28], 0x98badcfe
mov dword [esp + 0x2c], 0x10325476
call fcn.0042b387
add esp, 0x10
test eax, eax
je 0x412261
push eax
lea edx, [esp + 0x84]
lea ecx, [esp + 0xc]
call fcn.0040d7d0
push dword [esp + 8]
lea eax, [esp + 0x88]
push 0x400
push 1
push eax
call fcn.0042b387
add esp, 0x14
test eax, eax
jne 0x412231
lea edx, [esp + 0x70]
lea ecx, [esp + 8]
call fcn.0040d890
push dword [esp + 4]
call fcn.0042aed4
mov edx, dword [ebp + 0xc]
lea ecx, [esp + 0x74]
add esp, 4
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4122ac
add ecx, 4
add edx, 4
sub esi, 4
jae 0x412286
mov al, 1
pop esi
mov ecx, dword [esp + 0x480]
xor ecx, esp
call fcn.004224f6
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x484]
xor al, al
pop esi
xor ecx, esp
call fcn.004224f6
mov esp, ebp
pop ebp
ret
Function at 0x4122d0
Capabilities:
Hash data with md5
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x474
mov eax, dword [0x45604c]
xor eax, esp
mov dword [esp + 0x470], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push 0x44ec34
push eax
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0
push eax
call fcn.0042ad68
mov eax, dword [esp + 0x10]
add esp, 0xc
test eax, eax
jne 0x412329
xor al, al
pop esi
mov ecx, dword [esp + 0x470]
xor ecx, esp
call fcn.004224f6
mov esp, ebp
pop ebp
ret
push eax
push 0x400
lea eax, [esp + 0x78]
mov dword [esp + 0x14], 0
push 1
push eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0x67452301
mov dword [esp + 0x24], 0xefcdab89
mov dword [esp + 0x28], 0x98badcfe
mov dword [esp + 0x2c], 0x10325476
call fcn.0042b387
add esp, 0x10
test eax, eax
je 0x41239c
push eax
lea edx, [esp + 0x74]
lea ecx, [esp + 0xc]
call fcn.0040d7d0
push dword [esp + 8]
lea eax, [esp + 0x78]
push 0x400
push 1
push eax
call fcn.0042b387
add esp, 0x14
test eax, eax
jne 0x412372
mov edx, esi
lea ecx, [esp + 8]
call fcn.0040d890
push dword [esp + 4]
call fcn.0042aed4
mov ecx, dword [esp + 0x478]
add esp, 4
mov al, 1
pop esi
xor ecx, esp
call fcn.004224f6
mov esp, ebp
pop ebp
ret
Function at 0x414180
Capabilities:
Create process on windows
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x670
mov eax, dword [0x45604c]
xor eax, ebp
mov dword [ebp - 4], eax
push 2
push 0
call fcn.00401e00
add esp, 8
test al, al
je 0x4143fd
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.00424340
push 0x410
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.00424340
add esp, 0x18
lea eax, [ebp - 0x61c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x61c]
push 0x5c
push eax
call fcn.004240c0
add esp, 8
test eax, eax
je 0x4141fe
xor ecx, ecx
mov word [eax], cx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x414]
push edi
push 0x44a7a4
push eax
call esi
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push eax
call esi
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
je 0x4143fb
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp word [ebp + edi*2 - 0x61e], 0x5c
je 0x414261
push 0x44a758
lea eax, [ebp - 0x414]
push eax
call esi
push dword [0x45602c]
lea eax, [ebp - 0x414]
push eax
call esi
push 0x43eb60
lea eax, [ebp - 0x414]
push eax
call esi
push 0x458020
lea eax, [ebp - 0x414]
push eax
call esi
push 0x43eb60
lea eax, [ebp - 0x414]
push eax
call esi
push dword [0x456030]
lea eax, [ebp - 0x414]
push eax
call esi
push 0x43eb60
lea eax, [ebp - 0x414]
push eax
call esi
cmp byte [0x456028], 0
mov ecx, 0x450708
mov eax, 0x450704
cmove eax, ecx
push eax
lea eax, [ebp - 0x414]
push eax
call esi
push 0x44a7a4
lea eax, [ebp - 0x414]
push eax
call esi
push 0x5c
push 0x458430
call fcn.004240c0
mov edi, eax
add esp, 8
test edi, edi
je 0x414321
push 0x43eb68
lea eax, [ebp - 0x414]
push eax
call esi
lea eax, [edi + 2]
push eax
lea eax, [ebp - 0x414]
push eax
call esi
push 0x44a7a4
lea eax, [ebp - 0x414]
push eax
call esi
push 0x5c
push 0x458228
call fcn.004240c0
mov edi, eax
add esp, 8
test edi, edi
je 0x41435f
push 0x43eb68
lea eax, [ebp - 0x414]
push eax
call esi
lea eax, [edi + 2]
push eax
lea eax, [ebp - 0x414]
push eax
call esi
push 0x44a7a4
lea eax, [ebp - 0x414]
push eax
call esi
cmp byte [0x456028], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x65c], xmm0
movlpd qword [ebp - 0x654], xmm0
movlpd qword [ebp - 0x64c], xmm0
movlpd qword [ebp - 0x644], xmm0
movlpd qword [ebp - 0x63c], xmm0
movlpd qword [ebp - 0x634], xmm0
movlpd qword [ebp - 0x62c], xmm0
movlpd qword [ebp - 0x624], xmm0
mov dword [ebp - 0x660], 0x44
je 0x4143cb
mov eax, 5
mov dword [ebp - 0x634], 1
mov word [ebp - 0x630], ax
lea eax, [ebp - 0x670]
push eax
lea eax, [ebp - 0x660]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x414]
push eax
push 0
movups xmmword [ebp - 0x670], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004224f6
mov esp, ebp
pop ebp
ret
Function at 0x4011a9
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408178
push 0x406ed4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x240
push ebx
push esi
push edi
mov dword [ebp - 0x24c], ecx
or dword [ebp - 0x248], 0xffffffff
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x244], ebx
mov byte [ebp - 0x23c], bl
xor eax, eax
lea edi, [ebp - 0x23b]
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x248], edi
cmp edi, 0xffffffff
je 0x4013e2
lea eax, [ebp - 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp dword [ebp - 0x20], ebx
jg 0x4013e2
jl 0x40124e
cmp dword [ebp - 0x24], 0x6400000
ja 0x4013e2
push ebx
lea eax, [ebp - 0x1c]
push eax
push 8
lea eax, [ebp - 0x23c]
push eax
push edi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
call esi
test eax, eax
je 0x4013e2
push 8
push str.WANNACRY
lea eax, [ebp - 0x23c]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x4013e2
push ebx
lea eax, [ebp - 0x1c]
push eax
push 4
lea eax, [ebp - 0x244]
push eax
push edi
call esi
test eax, eax
je 0x4013e2
mov eax, 0x100
cmp dword [ebp - 0x244], eax
jne 0x4013e2
push ebx
lea ecx, [ebp - 0x1c]
push ecx
push eax
mov edi, dword [ebp - 0x24c]
push dword [edi + 0x4c8]
push dword [ebp - 0x248]
call esi
test eax, eax
je 0x4013e2
push ebx
lea eax, [ebp - 0x1c]
push eax
push 4
lea eax, [ebp - 0x240]
push eax
push dword [ebp - 0x248]
call esi
test eax, eax
je 0x4013e2
push ebx
lea eax, [ebp - 0x1c]
push eax
push 8
lea eax, [ebp - 0x234]
push eax
push dword [ebp - 0x248]
call esi
test eax, eax
je 0x4013e2
cmp dword [ebp - 0x230], ebx
jg 0x4013e2
jl 0x401331
cmp dword [ebp - 0x234], 0x6400000
ja 0x4013e2
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x22c]
push eax
push dword [ebp - 0x244]
push dword [edi + 0x4c8]
lea ecx, [edi + 4]
call fcn.00401620
test eax, eax
je 0x4013e2
lea ecx, [edi + 0x54]
mov dword [ebp - 0x250], ecx
push 0x10
push dword [ebp - 0x2c]
push dword [0x40f35c]
lea eax, [ebp - 0x22c]
push eax
call fcn.0040224e
push dword [ebp - 0x234]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x4013e2
push ebx
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x24]
push dword [edi + 0x4c8]
push dword [ebp - 0x248]
call esi
test eax, eax
je 0x4013e2
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x4013e2
cmp ebx, dword [ebp - 0x230]
jg 0x4013bf
jl 0x4013e2
cmp eax, dword [ebp - 0x234]
jb 0x4013e2
push 1
push eax
mov ebx, dword [ebp - 0x28]
push ebx
push dword [edi + 0x4c8]
mov ecx, dword [ebp - 0x250]
call fcn.0040324f
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x234]
mov dword [eax], ecx
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call sub.MSVCRT.dll__local_unwind2
pop ecx
pop ecx
mov eax, ebx
jmp 0x40140b
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 8