joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40bc01
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4284e8
cmp edx, dword [eax]
je 0x40bc23
add eax, 8
inc ecx
cmp eax, 0x428578
jl 0x40bc14
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4284e8]
jne 0x40bd51
mov eax, dword [0x42bb28]
cmp eax, 1
je 0x40bd2b
test eax, eax
jne 0x40bc54
cmp dword [0x425cb4], 1
je 0x40bd2b
cmp edx, 0xfc
je 0x40bd51
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40bc8b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0040bdd0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00405a10
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40bcce
lea eax, [ebp - 0x1a4]
push eax
call fcn.00405a10
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x42053c
push edi
call fcn.00403fd0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0040bdd0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040bde0
lea eax, [ebp - 0xa0]
push 0x42051c
push eax
call fcn.0040bde0
push dword [esi + 0x4284ec]
lea eax, [ebp - 0xa0]
push eax
call fcn.0040bde0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040e36f
add esp, 0x2c
pop edi
jmp 0x40bd51
lea eax, [ebp + 8]
lea esi, [esi + 0x4284ec]
push 0
push eax
push dword [esi]
call fcn.00405a10
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x412410
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.00404950
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x4124db
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x4124db
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x41248e
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x412499
or bh, 8
and edi, 0x8000000
je 0x4124b4
mov eax, dword [0x42d29c]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x4124db
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4128b0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x4128db
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x4128ff
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x41291a
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x416f95
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x416fd7
call fcn.0041bf33
mov esi, dword [eax + 0xc]
push pe_nt_image_headers32
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x416fd7
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x416fce
xor eax, eax
jmp 0x416fdf
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00416fe5
pop edi
pop esi
pop ebx
ret 4

Function at 0x41a61a
Capabilities:
Create http request

Disassembly:
mov eax, 0x41d864
call fcn.004050d4
push ecx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
mov eax, dword [ebp + 0xc]
and dword [ebp - 4], 0
and dword [esi + 0x10], 0
and dword [esi + 0xc], 0
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esi], vtable.CInternetSession.0
jne 0x41a652
call fcn.0041bf33
mov eax, dword [eax + 0x10]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [esi + 8], eax
jne 0x41a677
push eax
push dword [esi + 4]
call fcn.0041b25a
jmp 0x41a683
push esi
push eax
mov ecx, 0x42b788
call fcn.0041a694
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret 0x18

Function at 0x41a945
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags

Disassembly:
mov eax, 0x41d8c3
call fcn.004050d4
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
call fcn.00418dfb
mov eax, dword [ebp + 0x18]
lea ebx, [esi + 0x24]
mov dword [esi + 0x1c], eax
mov eax, dword [0x425508]
xor edi, edi
mov dword [ebx], eax
mov dword [ebp - 4], edi
push dword [ebp + 0x10]
lea ecx, [esi + 0xc]
mov byte [ebp - 4], 1
mov dword [esi], vtable.CInternetFile.0
call fcn.00413549
push dword [ebp + 0x14]
mov ecx, ebx
call fcn.00413549
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x1c]
mov dword [esi + 0x18], eax
mov dword [esi + 0x3c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x40], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x18

