joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4afce4
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffb4
mov dword [esp], eax
lea esi, [esp + 0x30]
lea eax, [esp + 0xc]
push eax
call sub.kernel32.dll_GetSystemInfo
mov edi, dword [esp]
push 0x1c
push esi
push edi
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4afdaf
jmp 0x4afda3
cmp dword [esi + 0x10], 0x1000
jne 0x4afd8f
test byte [esi + 0x15], 1
jne 0x4afd8f
mov byte [esp + 4], 0
mov ebp, dword [esi + 0x14]
cmp ebp, 1
je 0x4afd40
cmp ebp, 2
je 0x4afd40
cmp ebp, 0x10
je 0x4afd40
cmp ebp, 0x20
jne 0x4afd5c
lea eax, [esp + 8]
push eax
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4afd5c
mov byte [esp + 4], 1
xor ebx, ebx
jmp 0x4afd6d
mov eax, dword [esi]
add eax, ebx
call fcn.004afcdc
add ebx, dword [esp + 0x10]
cmp ebx, dword [esi + 0xc]
jb 0x4afd60
cmp byte [esp + 4], 0
je 0x4afd8f
lea eax, [esp + 8]
push eax
mov eax, dword [esp + 0xc]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov edi, eax
push 0x1c
push esi
push edi
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4afdaf
mov eax, dword [esi + 4]
cmp eax, dword [esp]
je 0x4afd15
add esp, 0x4c
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x1000114e
Capabilities:
Allocate or change rwx memory
Create process on windows
Execute shellcode via indirect call
Read file on windows
Terminate process

Disassembly:
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
mov word [0x10003036], ax
xor edi, edi
movzx ecx, word [eax + 0x10002034]
mov word [eax + 0x10003030], cx
add eax, 2
cmp cx, di
jne 0x10001161
push 1
push edi
push edi
mov ebx, 0x10003030
push ebx
push edi
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
xor eax, eax
mov word [0x10003036], ax
movzx ecx, word [eax + str.desktop.ini]
mov word [eax + 0x10003030], cx
add eax, 2
cmp cx, di
jne 0x10001191
push 0x40
mov esi, 0x1000
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push ebx
mov dword [0x10003018], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x1000301c], eax
push edi
cmp eax, 0xffffffff
jne 0x100011e4
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x10003024
push esi
push dword [0x10003018]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
call dword [0x10003018]
pop edi
pop esi
pop ebx
ret 0x10
Function at 0x911f90
Capabilities:
Encode data using xor

Disassembly:
jmp 0x911f9a
pushal
call 0x911fa0
pop ebp
sub ebp, 0x10
sub ebp, 0x511f90
jmp 0x911fb6
call 0xb8970884
nop
pop ds
push ecx
add byte [ebx], al
lds eax, [ecx + 0x4cc0]
add byte [ecx + 0x625], bh
mov eax, 0x511f90
add eax, ebp
add eax, 0x4c
mov ecx, 0x625
mov edx, 0x2cde07c6
xor byte [eax], dl
inc eax
dec ecx
jne 0x911fcd
jmp 0x911fe0
dec ebp
or ecx, dword [ebp + 0x4f]
cli
mov dh, 0xc6
inc edi
pop es
mov dh, 0xc6
lds ecx, [ebx]
jle 0x911fb2
mov dh, 0xc6
jl 0x911fe5
mov dh, 0xc6
xor dword [eax*8 - 0x35b8b2f2], esp
mov dh, 0xc6
lds eax, [ebx]
xchg esi, eax
xchg esi, eax
scasb al, byte es:[edi]
xchg byte [eax - 0x38], ch
invalid

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x4162f3
Capabilities:
Terminate process

