joyce8/EMBER2024-capa huggingface dataset:
Function at 0x413e34
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.0040ed4a
and dword [ebp - 4], 0
cmp dword [0x41e6e8], 0
mov ebx, eax
jne 0x413ee5
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x413f96
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x413f96
push eax
call fcn.0040ecd8
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x41e6e8], eax
call esi
push eax
call fcn.0040ecd8
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x41e6ec], eax
call esi
push eax
call fcn.0040ecd8
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x41e6f0], eax
call esi
push eax
call fcn.0040ecd8
pop ecx
mov dword [0x41e6f8], eax
test eax, eax
je 0x413ee5
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040ecd8
pop ecx
mov dword [0x41e6f4], eax
mov eax, dword [0x41e6f4]
cmp eax, ebx
je 0x413f3d
cmp dword [0x41e6f8], ebx
je 0x413f3d
push eax
call fcn.0040ed53
push dword [0x41e6f8]
mov esi, eax
call fcn.0040ed53
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x413f3d
test edi, edi
je 0x413f3d
call esi
test eax, eax
je 0x413f34
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x413f34
test byte [ebp - 0xc], 1
jne 0x413f3d
or dword [ebp + 0x10], 0x200000
jmp 0x413f76
mov eax, dword [0x41e6ec]
cmp eax, ebx
je 0x413f76
push eax
call fcn.0040ed53
pop ecx
test eax, eax
je 0x413f76
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x413f76
mov eax, dword [0x41e6f0]
cmp eax, ebx
je 0x413f76
push eax
call fcn.0040ed53
pop ecx
test eax, eax
je 0x413f76
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x41e6e8]
call fcn.0040ed53
pop ecx
test eax, eax
je 0x413f96
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x413f98
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43300c
nop
nop
nop
nop
nop
pop eax
nop
add eax, 0x40a063
nop
sub eax, 0x40a009
nop
nop
nop
nop
mov ebx, dword [eax]
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
add ebx, 4
nop
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x433030
nop
nop
nop
nop
nop
add eax, 0xc
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43301e
nop
nop
nop
nop
nop
nop
popal
jmp 0x431219
Function at 0x994cdc
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x994d03
call fcn.00937288
mov dword [eax], esi
call fcn.00937275
push 0x16
pop esi
mov dword [eax], esi
call fcn.00937eca
mov eax, esi
jmp 0x994d58
test dword [ebp + 0xc], 0xfffffff9
jne 0x994ce9
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x994d30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0093729b
pop ecx
call fcn.00937275
mov eax, dword [eax]
jmp 0x994d58
test al, 0x10
jne 0x994d56
test al, 1
je 0x994d56
test byte [ebp + 0xc], 2
je 0x994d56
call fcn.00937288
mov dword [eax], 5
call fcn.00937275
mov dword [eax], 0xd
jmp 0x994d27
xor eax, eax
pop esi
pop ebp
ret

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

