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

Disassembly:
sub esp, 0x14
push esi
mov esi, ecx
mov eax, dword [esi + 0x148]
cmp eax, dword [esi + 0x150]
jne 0x640ff6
mov ecx, dword [esi + 0x14c]
cmp ecx, dword [esi + 0x154]
je 0x641152
push 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x641152
push ebx
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov eax, dword [esi + 0x124]
lea edx, [eax*4 + 1]
push edx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x10], ebx
je 0x641140
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
je 0x641136
push ebp
lea eax, [esp + 0x1c]
push eax
mov byte [edi], 0
mov edx, dword [esi + 0x154]
mov eax, dword [esi + 0x150]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x14c]
push edx
mov edx, dword [esi + 0x148]
push eax
push ecx
push edx
call fcn.006403d0
mov ecx, dword [esp + 0x2c]
mov eax, dword [esi + 0x13c]
mov edx, dword [esp + 0x38]
mov ebp, dword [esp + 0x28]
lea ecx, [ecx + ecx*2]
lea ecx, [eax + ecx*4]
mov ecx, dword [ecx]
lea edx, [edx + edx*2]
lea eax, [eax + edx*4]
mov eax, dword [eax]
mov edx, dword [esp + 0x34]
add ecx, ebp
add eax, edx
sub eax, ecx
add esp, 0x18
test eax, eax
jle 0x64112e
mov edx, dword [esi + 0x118]
push eax
lea eax, [edx + ecx*2]
push eax
push edi
xor esi, esi
call fcn.005a3e90
mov ebp, eax
mov al, byte [edi]
add esp, 0xc
inc ebp
test al, al
je 0x64112e
mov al, byte [esi + edi]
test al, al
lea ebx, [esi + edi]
jns 0x6410df
mov al, byte [esi + edi + 1]
test al, al
je 0x64112a
add esi, 2
jmp 0x641124
lea ecx, [esp + 0x10]
push ecx
push ebx
call fcn.00442110
add esp, 8
test al, al
je 0x641123
mov eax, dword [esp + 0x10]
cmp eax, 2
je 0x641116
sub ebp, eax
mov edx, ebp
add eax, esi
sub edx, esi
push edx
add eax, edi
push eax
lea eax, [esi + edi + 2]
push eax
call fcn.0065cc10
add esp, 0xc
add ebp, 2
mov byte [esi + edi + 1], 0xa
mov byte [ebx], 0xd
add esi, 2
jmp 0x641124
inc esi
cmp byte [esi + edi], 0
jne 0x6410c8
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
pop ebp
push ebx
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
pop edi
call dword [sym.imp.USER32.dll_CloseClipboard]
test ebx, ebx
je 0x641151
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop ebx
pop esi
add esp, 0x14
ret

Function at 0x643620
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push edi
mov edi, ecx
test byte [edi + 0xa8], 0x10
jne 0x643674
push 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x643674
push esi
push 1
call dword [sym.imp.USER32.dll_GetClipboardData]
mov esi, eax
test esi, esi
je 0x643665
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x643665
push 0
push 0
push eax
mov ecx, edi
call fcn.00642ee0
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call dword [sym.imp.USER32.dll_CloseClipboard]
pop esi
mov ecx, edi
pop edi
jmp fcn.006434e0
pop edi
ret
Function at 0x646430
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x6f9c88
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
push ebx
push esi
mov ebx, ecx
push edi
lea ecx, [esp + 0x34]
call fcn.005b01d0
xor eax, eax
mov byte [esp + 0x2c], al
mov dword [esp + 0x30], eax
sub esp, 0x64
mov edi, esp
mov dword [esp + 0xdc], eax
mov eax, dword [esp + 0xe4]
mov ecx, 0x19
lea esi, [esp + 0x70]
rep movsd dword es:[edi], dword [esi]
push eax
mov ecx, ebx
call fcn.00646250
lea ecx, [esp + 0x34]
mov dword [esp + 0x78], 0xffffffff
call fcn.00401450
mov ecx, dword [esp + 0x70]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x70
ret 4