Function at 0x41c6d3
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x41c701
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x41c71f
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0041c639
jmp 0x41c71f
mov eax, dword [esi + 0x14]
test eax, eax
je 0x41c71f
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0041c639
test edi, edi
mov eax, edi
jne 0x41c709
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401070
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, edx
mov dword [ebp - 0x42c], ecx
mov eax, 0x400
cdq
xor ebx, ebx
push esi
lea ecx, [edi + edi]
mov dword [ebp - 0x424], esi
idiv ecx
mov dword [ebp - 0x41c], edi
push eax
mov dword [ebp - 0x428], eax
lea eax, [ebp - 0x404]
push ecx
push eax
mov dword [ebp - 0x40c], 0
mov dword [ebp - 0x410], ebx
mov dword [ebp - 0x408], ebx
call fcn.00407d43
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x414], esi
test esi, esi
je 0x401230
nop dword [eax + eax]
mov eax, dword [ebp - 0x408]
add eax, esi
mov dword [ebp - 0x420], eax
cmp eax, ebx
jbe 0x40113e
add ebx, ebx
or ebx, 1
cmp eax, ebx
ja 0x401102
mov eax, edi
imul eax, ebx
shl eax, 2
push eax
push dword [ebp - 0x40c]
call fcn.00405bf0
add esp, 8
mov dword [ebp - 0x40c], eax
test eax, eax
je 0x40126a
mov dword [ebp - 0x410], ebx
test esi, esi
je 0x4011f5
mov ebx, dword [ebp - 0x41c]
lea ecx, [ebp - 0x404]
mov edx, dword [ebp - 0x40c]
mov eax, ebx
imul eax, dword [ebp - 0x408]
mov dword [ebp - 0x418], ecx
lea edi, [ebx + ebx]
lea eax, [edx + eax*4]
mov dword [ebp - 0x408], eax
lea edx, [ebx*4]
test ebx, ebx
jle 0x4011ce
mov esi, eax
mov edx, ecx
mov edi, ebx
nop dword [eax]
movzx ecx, byte [edx + 1]
lea edx, [edx + 2]
movzx eax, byte [edx - 2]
lea esi, [esi + 4]
shl ecx, 8
or ecx, eax
xor ecx, 0xffff8000
movzx eax, cx
sub eax, 0x8000
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [esi - 4], xmm0
sub edi, 1
jne 0x401180
mov ecx, dword [ebp - 0x418]
lea edx, [ebx*4]
mov eax, dword [ebp - 0x408]
lea edi, [ebx + ebx]
mov esi, dword [ebp - 0x414]
add eax, edx
add ecx, edi
sub esi, 1
mov dword [ebp - 0x408], eax
mov dword [ebp - 0x418], ecx
mov dword [ebp - 0x414], esi
jne 0x401172
mov ebx, dword [ebp - 0x410]
mov edi, dword [ebp - 0x41c]
push dword [ebp - 0x424]
mov eax, dword [ebp - 0x420]
push dword [ebp - 0x428]
mov dword [ebp - 0x408], eax
lea eax, [edi + edi]
push eax
lea eax, [ebp - 0x404]
push eax
call fcn.00407d43
mov esi, eax
mov dword [ebp - 0x414], eax
add esp, 0x10
test esi, esi
jne 0x4010f0
mov ebx, dword [ebp - 0x408]
imul edi, ebx
shl edi, 2
push edi
push dword [ebp - 0x40c]
call fcn.00405bf0
add esp, 8
test eax, eax
je 0x40126a
mov ecx, dword [ebp - 0x42c]
pop edi
pop esi
mov dword [ecx], eax
mov eax, ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040257b
mov esp, ebp
pop ebp
ret
push str.Out_of_memory._n
push 2
call fcn.00405928
add esp, 4
push eax
call fcn.00401010
add esp, 8
push 1
call fcn.0040577b
int3