Disassembly:
push ebx
push esi
mov ebx, 0x10003028
xor esi, esi
push edi
cmp ebx, 0x10002034
jne 0x1000116a
push esi
push esi
push esi
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
mov word [0x1000302e], ax
movzx ecx, word [eax + 0x10002038]
mov word [eax + 0x10003028], cx
add eax, 2
cmp cx, si
jne 0x10001172
push 1
push esi
push esi
push ebx
push esi
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
xor eax, eax
mov word [0x1000302e], ax
movzx ecx, word [eax + 0x1000203c]
mov word [eax + 0x10003028], cx
add eax, 2
cmp cx, si
jne 0x1000119d
push 0x40
mov eax, 0x1000
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x10003018], eax
lea edi, [ebx - 2]
mov ax, word [edi + 2]
add edi, 2
cmp ax, si
jne 0x100011cb
push 5
pop ecx
mov esi, str.sktop.ini
rep movsd dword es:[edi], dword [esi]
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x1000301c], eax
cmp eax, 0xffffffff
je 0x10001222
push esi
push 0x10003020
push 0x1000
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 0x40a15c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
mov word [ebp + 0xc], ax
mov ebx, 0x19826993
mov eax, ebx
mul ebx
mov dword [ebp - 0x10], eax
mov ebx, eax
xor esi, esi
mov eax, ebx
mul ebx
mov dword [ebp - 0x14], eax
mov ebx, eax
mov word [ebp - 0xc], 0
jmp 0x40a272
mov eax, ebx
xor eax, ebx
mov ebx, eax
mov eax, dword [ebp + 8]
add eax, esi
push eax
call fcn.00405066
pop ecx
mov edx, eax
mov byte [ebp - 1], dl
cmp byte [ebp - 1], 0
jne 0x40a1b3
mov byte [ebp - 2], 0
jmp 0x40a1dd
call fcn.0040ddd8
mov dword [ebp - 0x18], eax
mov eax, 0x7fff
mov edi, 7
movzx edx, byte [ebp - 1]
mov ecx, edi
sub ecx, edx
cdq
idiv ecx
mov ecx, eax
mov eax, dword [ebp - 0x18]
cdq
idiv ecx
mov edx, eax
mov byte [ebp - 2], dl
mov eax, dword [ebp + 8]
mov al, byte [esi + eax]
cmp al, 0x70
jb 0x40a1fc
cmp al, 0x7f
ja 0x40a1fc
mov eax, dword [ebp + 8]
add eax, esi
inc eax
movzx edx, byte [eax]
movzx ecx, byte [ebp - 2]
sub edx, ecx
mov byte [eax], dl
mov eax, dword [ebp + 8]
movzx eax, byte [esi + eax]
cmp eax, 0xe2
jne 0x40a21b
mov eax, dword [ebp + 8]
add eax, esi
inc eax
movzx edx, byte [eax]
movzx ecx, byte [ebp - 2]
sub edx, ecx
mov byte [eax], dl
mov eax, ebx
sub eax, ebx
mov ebx, eax
push 8
push 0x90
lea eax, [ebp - 0xa]
push eax
call fcn.0040ddc0
movzx eax, byte [ebp - 1]
push eax
mov eax, dword [ebp + 8]
add eax, esi
push eax
lea eax, [ebp - 0xa]
movzx edx, byte [ebp - 2]
add eax, edx
push eax
call fcn.0040ddb4
mov eax, ebx
sub eax, ebx
mov ebx, eax
push 6
lea eax, [ebp - 0xa]
push eax
mov eax, dword [ebp + 8]
add eax, esi
push eax
call fcn.0040ddb4
add esp, 0x24
mov eax, ebx
add eax, ebx
mov ebx, eax
add esi, 6
inc word [ebp - 0xc]
movzx eax, word [ebp + 0xc]
dec eax
cmp esi, eax
jb 0x40a190
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4012a0
Capabilities:
Listen for remote procedure calls

Disassembly:
push 0x10
call dword [sym.imp.SDL2.dll_SDL_Init]
add esp, 4
cmp eax, 0xffffffff
je 0x40130c
push 0x400
push 2
push 0x8010
push 0xac44
call dword [sym.imp.SDL2_mixer.dll_Mix_OpenAudio]
add esp, 0x10
test eax, eax
js 0x40130c
push 0
push str.2d4dc2f9_ce90_4080_8a00_1cb819086970
push 0xa
push str.ncalrpc
call dword [sym.imp.RPCRT4.dll_RpcServerUseProtseqEpA]
test eax, eax
jne 0x40130c
push eax
push eax
push 0x410c58
call dword [sym.imp.RPCRT4.dll_RpcServerRegisterIf]
test eax, eax
jne 0x40130c
push eax
push 0x4d2
push 1
call dword [sym.imp.RPCRT4.dll_RpcServerListen]
test eax, eax
jne 0x40130c
ret 0x10
or eax, 0xffffffff
ret 0x10
Function at 0x5ad330
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x5ad33c
pop ebp
ret
mov dword [ebp + 0xc], eax
pop ebp
jmp fcn.005ad350

Function at 0x438ca0
Capabilities:
Encode data using xor