Disassembly:
push 0x58
push 0x4171d0
call fcn.00416c78
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov dword [ebp - 4], ebx
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov edi, ebx
mov edx, 0x418cf8
mov ecx, esi
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x416345
cmp eax, esi
jne 0x416338
xor esi, esi
inc esi
mov edi, esi
jmp 0x416348
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x41631c
xor esi, esi
inc esi
cmp dword [0x418cfc], esi
jne 0x41635a
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x416394
cmp dword [0x418cfc], ebx
jne 0x41638e
mov dword [0x418cfc], esi
push 0x401450
push 0x401444
call fcn.004164ce
pop ecx
pop ecx
test eax, eax
je 0x416394
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
jmp 0x4164be
mov dword [0x418878], esi
cmp dword [0x418cfc], esi
jne 0x4163b7
push 0x401440
push 0x401420
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x418cfc], 2
test edi, edi
jne 0x4163c4
xor eax, eax
mov ecx, 0x418cf8
xchg dword [ecx], eax
cmp dword [0x418d08], 0
je 0x4163f0
push 0x418d08
call fcn.00416ad0
pop ecx
test eax, eax
je 0x4163f0
push ebx
push 2
push ebx
mov esi, dword [0x418d08]
mov ecx, esi
call dword [0x419350]
call esi
mov eax, dword [sym.imp.msvcrt.dll__wcmdln]
mov ecx, dword [eax]
test ecx, ecx
je 0x41637d
mov dword [ebp - 0x20], ecx
push 0x20
pop esi
mov edx, dword [ebp - 0x1c]
movzx eax, word [ecx]
cmp ax, si
ja 0x41645b
test ax, ax
je 0x41642a
test edx, edx
jne 0x41645b
test ax, ax
je 0x41642a
cmp ax, si
ja 0x41642a
add ecx, 2
mov dword [ebp - 0x20], ecx
movzx eax, word [ecx]
jmp 0x416415
test byte [ebp - 0x3c], 1
je 0x416436
movzx eax, word [ebp - 0x38]
jmp 0x416439
push 0xa
pop eax
push eax
push ecx
push ebx
push 0x400000
call main
mov dword [0x418874], eax
cmp dword [0x41888c], 0
jne 0x4164a3
push eax
call dword [sym.imp.msvcrt.dll_exit]
cmp eax, 0x22
jne 0x41646c
xor eax, eax
test edx, edx
sete al
mov edx, eax
mov dword [ebp - 0x1c], edx
add ecx, 2
mov dword [ebp - 0x20], ecx
jmp 0x416404
cmp dword [0x418878], 0
jne 0x4164b7
call dword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x418874]
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
call fcn.004ff000
jmp 0x4162f3