Function at 0x646540
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x6f9c88
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
push ebx
push ebp
push esi
mov ebp, ecx
push edi
lea ecx, [esp + 0x38]
call fcn.005b01d0
xor ebx, ebx
mov byte [esp + 0x30], bl
mov dword [esp + 0x34], ebx
lea eax, [esp + 0x10]
push eax
lea ecx, [ebp + 0xcc]
mov dword [esp + 0x80], ebx
call fcn.006464b0
lea ecx, [esp + 0x38]
mov dword [esp + 0x7c], 0xffffffff
call fcn.00401450
mov esi, dword [ebp + 0xd4]
mov cl, byte [esp + 0x94]
mov edx, dword [esp + 0x98]
sub esi, 0x64
mov byte [esi + 0x20], cl
mov ecx, dword [esp + 0x84]
mov eax, dword [edx]
push ebx
lea edi, [esi + 0x28]
push ecx
mov ecx, edi
mov dword [esi + 0x24], eax
call fcn.005b0b70
mov edx, dword [esp + 0x88]
push edx
mov ecx, edi
call fcn.0045d5d0
push ebx
mov ecx, edi
call fcn.005b0af0
push ebx
mov ecx, edi
mov dword [esp + 0x98], eax
call fcn.005b0ac0
mov dword [esi + 8], eax
mov eax, dword [esp + 0x94]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x8c]
cmp eax, ebx
mov dword [esi], ebx
mov dword [esi + 4], ebx
je 0x646624
mov ecx, dword [eax]
mov dword [esi], ecx
mov edx, dword [eax + 4]
mov dword [esi + 4], edx
mov ecx, dword [eax + 8]
mov dword [esi + 8], ecx
mov edx, dword [eax + 0xc]
mov dword [esi + 0xc], edx
push ebx
mov ecx, edi
call fcn.005b0af0
push ebx
mov ecx, edi
mov dword [esp + 0x98], eax
call fcn.005b0ac0
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x94]
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x90]
cmp eax, ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
je 0x646670
mov ecx, dword [eax]
mov dword [esi + 0x10], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0x14], edx
mov ecx, dword [eax + 8]
mov dword [esi + 0x18], ecx
mov edx, dword [eax + 0xc]
mov dword [esi + 0x1c], edx
mov eax, dword [esi + 0x18]
cmp eax, dword [ebp + 0x54]
jle 0x64667b
mov dword [ebp + 0x54], eax
mov esi, dword [esi + 0x1c]
cmp esi, dword [ebp + 0x58]
jle 0x646686
mov dword [ebp + 0x58], esi
mov ecx, dword [esp + 0x74]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x70
ret 0x18
Function at 0x647dc0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x6f9d39
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [edi + 8], ebx
mov dword [esp + 0x10], edi
mov dword [edi + 0x28], 0xffffffff
mov dword [esp + 0x1c], ebx
mov dword [edi + 0x30], ebx
mov dword [edi + 0x50], ebx
lea esi, [edi + 0x70]
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
push 2
mov ecx, esi
mov byte [esp + 0x20], 3
mov byte [edi + 0x80], bl
call fcn.004828f0
mov eax, dword [esi + 4]
cmp eax, ebx
mov dword [esp + 0xc], 0x76090c
jne 0x647e2a
xor edx, edx
jmp 0x647e32
mov edx, dword [esi + 8]
sub edx, eax
sar edx, 2
cmp eax, ebx
je 0x647e53
mov ecx, dword [esi + 0xc]
sub ecx, eax
sar ecx, 2
cmp edx, ecx
jae 0x647e53
mov eax, dword [esi + 8]
mov dword [eax], vtable.type_info.0
add eax, 4
mov dword [esi + 8], eax
jmp 0x647e65
mov eax, dword [esi + 8]
lea ecx, [esp + 0xc]
push ecx
push 1
push eax
mov ecx, esi
call fcn.0048b250
mov edx, dword [esi + 4]
cmp edx, ebx
mov dword [esp + 0xc], 0x773474
jne 0x647e78
xor ecx, ecx
jmp 0x647e80
mov ecx, dword [esi + 8]
sub ecx, edx
sar ecx, 2
cmp edx, ebx
je 0x647ea1
mov eax, dword [esi + 0xc]
sub eax, edx
sar eax, 2
cmp ecx, eax
jae 0x647ea1
mov eax, dword [esi + 8]
mov dword [eax], vtable.type_info.0
add eax, 4
mov dword [esi + 8], eax
jmp 0x647eb3
mov eax, dword [esi + 8]
lea edx, [esp + 0xc]
push edx
push 1
push eax
mov ecx, esi
call fcn.0048b250
mov ecx, dword [esp + 0x14]
mov dword [edi + 0x28], 3
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret 8