Disassembly:
push 0x438a14
pop ebx
add eax, 0xf7177af4
sub edx, 0xe90a5a06
dec edx
call fcn.00438cfb
sub edx, edx
sub esp, 4
mov dword [esp], 0x685c4c4a
pop eax
add eax, eax
xor dword [edi], ebx
or edx, edx
add eax, 0xc7371f9b
add edi, 1
sub eax, edx
sub eax, 1
cmp edi, esi
jne fcn.00438ca0
add edx, 0xd5a5537d
sub edx, 0x10c5fc7f
ret
Function at 0x10001830
Capabilities:
Create thread
Get common file path
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 1
jne 0x100019dc
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push str._version.dll
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.10007465
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x100223a8], eax
test eax, eax
je 0x100019c7
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x1001f284
push eax
call esi
push 0x1001f298
push dword [0x100223a8]
mov dword [0x100223d0], eax
call esi
push 0x1001f2b4
push dword [0x100223a8]
mov dword [0x100223d4], eax
call esi
push 0x1001f2cc
push dword [0x100223a8]
mov dword [0x100223a0], eax
call esi
push 0x1001f2e4
push dword [0x100223a8]
mov dword [0x100223d8], eax
call esi
push 0x1001f2fc
push dword [0x100223a8]
mov dword [0x100223a4], eax
call esi
push 0x1001f318
push dword [0x100223a8]
mov dword [0x100223c8], eax
call esi
push 0x1001f334
push dword [0x100223a8]
mov dword [0x100223c0], eax
call esi
push 0x1001f34c
push dword [0x100223a8]
mov dword [0x100223dc], eax
call esi
push 0x1001f360
push dword [0x100223a8]
mov dword [0x100223e4], eax
call esi
push 0x1001f370
push dword [0x100223a8]
mov dword [0x100223b8], eax
call esi
push 0x1001f380
push dword [0x100223a8]
mov dword [0x100223b4], eax
call esi
push 0x1001f390
push dword [0x100223a8]
mov dword [0x100223e0], eax
call esi
push 0x1001f3a0
push dword [0x100223a8]
mov dword [0x100223bc], eax
call esi
push 0x1001f3b4
push dword [0x100223a8]
mov dword [0x100223cc], eax
call esi
push 0x1001f3c8
push dword [0x100223a8]
mov dword [0x100223c4], eax
call esi
push 0x1001f3d8
push dword [0x100223a8]
mov dword [0x100223b0], eax
call esi
mov dword [0x100223ac], eax
pop esi
push 0
push 0
push 0
push 0x10001290
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [ebp - 4]
mov eax, 1
xor ecx, ebp
call fcn.10001bf5
mov esp, ebp
pop ebp
ret 0xc

Function at 0x100021dd
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
lea edx, [ecx + 0x18]
add edx, eax
movzx eax, word [ecx + 6]
imul esi, eax, 0x28
add esi, edx
jmp 0x10002212
mov ecx, dword [edx + 0xc]
cmp dword [ebp + 0xc], ecx
jb 0x1000220f
mov eax, dword [edx + 8]
add eax, ecx
cmp dword [ebp + 0xc], eax
jb 0x1000221b
add edx, 0x28
cmp edx, esi
jne 0x100021fd
xor eax, eax
pop esi
pop ebp
ret
mov eax, edx
jmp 0x10002218