Function at 0x4169b4
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x417210
call fcn.00416c78
xor ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x416a14
cmp eax, 0xffffffff
je 0x416a14
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x416a0d
mov edx, dword [eax + 0x3c]
test edx, edx
js 0x416a0d
cmp edx, 0x10000000
jae 0x416a0d
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 0x416a0a
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x4015b0
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
or eax, 0xffffffff
inc eax
cmp word [ebx + eax*2], 0
jne 0x4015c2
mov dword [ebp - 0x258], eax
lea edx, [ebx + eax*2]
xor ecx, ecx
mov ax, word [ecx + 0x41542e]
mov word [edx + ecx], ax
add ecx, 2
test ax, ax
jne 0x4015d5
lea eax, [ebp - 0x250]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x254], eax
mov eax, dword [ebp - 0x258]
mov word [ebx + eax*2], 0
cmp dword [ebp - 0x254], 0xffffffff
je 0x401750
mov dword [ebp - 0x25c], 0
lea edx, [ebp - 0x224]
xor ecx, ecx
mov ax, word [edx + ecx]
cmp ax, word [ecx + 0x41542a]
jne 0x401640
add ecx, 2
test ax, ax
jne 0x401627
xor eax, eax
jmp 0x401645
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4016e6
lea edx, [ebp - 0x224]
xor ecx, ecx
mov ax, word [edx + ecx]
cmp ax, word [ecx + 0x415424]
jne 0x40166e
add ecx, 2
test ax, ax
jne 0x401655
xor eax, eax
jmp 0x401673
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4016e6
mov eax, dword [ebp - 0x258]
lea edx, [ebx + eax*2]
lea esi, [ebp - 0x224]
xor ecx, ecx
mov ax, word [esi + ecx]
mov word [edx + ecx], ax
add ecx, 2
test ax, ax
jne 0x401688
test byte [ebp - 0x250], 0x10
je 0x4016bd
push 0x415576
push ebx
call fcn.0040d770
add esp, 8
push ebx
call fcn.004015b0
mov dword [ebp - 0x25c], eax
jmp 0x4016dd
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4016dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x25c], eax
cmp dword [ebp - 0x25c], 0
jne 0x40171c
lea eax, [ebp - 0x250]
push eax
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40161f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x25c], eax
cmp eax, 0x12
jne 0x40171c
mov dword [ebp - 0x25c], 0
mov eax, dword [ebp - 0x258]
mov word [ebx + eax*2], 0
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x25c], 0
jne 0x401748
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x401758
mov eax, dword [ebp - 0x25c]
jmp 0x401764
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x401764
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x25c], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4021f0
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1014
call fcn.0040c150
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
mov dword [eax], 0
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov dword [eax + 4], 0
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push 0x41c5b0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1010], eax
cmp eax, 0xffffffff
je 0x4023b8
push 0
lea eax, [ebp - 0x100c]
push eax
push 0x1000
lea eax, [ebp - 0x1008]
push eax
push dword [ebp - 0x1010]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4023bc
cmp word [ebp - 0x1008], 0x5a4d
jne 0x4023cc
mov eax, dword [ebp - 0xfcc]
cmp eax, 0xf08
jae 0x4023cc
lea eax, [ebp + eax - 0x1008]
mov dword [ebp - 0x1014], eax
cmp dword [eax], 0x4550
jne 0x4023cc
mov eax, dword [ebp - 0x1014]
add eax, 0xf8
lea edx, [ebp - 8]
cmp eax, edx
jae 0x4023cc
mov edx, dword [ebp - 0x1014]
cmp word [edx + 6], 0
jbe 0x4022fb
xor edx, edx
xor ecx, ecx
cmp dword [eax + 0x14], edx
ja 0x4022d7
mov ebx, edx
jmp 0x4022e7
mov esi, dword [eax + 0x14]
add esi, dword [eax + 0x10]
mov edi, dword [ebp + 0xc]
mov dword [edi], esi
mov esi, dword [eax + 0x14]
mov ebx, esi
mov edx, ebx
add eax, 0x28
inc ecx
mov ebx, dword [ebp - 0x1014]
movzx ebx, word [ebx + 6]
cmp ecx, ebx
jl 0x4022ce
push 0
push 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
add eax, 2
push eax
push dword [ebp - 0x1010]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4023cc
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
push 0
lea eax, [ebp - 0x100c]
push eax
push 8
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x1010]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4023bc
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 4]
mov dword [eax], ecx
mov dword [eax + 4], ebx
cmp dword [ebp - 0x100c], 8
jb 0x4023bc
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
push 0
lea eax, [ebp - 0x100c]
push eax
push 8
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x1010]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4023bc
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 4]
mov dword [eax], ecx
mov dword [eax + 4], ebx
cmp dword [ebp - 0x100c], 8
jb 0x4023bc
push dword [ebp - 0x1010]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x4023da
xor eax, eax
jmp 0x4023da
push dword [ebp - 0x1010]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4023da
push dword [ebp - 0x1010]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402dc0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
xor eax, eax
mov edx, eax
shr edx, 1
mov ecx, eax
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr ecx, 1
and edx, 1
neg edx
and edx, 0xedb88320
xor ecx, edx
mov edx, ecx
shr edx, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr ecx, 1
and edx, 1
neg edx
and edx, 0xedb88320
xor ecx, edx
mov edx, ecx
shr edx, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr ecx, 1
and edx, 1
neg edx
and edx, 0xedb88320
xor ecx, edx
mov edx, ecx
shr edx, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr ecx, 1
and edx, 1
neg edx
and edx, 0xedb88320
xor ecx, edx
mov dword [eax*4 + 0x41d224], ecx
inc eax
cmp eax, 0x100
jb 0x402dc2
mov eax, 0x100
mov edx, dword [eax*4 + 0x41ce24]
mov ecx, edx
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x41d224]
shr edx, 8
xor ecx, edx
mov dword [eax*4 + 0x41d224], ecx
inc eax
cmp eax, 0x800
jb 0x402e64
mov dword [0x41f228], 0x406a40
mov dword [0x41f224], 0x406a40
mov dword [0x41f22c], 0x406b00
call fcn.00406cf0
test eax, eax
jne 0x402ebf
mov dword [0x41f224], 0x406b00
ret