Function at 0x648870
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x6f9e18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push str.CGuiTab
lea ecx, [esp + 0x1c]
call fcn.005ff7e0
lea eax, [esp + 0x18]
mov ecx, eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x20], eax
call fcn.00646d10
mov byte [esp + 4], 0
mov ecx, dword [esp + 4]
push ecx
mov byte [esp + 0xc], 0
mov edx, dword [esp + 0xc]
push edx
lea eax, [esp + 0xb]
push eax
lea ecx, [esp + 0x18]
push ecx
push str.AddControl
lea ecx, [esp + 0x2c]
mov dword [esp + 0x40], 1
mov dword [esp + 0x20], fcn.00648060
call fcn.00648690
push ecx
mov ecx, esp
mov dword [esp + 0x10], esp
push eax
call fcn.005fb780
mov edx, dword [esp + 0x38]
push 0
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x38], 2
call fcn.005fb860
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 1
call fcn.005fb880
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], 0xffffffff
call fcn.005fb7a0
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
Function at 0x64df00
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x6f9fbe
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push ebp
push esi
mov esi, ecx
or eax, 0xffffffff
xor ebx, ebx
mov dword [esi + 8], eax
mov dword [esi + 4], eax
push edi
mov dword [esp + 0x10], esi
mov dword [esi + 0xc], ebx
lea edi, [esi + 0x14]
mov dword [esi], 0x722e88
mov eax, 0xf
mov dword [edi + 0x18], eax
mov dword [edi + 0x14], ebx
mov dword [esp + 0x1c], ebx
mov byte [edi + 4], bl
lea ebp, [esi + 0x30]
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x14], ebx
mov byte [ebp + 4], bl
mov eax, dword [esp + 0x24]
push eax
mov byte [esp + 0x20], 2
call fcn.0065c790
mov ecx, dword [esp + 0x28]
add esp, 4
push eax
push ecx
mov ecx, edi
call fcn.00404b60
mov edi, dword [esp + 0x28]
push edi
call fcn.0065c790
add esp, 4
push eax
push edi
mov ecx, ebp
call fcn.00404b60
mov ecx, dword [esp + 0x14]
pop edi
mov dword [esi + 0x10], ebx
mov dword [esi + 0x50], ebx
mov dword [esi + 0x4c], ebx
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x65e6f9
Capabilities:
Terminate process