Function at 0x10007a4c
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x10007a8b
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10007a8b
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10007a8b
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x10007a8b
cmp dword [ecx + 0x74], 0xe
jbe 0x10007a8b
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x1000d75e
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 0x1000d7fb
push ebx
push esi
call fcn.1000d727
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.1000d6bd
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1000d7a8
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1000d7fa
push edi
push eax
call fcn.100099b0
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1000d7c8
call fcn.10008770
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1000d7f9
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1000d6bd
add esp, 0x20
test eax, eax
jne 0x1000d7e7
push edi
call fcn.10008770
jmp 0x1000d7ef
push ebx
call fcn.10008770
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 0x100116db
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x18
mov eax, dword [eax + 0xc]
nop
shr eax, 3
test al, 1
je 0x100116f5
mov al, 1
leave
ret
mov eax, dword [ebp + 8]
push ebx
push esi
mov eax, dword [eax + 0xc]
nop
test al, 0xc0
mov eax, dword [ebp + 8]
je 0x1001170c
mov ecx, dword [eax]
cmp ecx, dword [eax + 4]
je 0x10011764
mov eax, dword [eax + 0x10]
nop
push eax
call fcn.1000f132
mov esi, eax
pop ecx
cmp esi, 0xffffffff
je 0x10011764
xor ebx, ebx
lea eax, [ebp - 0x10]
inc ebx
xorps xmm0, xmm0
push ebx
push eax
movlpd qword [ebp - 8], xmm0
push dword [ebp - 4]
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x10011764
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x10011764
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x1001175e
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
je 0x10011760
xor bl, bl
mov al, bl
jmp 0x10011766
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x10013821
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 8]
mov ecx, edx
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, edx
sar ecx, 6
and eax, 0x3f
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x10021f90]
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10013863
cmp byte [ebx], 0xa
jne 0x10013863
or byte [edi + eax + 0x28], 4
jmp 0x10013868
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x1001396b
mov cl, byte [eax]
cmp cl, 0x1a
je 0x10013946
lea ebx, [eax + 1]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 0xc]
cmp cl, 0xd
je 0x10013897
mov eax, dword [ebp - 8]
jmp 0x100138b7
mov edx, dword [ebp - 0x10]
cmp dword [ebp - 8], edx
mov edx, dword [ebp + 8]
jae 0x100138d3
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0xa
jne 0x100138b1
add eax, 2
mov cl, 0xa
jmp 0x100138b4
mov eax, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov byte [esi], cl
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], esi
mov esi, dword [ebp - 0xc]
add esi, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jb 0x10013879
jmp 0x1001396b
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10013941
cmp dword [ebp - 0x10], 0
je 0x10013941
mov edx, dword [ebp - 0x18]
mov eax, dword [edx*4 + 0x10021f90]
test byte [eax + edi + 0x28], 0x48
je 0x10013920
mov cl, byte [ebp - 1]
cmp cl, 0xa
jne 0x10013910
mov byte [esi], 0xa
jmp 0x1001396a
mov byte [esi], 0xd
mov eax, dword [edx*4 + 0x10021f90]
mov byte [eax + edi + 0x2a], cl
jmp 0x1001396a
cmp byte [ebp - 1], 0xa
jne 0x1001392a
cmp esi, ebx
je 0x1001390b
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10013791
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x1001396b
mov byte [esi], 0xd
jmp 0x1001396a
mov eax, edx
and edx, 0x3f
sar eax, 6
imul edx, edx, 0x38
mov edi, dword [eax*4 + 0x10021f90]
mov al, byte [edi + edx + 0x28]
test al, 0x40
jne 0x10013968
or al, 2
mov byte [edi + edx + 0x28], al
jmp 0x1001396b
mov byte [esi], cl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10013974
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
and eax, 0x3f
push ebx
mov ebx, dword [ebp + 0xc]
sar edx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [edx*4 + 0x10021f90]
mov dword [ebp - 8], edx
mov edx, dword [eax + edi + 0x18]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x100139b8
push 0xa
pop esi
cmp word [ebx], si
jne 0x100139b8
or byte [eax + edi + 0x28], 4
jmp 0x100139bd
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + edx*2]
mov eax, ebx
mov dword [ebp - 0x10], edx
mov esi, ebx
cmp ebx, edx
jae 0x10013b28
movzx edx, word [eax]
mov ecx, edx
mov dword [ebp - 0xc], ecx
movzx ecx, cx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 8]
cmp edx, 0x1a
je 0x10013b00
lea ebx, [eax + 2]
mov dword [ebp - 4], ebx
push 0xd
pop ebx
cmp dx, bx
mov ebx, dword [ebp + 0xc]
je 0x10013a0a
mov ebx, dword [ebp - 0x14]
mov edx, esi
mov eax, dword [ebp - 4]
movzx ebx, bx
mov dword [ebp - 4], ebx
jmp 0x10013a34
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jae 0x10013a53
push 0xa
pop ebx
cmp word [edx], bx
jne 0x10013a21
push ebx
add eax, 4
pop edx
jmp 0x10013a29
mov eax, edx
mov edx, dword [ebp - 0xc]
movzx edx, dx
movzx edx, dx
mov dword [ebp - 4], edx
mov edx, esi
mov dword [ebp - 0x14], esi
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], 2
mov word [esi], cx
mov esi, dword [ebp - 0xc]
add esi, edx
cmp eax, dword [ebp - 0x10]
jb 0x100139cf
jmp 0x10013b28
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10013afb
cmp dword [ebp - 0x14], 0
je 0x10013afb
mov eax, dword [ebp - 8]
push 0xa
mov eax, dword [eax*4 + 0x10021f90]
test byte [eax + edi + 0x28], 0x48
pop eax
je 0x10013ad7
mov dx, word [ebp - 4]
cmp dx, ax
jne 0x10013a9f
mov word [esi], ax
jmp 0x10013b25
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebp - 8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov eax, dword [eax*4 + 0x10021f90]
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x10021f90]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x10021f90]
pop ecx
mov byte [eax + edi + 0x2c], cl
jmp 0x10013b25
cmp word [ebp - 4], ax
jne 0x10013ae1
cmp esi, ebx
je 0x10013a97
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10013791
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x10013b28
push 0xd
pop eax
jmp 0x10013a97
mov eax, ecx
and ecx, 0x3f
sar eax, 6
imul ecx, ecx, 0x38
mov edi, dword [eax*4 + 0x10021f90]
mov al, byte [edi + ecx + 0x28]
test al, 0x40
jne 0x10013b22
or al, 2
mov byte [edi + ecx + 0x28], al
jmp 0x10013b28
mov word [esi], dx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x100150a3
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.1001501f
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x10015212
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x10015212
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x100151c7
jg 0x100150ff
test eax, eax
je 0x100151bd
push 1
push 0x1000
call fcn.10008710
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10015122
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x100151b4
push 0x8000
push ebx
call fcn.10014f4e
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x1001514b
jg 0x10015146
cmp ecx, 0x1000
jb 0x1001514b
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.1000eb4c
add esp, 0x10
cmp eax, 0xffffffff
je 0x10015190
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 0x10015146
jl 0x10015177
test ecx, ecx
jne 0x10015138
push dword [ebp - 0xc]
push ebx
call fcn.10014f4e
push esi
call fcn.10008770
add esp, 0xc
xor ebx, ebx
jmp 0x10015220
cmp byte [edi + 0x24], 0
je 0x100151a7
cmp dword [edi + 0x20], 5
jne 0x100151a7
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x100151b2
mov ebx, dword [edi + 0x18]
jmp 0x100151b4
xor ebx, ebx
push esi
call fcn.10008770
pop ecx
jmp 0x10015220
test ecx, ecx
jg 0x10015189
jl 0x100151c7
test eax, eax
jae 0x10015189
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10013791
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x100151e7
cmp byte [edi + 0x1c], 0
je 0x10015189
jmp 0x10015218
push ebx
call fcn.1000f132
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x10015189
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 0x10015220
cmp byte [edi + 0x1c], 0
je 0x1001521d
mov ebx, dword [edi + 0x18]
jmp 0x10015220
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10013791
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x100176c0
Capabilities:
Parse pe header

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, dword [0x100ad24]
xor ebx, ebx
cmp eax, ebx
je 0x100322a
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 8]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10031de
push ebx
lea ecx, [ebp - 4]
push ecx
sub eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push dword [ebp + 8]
push dword [0x100ad24]
call esi
test eax, eax
je 0x100322d
mov ecx, 0x100229c
mov eax, ecx
push edi
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x100320d
push ebx
lea edx, [ebp - 4]
push edx
sub eax, edi
push eax
push ecx
push dword [0x100ad24]
call esi
test eax, eax
pop edi
je 0x100322d
xor ebx, ebx
inc ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
mov eax, ebx
pop ebx
leave
ret 4