Function at 0x403040
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov edi, dword [esi]
test edi, edi
je 0x40305d
mov dword [esi], 0
jmp 0x403061
xor eax, eax
jmp 0x4030a8
mov dword [ebp - 4], 0
push 0
lea eax, [ebp - 4]
push eax
mov eax, 0x400000
cmp edi, 0x400000
cmovbe eax, edi
push eax
push ebx
mov eax, dword [ebp + 8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 4]
add ebx, edx
sub edi, edx
add dword [esi], edx
test eax, eax
je 0x4030a2
cmp dword [ebp - 4], 0
je 0x40305d
test edi, edi
jne 0x403061
jmp 0x40305d
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x4030c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov edi, dword [esi]
test edi, edi
je 0x4030dd
mov dword [esi], 0
jmp 0x4030e1
xor eax, eax
jmp 0x403128
mov dword [ebp - 4], 0
push 0
lea eax, [ebp - 4]
push eax
mov eax, 0x400000
cmp edi, 0x400000
cmovbe eax, edi
push eax
push ebx
mov eax, dword [ebp + 8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 4]
add ebx, edx
sub edi, edx
add dword [esi], edx
test eax, eax
je 0x403122
cmp dword [ebp - 4], 0
je 0x4030dd
test edi, edi
jne 0x4030e1
jmp 0x4030dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4031e0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
lea edx, [ebp - 4]
push edx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40320c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40321e
mov edx, dword [ebp - 4]
xor eax, eax
xor edi, edi
add eax, esi
adc edx, edi
mov dword [ebx], eax
mov dword [ebx + 4], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x403320
Capabilities:
Timestomp file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov edi, dword [eax]
cmp edi, 0xffffffff
je 0x40336d
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x40336d
mov ebx, dword [ebx]
mov dword [ebp - 0x14], ebx
mov esi, dword [esi]
mov dword [ebp - 0x18], esi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x406930
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa2c
push ebx
mov ebx, dword [ebp + 8]
push 0x208
lea eax, [ebp - 0x410]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, 0x208
ja 0x406985
lea eax, [ebp - 0x410]
push eax
call fcn.00413e70
push ebx
lea eax, [ebp - 0x410]
push eax
push str._ls_ls
push 0x30e
lea eax, [ebp - 0xa2c]
push eax
call fcn.0040dca0
add esp, 0x14
jmp 0x40699a
push 0x30e
push ebx
lea eax, [ebp - 0xa2c]
push eax
call fcn.0040dd30
add esp, 0xc
push 8
push 0
lea eax, [ebp - 0xa2c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x406da0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov dword [ebp - 0x94], 0x94
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov edx, eax
cmp dword [ebp - 0x90], 5
setae al
movzx eax, al
xor ecx, ecx
test edx, edx
cmove eax, ecx
mov esp, ebp
pop ebp
ret
Function at 0x40c450
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x415c20
push 0x40d9c8
push dword fs:[0]
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x2000000
call fcn.0040f350
pop ecx
mov dword [0x41f230], eax
call fcn.0040de80
test eax, eax
je 0x40c54c
mov dword [ebp - 4], 0
call fcn.0040e0a0
call fcn.0040e200
call fcn.0040e2e0
call fcn.0040e5e0
call fcn.0040e690
mov ebx, 0x416ecc
jmp 0x40c4bf
call dword [ebx]
add ebx, 4
cmp ebx, 0x416ecc
jb 0x40c4ba
mov dword [ebp - 0x34], 0
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
call fcn.0040e740
movzx edx, word [ebp - 0x30]
mov ecx, 0xa
test dword [ebp - 0x34], 1
cmovne ecx, edx
push ecx
push eax
push 0
push ebx
call fcn.00401590
mov ebx, eax
mov esi, 0x416ecc
jmp 0x40c512
call dword [esi]
add esi, 4
cmp esi, 0x416ecc
jb 0x40c50d
push ebx
call fcn.0040e780
or dword [ebp - 4], 0xffffffff
jmp 0x40c559
push 0xfffffffffffffffe
call fcn.0040e850
pop ecx
jmp 0x40c493
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
lea esp, [ebp - 0x70]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40e5e0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
cmp byte [esi], 0
jne 0x40e613
push 0x104
lea eax, [ebp - 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea esi, [ebp - 0x104]
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x108]
push eax
push 0
push 0
push esi
call fcn.0040e470
add esp, 0x14
mov eax, dword [ebp - 0x108]
mov edx, dword [ebp - 0x10c]
lea eax, [edx + eax*4]
push eax
call fcn.0040cd70
pop ecx
mov edi, eax
test edi, edi
je 0x40e67b
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x108]
push eax
mov ebx, dword [ebp - 0x108]
lea eax, [edi + ebx*4]
push eax
push edi
push esi
call fcn.0040e470
add esp, 0x14
dec ebx
mov dword [0x41f26c], ebx
mov dword [0x41f270], edi
jmp 0x40e683
push 0xfffffffffffffffc
call fcn.0040e850
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40e690
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
test eax, eax
cmove eax, dword [0x41702c]
mov dword [ebp - 4], eax
mov esi, eax
xor eax, eax
cmp byte [esi], 0
je 0x40e6cf
or edx, 0xffffffff
inc edx
cmp byte [esi + edx], 0
jne 0x40e6b7
lea edi, [edx + 1]
cmp byte [esi], 0x3d
je 0x40e6c8
add eax, edi
add esi, edi
cmp byte [esi], 0
jne 0x40e6b4
inc eax
push eax
call fcn.0040cd70
pop ecx
mov edx, eax
mov dword [0x41f274], eax
test eax, eax
je 0x40e72d
mov eax, dword [ebp - 4]
mov esi, eax
cmp byte [esi], 0
je 0x40e714
or eax, 0xffffffff
inc eax
cmp byte [esi + eax], 0
jne 0x40e6ef
lea edi, [eax + 1]
cmp byte [esi], 0x3d
je 0x40e70d
xor ecx, ecx
mov al, byte [esi + ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x40e700
add edx, edi
add esi, edi
cmp byte [esi], 0
jne 0x40e6ec
mov byte [edx], 0
mov eax, dword [ebp - 4]
cmp eax, dword [0x41702c]
je 0x40e735
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x40e735
push 0xfffffffffffffffc
call fcn.0040e850
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x412820
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x810
push ebx
push esi
push edi
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
lea esi, [edx + eax]
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x10]
mov edi, eax
cmp edi, esi
jae 0x412904
lea eax, [ebp - 0xd]
lea edx, [ebp - 0x80c]
lea ecx, [ebp - 0x80c]
cmp eax, ecx
jbe 0x412886
cmp edi, esi
jae 0x412886
cmp byte [edi], 0xa
jne 0x41287a
inc dword [ebp - 8]
mov byte [edx], 0xd
inc edx
inc edx
inc edi
mov cl, byte [edi - 1]
mov byte [edx - 1], cl
cmp edx, eax
jb 0x41286a
lea eax, [ebp - 0x80c]
mov ebx, edx
sub ebx, eax
push dword [ebp + 0xc]
call fcn.00413260
pop ecx
test eax, eax
je 0x4128ba
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push ebx
lea edx, [ebp - 0x80c]
push edx
push dword [0x41f678]
push eax
call fcn.00413410
add esp, 0x10
push dword [ebp + 0xc]
call fcn.00413210
pop ecx
push 0
lea edx, [ebp - 0x810]
push edx
push ebx
lea edx, [ebp - 0x80c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4128fb
mov eax, dword [ebp - 0x810]
add dword [ebp - 0xc], eax
cmp dword [ebp - 0x810], ebx
jb 0x412904
inc edi
cmp edi, esi
jb 0x412857
jmp 0x412904
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ebp - 8]
mov dword [eax], ecx
mov dword [eax + 4], ebx
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
mov dword [eax + 8], edx
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x412930
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x814
push ebx
push esi
push edi
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
add edx, eax
mov dword [ebp - 0x814], edx
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x10]
mov esi, eax
cmp esi, dword [ebp - 0x814]
jae 0x412a4d
lea eax, [ebp - 0xe]
lea edx, [ebp - 0x80c]
lea ecx, [ebp - 0x80c]
cmp eax, ecx
jbe 0x4129b2
cmp esi, dword [ebp - 0x814]
jae 0x4129b2
cmp word [esi], 0xa
jne 0x4129a0
add dword [ebp - 8], 2
mov word [edx], 0xd
add edx, 2
add edx, 2
add esi, 2
mov cx, word [esi - 2]
mov word [edx - 2], cx
cmp edx, eax
jb 0x412986
lea eax, [ebp - 0x80c]
mov edi, edx
sub edi, eax
push ebx
call fcn.00413260
pop ecx
test eax, eax
je 0x412a16
push ebx
call fcn.00413210
pop ecx
push 0
lea edx, [ebp - 0x810]
push edx
mov edx, edi
shr edx, 1
push edx
lea edx, [ebp - 0x80c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x412a44
shl dword [ebp - 0x810], 1
mov eax, dword [ebp - 0x810]
add dword [ebp - 0xc], eax
cmp dword [ebp - 0x810], edi
jb 0x412a4d
add esi, 2
cmp esi, dword [ebp - 0x814]
jb 0x412973
jmp 0x412a4d
push ebx
call fcn.00413210
pop ecx
push 0
lea edx, [ebp - 0x810]
push edx
push edi
lea edx, [ebp - 0x80c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4129f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x412a4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ebp - 8]
mov dword [eax], ecx
mov dword [eax + 4], ebx
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
mov dword [eax + 8], edx
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret