joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10048357
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 + 0x10072388]
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 0x1004839d
cmp word [ebx], dx
jne 0x1004839d
or byte [eax + edi + 0x28], 4
jmp 0x100483a2
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 0x10048505
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 0x100484e5
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x100483e3
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x10048419
cmp eax, edx
jae 0x10048427
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 0x100483be
jmp 0x10048505
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 0x100484e0
cmp dword [ebp - 0x18], 0
je 0x100484e0
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x10072388]
test byte [eax + edi + 0x28], 0x48
je 0x100484b6
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 0x1004847a
mov word [esi], cx
jmp 0x100484b1
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x10072388]
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 + 0x10072388]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x10072388]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x10048505
pop eax
cmp word [ebp - 4], ax
jne 0x100484c6
cmp esi, ebx
jne 0x100484c6
mov word [esi], ax
jmp 0x10048502
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10048d90
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x10048505
push 0xd
pop eax
jmp 0x100484c1
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x10072388]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x100484ff
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x10048505
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 0x1004d759
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 0x1004d7f6
push ebx
push esi
call fcn.1004d722
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.1004c6e8
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1004d7a3
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1004d7f5
push edi
push eax
call fcn.1004554d
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1004d7c3
call fcn.10045169
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1004d7f4
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1004c6e8
add esp, 0x20
test eax, eax
jne 0x1004d7e2
push edi
call fcn.10045169
jmp 0x1004d7ea
push ebx
call fcn.10045169
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 0x1004d7f9
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x1004d80a
pop esi
ret
push ebx
push edi
push esi
call fcn.1004d722
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.1004554d
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x1004d832
push ebx
push esi
push edi
call fcn.10030420
add esp, 0xc
push 0
call fcn.10045169
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x1004dc02
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1004d847

Function at 0x100502bb
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.100426e4
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1005032a
cmp esi, dword [ebp - 4]
je 0x10050325
cmp dword [ebp + 0xc], 0
je 0x10050325
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10050302
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.1004fe0d
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x1005032c
xor eax, eax
inc eax
jmp 0x1005032c
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x10050391
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x10070090]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.100426e4
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.100426e4
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x10050408
cmp word [ecx], dx
je 0x10050408
mov eax, dword [0x1005e084]
push edi
dec eax
push eax
push 0x1005df70
call fcn.10050330
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x1005047b
cmp word [eax], dx
je 0x1005047b
mov eax, dword [edi]
test eax, eax
je 0x1005042c
cmp word [eax], dx
je 0x1005042c
lea eax, [ebp - 0x10]
push eax
call fcn.1004fd13
jmp 0x10050435
lea eax, [ebp - 0x10]
push eax
call fcn.1004fdae
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x100504a5
mov eax, dword [0x1005df6c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x1005dc60
call fcn.10050330
add esp, 0xc
test al, al
je 0x100504a5
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x10050470
cmp word [eax], di
je 0x10050470
lea eax, [ebp - 0x10]
push eax
call fcn.1004fd13
pop ecx
jmp 0x100504a7
lea eax, [ebp - 0x10]
push eax
call fcn.1004fdae
jmp 0x1005046d
mov eax, dword [edi]
test eax, eax
je 0x10050492
cmp word [eax], dx
je 0x10050492
lea eax, [ebp - 0x10]
push eax
call fcn.1004fcc8
pop ecx
jmp 0x100504a5
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x10050570
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.100501b5
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x10050570
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x10050570
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x10050570
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x100504fd
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.10046f85
test ebx, ebx
je 0x1005056b
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.10046f85
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10050570
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10050570
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.100543e7
add esp, 0x10
xor eax, eax
inc eax
jmp 0x10050572
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1002eca1
leave
ret
Function at 0x10054b11
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.10054a8d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x10054c80
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x10054c80
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x10054c35
jg 0x10054b6d
test eax, eax
je 0x10054c2b
push 1
push 0x1000
call fcn.10044286
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10054b90
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x10054c22
push 0x8000
push ebx
call fcn.100549be
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x10054bb9
jg 0x10054bb4
cmp ecx, 0x1000
jb 0x10054bb9
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.10044d50
add esp, 0x10
cmp eax, 0xffffffff
je 0x10054bfe
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 0x10054bb4
jl 0x10054be5
test ecx, ecx
jne 0x10054ba6
push dword [ebp - 0xc]
push ebx
call fcn.100549be
push esi
call fcn.10045169
add esp, 0xc
xor ebx, ebx
jmp 0x10054c8e
cmp byte [edi + 0x24], 0
je 0x10054c15
cmp dword [edi + 0x20], 5
jne 0x10054c15
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x10054c20
mov ebx, dword [edi + 0x18]
jmp 0x10054c22
xor ebx, ebx
push esi
call fcn.10045169
pop ecx
jmp 0x10054c8e
test ecx, ecx
jg 0x10054bf7
jl 0x10054c35
test eax, eax
jae 0x10054bf7
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10048d90
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10054c55
cmp byte [edi + 0x1c], 0
je 0x10054bf7
jmp 0x10054c86
push ebx
call fcn.1004e15a
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x10054bf7
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 0x10054c8e
cmp byte [edi + 0x1c], 0
je 0x10054c8b
mov ebx, dword [edi + 0x18]
jmp 0x10054c8e
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10048d90
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x100556c0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x100556ed
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x100556ed
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x406a50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, dword [ebp + 0x18]
push esi
push edi
mov edi, dword [ebp + 0x14]
xor esi, esi
push esi
push esi
push dword [ebp + 0x10]
mov dword [ebp - 8], esi
push dword [ebp + 0xc]
mov dword [ebp - 4], edi
push esi
push esi
push dword [ebp + 8]
mov dword [ebx], esi
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov dword [ebp - 8], eax
cmp eax, esi
je 0x406abf
cmp dword [ebp + 0x1c], esi
jne 0x406a8f
mov dword [ebx], 1
jmp 0x406ab4
push 0xffffffffffffffff
lea eax, [ebp - 8]
push esi
push eax
cmp edi, esi
je 0x406a9e
push 2
jmp 0x406aa0
push 1
call dword [0x4010dc]
cmp eax, esi
jne 0x406ab4
push ebx
push dword [ebp - 8]
call dword [fcn.004010f8]
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_LdrLoadDll]
jmp 0x406ac9
push esi
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_wcsncpy]
pop edi
pop esi
pop ebx
leave
ret 0x18

Function at 0x40712f
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov word [esi + 0x1a], bx
push 0x7e
push esi
call fcn.0040563e
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], ebx
jmp 0x4071b5
cmp ebx, dword [esi]
jl 0x40715b
cmp ebx, edi
jge 0x40715b
mov edi, ebx
mov eax, ebx
sub eax, edi
je 0x407178
dec eax
je 0x407173
dec eax
je 0x40716e
add ebx, dword [ebp + 0xc]
mov bl, byte [ebx]
jmp 0x407187
mov bl, byte [esi + 0x1a]
jmp 0x407191
mov bl, byte [esi + 0x1b]
jmp 0x407191
mov bl, byte [esi + 0x18]
test edi, edi
je 0x407187
cmp edi, dword [ebp + 0x10]
jne 0x407187
or bl, 8
movzx eax, bl
push eax
push esi
call fcn.00407108
movzx eax, bl
bt dword [0x405198], eax
jae 0x4071a8
push 0x7d
push esi
call fcn.0040563e
xor bl, 0x20
movzx eax, bl
push eax
push esi
call fcn.0040563e
inc dword [ebp - 8]
lea eax, [edi + 3]
cmp dword [ebp - 8], eax
mov ebx, dword [ebp - 8]
jl 0x407151
push 0x7e
push esi
call fcn.0040563e
push esi
call fcn.00405336
movzx ecx, byte [esi + 0x18]
shr ecx, 4
and cl, 7
mov edi, ecx
lea eax, [esi + 0x18]
push eax
call fcn.00406f18
mov eax, dword [ebp + 0xc]
mov dword [esi + edi*4 + 0x1c], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + edi*4 + 0x3c], eax
lea eax, [ebx - 3]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x430003
Capabilities:
Encode data using xor