Function at 0x10034d4
Capabilities:
Move file

Disassembly:
mov eax, dword [esp + 0xc]
push esi
xor esi, esi
inc esi
cmp byte [eax], 0
je 0x10034f2
push dword [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x10034f2
xor esi, esi
mov eax, dword [esp + 0x14]
cmp byte [eax], 0
je 0x100350e
push 1
push dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x100350e
xor esi, esi
mov eax, esi
pop esi
ret 0x10

Function at 0x1003518
Capabilities:
Query environment variable
Set environment variable
Write file on windows

Disassembly:
push ecx
push ebx
xor ebx, ebx
push ebx
push ebx
push 0x1002388
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x10035e3
push esi
mov esi, 0x100afa0
push esi
push 0x1002378
push 0x100ad60
call fcn.01002a1f
push ebx
push 0x4000002
push 1
push ebx
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, eax
cmp edx, 0xffffffff
mov dword [0x100a024], edx
je 0x10035e2
push ebp
push edi
mov ebp, 0x100a5a0
xor eax, eax
push ebx
mov ecx, 0xc5
mov edi, ebp
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push eax
mov edi, 0x314
push edi
push ebp
push edx
mov dword [0x100a5a0], 0x6e776453
mov dword [0x100a5a4], 0x10000
mov dword [0x100a5a8], 0xc0000013
mov byte [0x100a7b0], bl
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10035cd
cmp dword [esp + 0x10], edi
jne 0x10035cd
push esi
push 0x1002388
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
jmp 0x10035e0
push dword [0x100a024]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x100a024], 0xffffffff
pop edi
pop ebp
pop esi
pop ebx
pop ecx
ret