Disassembly:
push 8
push 0x7252d8
call fcn.00663e18
push 8
call fcn.00663de4
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x783c28], esi
jne 0x65e72d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x783c24], esi
mov al, byte [ebp + 0x10]
mov byte [0x783c20], al
cmp dword [ebp + 0xc], edi
jne 0x65e777
cmp dword [0x78566c], edi
je 0x65e767
mov eax, dword [0x785668]
sub eax, 4
mov dword [0x785668], eax
cmp eax, dword [0x78566c]
jb 0x65e767
mov eax, dword [eax]
cmp eax, edi
je 0x65e748
call eax
jmp 0x65e748
push 0x75223c
mov eax, 0x752234
call fcn.0065e677
pop ecx
push 0x752248
mov eax, 0x752240
call fcn.0065e677
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x65e7a8
cmp dword [ebp + 0x10], edi
jne 0x65e7b6
mov dword [0x783c28], esi
push dword [ebp + 8]
call fcn.0065e635
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x65e7b5
push 8
call fcn.00663d2f
pop ecx
ret
call fcn.00663e53
ret
Function at 0x6605ff
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x725308
call fcn.00663e18
mov edi, 0x94
mov eax, edi
call fcn.0065d6a0
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 [0x783be8], ecx
mov eax, dword [esi + 4]
mov dword [0x783bf4], eax
mov edx, dword [esi + 8]
mov dword [0x783bf8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x783bec], esi
cmp ecx, 2
je 0x66065f
or esi, 0x8000
mov dword [0x783bec], esi
shl eax, 8
add eax, edx
mov dword [0x783bf0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x66069a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x66069a
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x6606b2
cmp eax, 0x20b
je 0x66069f
mov dword [ebp - 0x1c], esi
jmp 0x6606c6
cmp dword [ecx + 0x84], 0xe
jbe 0x66069a
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x6606c0
cmp dword [ecx + 0x74], 0xe
jbe 0x66069a
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00665a5a
pop ecx
test eax, eax
jne 0x6606da
push 0x1c
call fcn.006605db
pop ecx
call fcn.006657b3
test eax, eax
jne 0x6606eb
push 0x10
call fcn.006605db
pop ecx
call fcn.00667221
mov dword [ebp - 4], esi
call fcn.0066992e
test eax, eax
jge 0x660704
push 0x1b
call fcn.006605b6
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x78463c], eax
call fcn.0066b25d
mov dword [0x783c7c], eax
call fcn.0066b1bb
test eax, eax
jge 0x66072a
push 8
call fcn.006605b6
pop ecx
call fcn.0066af88
test eax, eax
jge 0x66073b
push 9
call fcn.006605b6
pop ecx
push 1
call fcn.0065e68f
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x660751
push eax
call fcn.006605b6
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0066af2b
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x660772
movzx eax, word [ebp - 0x40]
jmp 0x660775
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0041b580
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x660793
push edi
call fcn.0065e7bc
call fcn.0065e7de
jmp 0x6607c5
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00663e53
ret
Function at 0x661cb7
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x661cd4
call fcn.00662a3f
mov dword [eax], 0x16
xor eax, eax
jmp 0x661d3e
push esi
push 0x8c
push 1
call fcn.006635bd
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x661d29
push esi
call fcn.006655b9
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x661d07
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x661c22
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x661d3d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.0065db48
test ebx, ebx
pop ecx
je 0x661d3b
push ebx
call fcn.00662a51
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x666726
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x6668fa
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x784500]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x6668fa
test cl, 0x48
je 0x666791
cmp byte [eax + 5], 0xa
je 0x666791
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x6667e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x6667cb
call fcn.00662a3f
mov dword [eax], 9
call fcn.00662a48
mov dword [eax], esi
jmp 0x6667db
cmp eax, 0x6d
je 0x6668fa
push eax
call fcn.00662a51
pop ecx
or eax, 0xffffffff
jmp 0x6668fc
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x6668f5
test eax, eax
je 0x66680a
cmp byte [ebx], 0xa
jne 0x66680a
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x666813
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x6668ef
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x6668df
cmp al, 0xd
je 0x666845
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x6668d1
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x66685f
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x66685a
add dword [ebp + 0x10], 2
jmp 0x6668b3
mov dword [ebp + 0x10], eax
jmp 0x6668cd
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x666887
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x6668cd
cmp dword [ebp - 0xc], 0
je 0x6668cd
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x6668a8
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x6668b3
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x6668d0
cmp ebx, dword [ebp + 0xc]
jne 0x6668b8
cmp byte [ebp - 1], 0xa
jne 0x6668b8
mov byte [ebx], 0xa
jmp 0x6668d0
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00669bc7
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x6668d1
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x666829
jmp 0x6668ef
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x6668ef
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x6668fc
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x666c36
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 0x666c64
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 0x666c6b
cmp ebx, dword [eax + 4]
jae 0x666c6b
xor eax, eax
jmp 0x666e5b
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x666c7c
xor eax, eax
inc eax
jmp 0x666e5a
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x666c92
cmp ecx, edx
jae 0x666dd7
cmp dword [eax + 4], 0
je 0x666c9b
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x666c83
cmp dword [ebp + 8], 0
je 0x666cbd
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x666dd7
cmp eax, esi
jae 0x666dd7
mov eax, dword [0x783e98]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x666ce2
cmp dword [esi*4 + 0x783ea0], edi
je 0x666ddb
inc esi
cmp esi, eax
jl 0x666cd0
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x666e57
cmp dword [ebp - 8], 0x1000000
jne 0x666e57
test byte [ebp - 0xc], 0xcc
je 0x666d60
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x666e57
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x666e57
cmp word [eax + 0x18], 0x10b
jne 0x666e57
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x666e57
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x666d60
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x666d60
test byte [ecx + 0x27], 0x80
jne 0x666dd7
push 1
push 0x783ee0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x666c74
mov ecx, dword [0x783e98]
test ecx, ecx
mov edx, ecx
jle 0x666d94
lea eax, [ecx*4 + 0x783e9c]
cmp dword [eax], edi
je 0x666d94
dec edx
sub eax, 4
test edx, edx
jg 0x666d88
test edx, edx
jne 0x666dc5
push 0xf
pop ebx
cmp ecx, ebx
jg 0x666da1
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x666db9
lea eax, [edx*4 + 0x783ea0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x666da7
cmp ecx, 0x10
jge 0x666dc5
inc ecx
mov dword [0x783e98], ecx
push 0
push 0x783ee0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x666c74
xor eax, eax
jmp 0x666e5a
test esi, esi
jle 0x666c74
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x783ee0
call ebx
test eax, eax
jne 0x666c74
cmp dword [esi*4 + 0x783ea0], edi
je 0x666e31
mov eax, dword [0x783e98]
lea esi, [eax - 1]
test esi, esi
jl 0x666e1f
cmp dword [esi*4 + 0x783ea0], edi
je 0x666e1b
dec esi
jns 0x666e0f
test esi, esi
jge 0x666e2f
cmp eax, 0x10
jge 0x666e2a
inc eax
mov dword [0x783e98], eax
lea esi, [eax - 1]
jmp 0x666e31
je 0x666e49
xor ecx, ecx
test esi, esi
jl 0x666e49
lea eax, [ecx*4 + 0x783ea0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x666e37
push 0
push 0x783ee0
call ebx
jmp 0x666c74
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x666fa8
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x77766c]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x666fd9
xor eax, eax
jmp 0x667162
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x784500]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x667015
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0067636f
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x6670f0
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x66712e
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x667079
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x66706a
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x66704a
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x6670b9
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x6670c2
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x66703b
jmp 0x6670c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x66715d
cmp dword [ebp - 0x6c], edi
je 0x66712e
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x667123
call fcn.00662a3f
mov dword [eax], 9
call fcn.00662a48
mov dword [eax], esi
jmp 0x667158
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x667118
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x6670c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x6670c4
push dword [ebp - 0x6c]
call fcn.00662a51
pop ecx
jmp 0x667158
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x667146
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x667146
xor eax, eax
jmp 0x667160
call fcn.00662a3f
mov dword [eax], 0x1c
call fcn.00662a48
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x667160
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00664752
add ebp, 0x3a0
leave
ret