Function at 0x402db8
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x402df7
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x402df7
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402df7
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x402df7
cmp dword [ecx + 0x74], 0xe
jbe 0x402df7
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x409c3a
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c728
push 0x41c720
push str.FlsAlloc
push 0x1f
call fcn.00409af9
mov esi, eax
add esp, 0x10
test esi, esi
je 0x409c6e
push dword [ebp + 8]
mov ecx, esi
call dword [0x41b11c]
call esi
jmp 0x409c74
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x409cb8
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c738
push 0x41c730
push str.FlsGetValue
push 0x21
call fcn.00409af9
mov esi, eax
add esp, 0x10
test esi, esi
je 0x409cef
push dword [ebp + 8]
mov ecx, esi
call dword [0x41b11c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x409cf7
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c740
push 0x41c738
push str.FlsSetValue
push 0x22
call fcn.00409af9
mov esi, eax
add esp, 0x10
test esi, esi
je 0x409d31
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41b11c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x40c17f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x429108]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40c1bf
cmp byte [ebx], 0xa
jne 0x40c1bf
or byte [edi + eax + 0x28], 4
jmp 0x40c1c4
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x40c2c3
mov dl, byte [eax]
cmp dl, 0x1a
je 0x40c2a6
inc eax
cmp dl, 0xd
je 0x40c1f0
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x40c216
cmp eax, ecx
jae 0x40c224
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x40c1d8
jmp 0x40c2c3
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 0x40c2a1
cmp dword [ebp - 0x10], 0
je 0x40c2a1
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x429108]
test byte [eax + edi + 0x28], 0x48
je 0x40c27b
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x40c266
mov byte [esi], dl
jmp 0x40c277
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x429108]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x40c2c3
cmp byte [ebp - 1], 0xa
jne 0x40c28a
cmp esi, ebx
jne 0x40c28a
mov byte [esi], 0xa
jmp 0x40c2c2
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041351d
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40c2c3
mov byte [esi], 0xd
jmp 0x40c2c2
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x429108]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40c2c0
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40c2c3
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40c2cc
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 + 0x429108]
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 0x40c312
cmp word [ebx], dx
jne 0x40c312
or byte [eax + edi + 0x28], 4
jmp 0x40c317
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 0x40c47a
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 0x40c45a
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x40c358
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x40c38e
cmp eax, edx
jae 0x40c39c
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 0x40c333
jmp 0x40c47a
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 0x40c455
cmp dword [ebp - 0x18], 0
je 0x40c455
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x429108]
test byte [eax + edi + 0x28], 0x48
je 0x40c42b
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 0x40c3ef
mov word [esi], cx
jmp 0x40c426
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x429108]
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 + 0x429108]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x429108]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x40c47a
pop eax
cmp word [ebp - 4], ax
jne 0x40c43b
cmp esi, ebx
jne 0x40c43b
mov word [esi], ax
jmp 0x40c477
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041351d
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x40c47a
push 0xd
pop eax
jmp 0x40c436
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x429108]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x40c474
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x40c47a
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 0x40e0ad
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 0x40e14a
push ebx
push esi
call fcn.0040e076
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.0040e00a
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40e0f7
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40e149
push edi
push eax
call fcn.0040acd3
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40e117
call fcn.0040998c
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40e148
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040e00a
add esp, 0x20
test eax, eax
jne 0x40e136
push edi
call fcn.0040998c
jmp 0x40e13e
push ebx
call fcn.0040998c
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 0x414285
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.00414201
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4143f4
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4143f4
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4143a9
jg 0x4142e1
test eax, eax
je 0x41439f
push 1
push 0x1000
call fcn.0040992f
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x414304
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x414396
push 0x8000
push ebx
call fcn.004086e8
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x41432d
jg 0x414328
cmp ecx, 0x1000
jb 0x41432d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00410ff0
add esp, 0x10
cmp eax, 0xffffffff
je 0x414372
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 0x414328
jl 0x414359
test ecx, ecx
jne 0x41431a
push dword [ebp - 0xc]
push ebx
call fcn.004086e8
push esi
call fcn.0040998c
add esp, 0xc
xor ebx, ebx
jmp 0x414402
cmp byte [edi + 0x24], 0
je 0x414389
cmp dword [edi + 0x20], 5
jne 0x414389
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x414394
mov ebx, dword [edi + 0x18]
jmp 0x414396
xor ebx, ebx
push esi
call fcn.0040998c
pop ecx
jmp 0x414402
test ecx, ecx
jg 0x41436b
jl 0x4143a9
test eax, eax
jae 0x41436b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041351d
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4143c9
cmp byte [edi + 0x1c], 0
je 0x41436b
jmp 0x4143fa
push ebx
call fcn.0040e8a1
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x41436b
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 0x414402
cmp byte [edi + 0x1c], 0
je 0x4143ff
mov ebx, dword [edi + 0x18]
jmp 0x414402
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0041351d
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x416b40
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x416b6d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x416b6d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x94e1b0
Capabilities:
Acquire debug privileges

Disassembly:
push ecx
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp]
push 1
push str.SeBackupPrivilege
push ecx
call fcn.0094e140
mov edx, dword [esp + 0xc]
push 1
push str.SeDebugPrivilege
push edx
call fcn.0094e140
mov eax, dword [esp + 0x18]
push 1
push str.SeRestorePrivilege
push eax
call fcn.0094e140
mov ecx, dword [esp + 0x24]
push 1
push str.SeSecurityPrivilege
push ecx
call fcn.0094e140
mov edx, dword [esp + 0x30]
add esp, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop ecx
ret

Function at 0x94ebfa
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x94ec50
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0x96087c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x94ec43
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x94ec52
xor eax, eax
pop esi
leave
ret 4