Disassembly:
pushal
nop
nop
mov eax, section..text
nop
nop
mov ebx, 0x408f6c
mov ecx, 0x4c494938
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x430024
nop
nop
mov eax, section..data
nop
nop
mov ebx, 0x42e3d0
mov ecx, 0x7bd4198c
nop
test eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
je 0x430084
xor dword [eax], ecx
nop
nop
nop
nop
add eax, 4
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
jne 0x43006c
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x401219
Function at 0x40b9d7
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov eax, ecx
push edi
mov dword [ebp - 4], eax
mov esi, 0x104
lea ebx, [eax + 0x7c]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edi, eax
test edi, edi
jne 0x40ba41
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40ba12
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x40ba74
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x40bb1c
cmp byte [eax + 0x19], 2
jb 0x40baf5
push esi
push 0x402650
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x2c
jmp 0x40bae5
cmp edi, esi
jb 0x40ba74
mov esi, 0x8007006f
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x40bb1c
cmp byte [eax + 0x19], 2
jb 0x40baf5
push esi
push 0x40268c
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x2d
jmp 0x40bae5
mov eax, dword [ebp - 4]
cmp word [eax + edi*2 + 0x7a], 0x5c
je 0x40bab3
push 0x40201c
mov ecx, ebx
call fcn.0040bcbb
mov esi, eax
test esi, esi
jns 0x40bab3
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x40bb1c
cmp byte [eax + 0x19], 2
jb 0x40baf5
push esi
push 0x4026c0
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x2e
jmp 0x40bae5
push 0x402710
mov ecx, ebx
call fcn.0040bcbb
mov esi, eax
test esi, esi
jns 0x40baf0
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x40bb1c
cmp byte [eax + 0x19], 2
jb 0x40baf5
push esi
push 0x40272c
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x2f
mov edx, 0x402770
pop ecx
call fcn.0040953b
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x40bb1c
test byte [eax + 0x1c], 4
je 0x40bb1c
cmp byte [eax + 0x19], 4
jb 0x40bb1c
push ebx
push dword [eax + 0x14]
mov edx, 0x402770
push dword [eax + 0x10]
push 0x30
pop ecx
call fcn.004094bd
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40cb40
Capabilities:
Terminate process

Disassembly:
push 0x5c
push 0x40e300
call fcn.0040d0ec
and dword [ebp - 0x24], 0
and dword [ebp - 4], 0
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov dword [ebp - 4], 0xfffffffe
xor ebx, ebx
inc ebx
mov dword [ebp - 4], ebx
mov eax, dword fs:[0x18]
mov edi, dword [eax + 4]
xor esi, esi
mov edx, 0x40f5fc
mov ecx, edi
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x40c945
cmp eax, edi
jne 0x40c957
mov esi, ebx
cmp dword [0x40f600], ebx
jne 0x40c964
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x40c993
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40c92e
cmp dword [0x40f600], 0
jne 0x40c98d
mov dword [0x40f600], ebx
push 0x40102c
push 0x401020
call fcn.0040cae4
pop ecx
pop ecx
test eax, eax
je 0x40c993
jmp 0x40cacd
mov dword [0x40f1b8], ebx
cmp dword [0x40f600], ebx
jne 0x40c9b6
push 0x40101c
push section..text
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x40f600], 2
test esi, esi
jne 0x40c9c3
xor eax, eax
mov ecx, 0x40f5fc
xchg dword [ecx], eax
cmp dword [0x40f60c], 0
je 0x40c9f1
push 0x40f60c
call fcn.0040d360
pop ecx
test eax, eax
je 0x40c9f1
push 0
push 2
push 0
mov esi, dword [0x40f60c]
mov ecx, esi
call dword [0x410240]
call esi
mov eax, dword [sym.imp.msvcrt.dll__wcmdln]
mov ecx, dword [eax]
test ecx, ecx
je 0x40cacd
mov dword [ebp - 0x20], ecx
push 0x20
pop esi
mov edx, dword [ebp - 0x24]
movzx eax, word [ecx]
cmp ax, si
ja 0x40ca61
test ax, ax
je 0x40ca1a
test edx, edx
jne 0x40ca61
movzx eax, word [ecx]
test ax, ax
je 0x40ca2f
cmp ax, si
ja 0x40ca2f
add ecx, 2
mov dword [ebp - 0x20], ecx
jmp 0x40ca1a
test byte [ebp - 0x40], 1
je 0x40ca3b
movzx eax, word [ebp - 0x3c]
jmp 0x40ca3e
push 0xa
pop eax
push eax
push ecx
push 0
push 0x400000
call main
mov dword [0x40f1b4], eax
cmp dword [0x40f1cc], 0
jne 0x40caa9
push eax
call dword [sym.imp.msvcrt.dll_exit]
cmp eax, 0x22
jne 0x40ca72
xor eax, eax
test edx, edx
sete al
mov edx, eax
mov dword [ebp - 0x24], edx
add ecx, 2
mov dword [ebp - 0x20], ecx
jmp 0x40ca09
cmp dword [0x40f1b8], 0
jne 0x40cabd
call dword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x40f1b4]
mov dword [ebp - 4], 0xfffffffe
jmp 0x40cad9
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.0040d134
ret
call fcn.0040d468
jmp 0x40c8f8

Function at 0x40d24f
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x40e3a8
call fcn.0040d054
xor ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x40d2af
cmp eax, 0xffffffff
je 0x40d2af
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x40d2a8
mov edx, dword [eax + 0x3c]
test edx, edx
js 0x40d2a8
cmp edx, 0x10000000
jae 0x40d2a8
add eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax]
sub ecx, 0x4550
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
jmp 0x40d2a5
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, ecx
call fcn.0040d099
ret 4
Function at 0x40d310
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x40d34e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x40d346
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x40d350
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x40d336
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x40d430
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x40d446
xor eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
xor eax, eax
cmp dword [ecx], 0x4550
jne 0x40d461
mov edx, 0x10b
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
Function at 0x4015fe
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
test esi, esi
je 0x401628
movzx ecx, byte [edi]
movzx eax, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x434f00]
inc edi
sub esi, 1
jne 0x401610
pop edi
mov eax, edx
pop esi
ret 0xc

Function at 0x401ee0
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x1050
call fcn.00415460
push ebx
mov ebx, dword [esp + 0x105c]
push ebp
push edi
mov edi, ecx
and dword [edi + 0x1034], 0
cmp byte [edi + 0x30], 0
jne 0x401f0c
test bl, 4
jne 0x401f0c
xor al, al
jmp 0x401f0e
mov al, 1
push esi
mov esi, ebx
shr esi, 1
not esi
and esi, 1
inc esi
shl esi, 0x1e
test bl, 1
je 0x401f27
or esi, 0x40000000
shr ebx, 3
not ebx
and ebx, 1
test al, al
je 0x401f36
or ebx, 2
lea ecx, [esp + 0x18]
call fcn.00401b85
cmp byte [edi + 0x24], 0
je 0x401f4b
or esi, 0x100
push 0
push 0x8000000
push 3
push 0
push ebx
push esi
push dword [esp + 0x107c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x401fbb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x18]
push 0x800
push eax
push dword [esp + 0x106c]
call fcn.004035e5
test al, al
je 0x401fc8
push 0
push 0x8000000
push 3
push 0
push ebx
push esi
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x401fc3
mov dword [esp + 0x10], eax
jmp 0x401fc3
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
cmp ebp, 0xffffffff
jne 0x401fd9
cmp dword [esp + 0x10], 2
jne 0x401fd9
mov dword [edi + 0x1034], 1
cmp byte [edi + 0x24], 0
pop esi
je 0x401fff
cmp ebp, 0xffffffff
je 0x401fff
or dword [esp + 0xc], 0xffffffff
lea eax, [esp + 0xc]
or dword [esp + 0x10], 0xffffffff
push 0
push eax
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
xor eax, eax
cmp ebp, 0xffffffff
mov byte [edi + 0x1c], al
mov dword [edi + 0x10], eax
setne bl
mov byte [edi + 0x15], al
je 0x40202e
push 0x800
push dword [esp + 0x1064]
lea ecx, [edi + 0x32]
mov dword [edi + 8], ebp
push ecx
call fcn.0040694c
mov byte [edi + 0x25], 0
pop edi
pop ebp
mov al, bl
pop ebx
add esp, 0x1050
ret 8