joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4057d0
Capabilities:
Packed with generic packer

Disassembly:
mov word [ebp - 0x7a2f8a0a], es
push dword [edx + ebp - 0x75]
pop ebp
cld
pop esi
imul byte [ebp + 0x23]
jl 0x4057ea
cmp ebx, 0x5322c63b
jae 0x405803
push esi
pop edx
call 0xfa8e60
push 0
push 2
xchg edi, eax
push ebx
call fcn.0040b540
mov ebx, eax
mov ebx, dword [ebp + 0xc]
mov esp, ebx
invalid

Function at 0x4057fe
Capabilities:
Packed with generic packer

Disassembly:
mov esi, dword [ebp - 0x21]
xor edi, edi
cmp dword [esi + 4], 2
jne 0x4057ce
mov edx, dword [esi]
pushal
add dword [edx], ebp
push 0
push edx
call 0x40f5b0
cmp eax, 0x14276
jne 0x4057c7
mov edi, 1
jmp 0x405810
mov dword [esi - 0x7b], 0
mov eax, edx
mov dword [ebp - 4], edx
jmp 0x4057a0
or dword ss:[eax - 0x18], edx
mov eax, 0xf800004b
jbe 0x405823
rol dword [eax - 0xc74168b], 0x5a
pop edx
push es
add al, 0x85
sal byte [esi + edx - 0x75], 0xe
push 0
push 0
push 0
jns 0x40586a
into
dec esp
add byte gs:[ebx - 0x457af78a], cl
jne 0x405821
pop esi
pop edi
pop ebx
mov esp, dword [edx + 0x5d]
ret
popal
mov edi, ecx
ret

Function at 0x40a35c
Capabilities:
Encode data using xor

Disassembly:
nop
push ebp
nop
mov eax, 0x724c1189
pop esi
lahf
ret 4
xor edx, dword [eax + 0x3b909090]
jno 0x40a30c
nop
add dword [edx - 0x74137481], ebp
jg 0x40a2cd
in al, dx
mov esi, dword [ecx + 0x2b]
jg 0x40a2cd
in al, dx
mov esi, dword [ecx + 0x2b]
or edi, dword [ebx + 0x41]
add al, 0x85
pop edi
jne 0x40a335
add dword [edx - 0x1700aef4], 0x6f
push esp
inc eax
rdpmc
rcr byte [esi + 0x5d], 0xc2
ret 4
cmp eax, 1
ror dword [ebx + ecx*4], 0x41
out 0x50, al
call [eax + 0x30]
rol byte [eax - 0x52], 0xeb
jae 0xe3b5a66d
xor eax, eax
pop esi
pop ebp
clc
add dh, byte [ebp - 0x1d]
mov ebp, dword [esi + 8]
enter 0x15ff, 0x34
rol byte [eax], 0x1e
sal byte [ebp + 0x44], 0x8b
xor eax, sym.imp.KERNEL32.dll_GetLastError
insb byte es:[edi], dx
salc
test eax, eax
je 0x40a358
push dword [eax]
xchg byte [eax + 0x5e000afc], al
pop ebp
ret 4
Function at 0x40a720
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x4125dc]
push esi
test eax, eax
push edi
dec edi
test ecx, ebp
add dword [eax], eax
add byte [eax - 8], ch
pop es
inc ecx
add byte [ebp + eax - 8], bh
pop es
inc ecx
add byte [eax + eax + 0x15ff828f], dl
and al, al
adc esp, dword [edx - 0x67f7f75f]
add byte [ebx - 0x7a06fd2e], al
cmp byte [ecx], al
push esi
add byte [esp + ecx + 8], bh
inc ecx
add byte [esi + 0x41080c], bh
cwde
sal byte [ecx + ecx - 0x75], 0x3d
push 0xbb0040f2
je 0x40a72d
inc eax
sahf
cmp dword [eax], 1
jle 0x40a781
xor ecx, ecx
xchg edi, eax
add al, 0x8a
push cs
push ecx
call edi
mov dl, 0xc4
or bl, ch
adc dword [ecx + sym.imp.MSVCRT.dll__pctype], esp
mov eax, dword [sym.imp.MSVCRT.dll__pctype]
xor esp, dword [edx - 0x76]
push ss
mov edi, dword [ecx - 0x1d]
add al, 0xbd
sti
loopne 0x40a796
test eax, eax
dec esp
mov al, byte ss:[esi + 1]
mov al, byte [esi + 1]
inc esi
test al, al
sti
std
mov ecx, dword [0x6108e0]
mov eax, dword [0x4185fc]
cmp eax, 0x59
jb 0x40b111
je 0x40a911
mov dh, 0xf8
add al, 0x75
or dword gs:[ecx], 0x4b
jae 0x40a841
mov eax, 0xa7000028
jmp 0x111a920
daa
add dword [edi], ecx
xchg ebp, eax
rol byte [ebx - 0x37167040], 0
add byte [eax], al
test eax, edi
test eax, 0x46b80a75
add byte [eax], al
add cl, ch
mov ecx, 0x83120000
stc
add dword [ebx + 0xa], esi
mov eax, 0x3c
jmp 0x40a916
mov eax, 0xff0001
test byte [edi], al
inc ebx
or byte [edi], 0x84
arpl word [ecx], ax
add byte [eax], al
je 0x40b0bf

Function at 0x411019
Capabilities:
Terminate process

Disassembly:
jmp 0x412960
jmp fcn.00413850
cmp ecx, dword [section..data]
jne 0x41296a
repz ret
jmp 0x4110aa
Function at 0x406624
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
lea eax, [ebp - 0x23c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x406648
xor eax, eax
test eax, eax
je 0x40665b
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x40665b
xor ecx, ecx
jmp 0x40665e
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x40a014]
lea eax, [ebp + eax*2 - 0x23c]
push ecx
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x23c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

Function at 0x406787
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x4698ec], 0
push esi
jne 0x4067be
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406798
mov dword [ecx*4 + 0x4698e8], eax
inc ecx
cmp ecx, 0x100
jl 0x406793
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x4067ef
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x4698e8]
xor eax, esi
inc ecx
dec edx
jne 0x4067d1
pop edi
not eax
pop esi
ret 0xc

Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x408f6c
mov ecx, 0x30c24666
nop
test eax, eax
nop
nop
nop
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x430024
nop
mov eax, section..data
nop
mov ebx, 0x42e3d0
mov ecx, 0x128e0763
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x430084
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
add eax, 4
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
nop
nop
popal
jmp 0x401219

Function at 0x959fd0
Capabilities:
Encode data using xor

Disassembly:
imul ebx, dword [esi], 0x92b50f8f
mov ch, 0x92
cmpsb byte [esi], byte es:[edi]
shr ecx, 0xd4
stosb byte es:[edi], al
stc
push ebp
insb byte es:[edi], dx
xor byte [edi + 0x2009182e], 0x65
xor ch, byte [ebp + 0x58]
imul edi, dword [ecx + edx*8 - 0x1b], 0x17
push ebp
aaa
pop eax
pop esi
mov eax, dword [edx + 0x4d990335]
mov ah, 0x75
push ss
jae 0x959fd4
dec ah
cmp eax, 0xa48cee3d
dec eax
stc
dec edx
invalid

Function at 0x1fcf000
Capabilities:
Decompress data using aplib

Disassembly:
jmp 0x1fcf00a
jmp 0x1fd100f
jmp fcn.01c65268
Function at 0x446881
Capabilities:
Encode data using xor

Disassembly:
mov bl, 0x94
mov dl, byte [ecx - 0x21]
clc
jb 0x44688c
pop ecx
invalid
les ebp, [ebx - 0x38024369]
bnd jecxz 0x4468be
movsd dword es:[edi], dword [esi]
and cl, dh
aad 0xd6
fsubr dword [eax]
ror byte [ecx + 0x6b965e6c], 1
insb byte es:[edi], dx
pop esi
xchg esi, eax
invalid
js 0x446869
jb 0x4468f0
clc
adc eax, 0xd1778bc6
mov esi, dword [edi - 0x2f]
or eax, edi
das
push edx
push cs
add byte [eax + 0x35], ch
mov bl, 6
mov esi, 0xb8131681
push ebx
pushfd
xor byte [edx + 0x13], dh
mov dh, 0x11
cmc
mov esp, 0xbab31356
movsb byte es:[edi], byte [esi]
jg 0x44686f
or dword [esi + 0x17], edx
add eax, 0x25dc0098
mov bh, 0x77
sbb al, 0x4d
scasb al, byte es:[edi]
salc
add byte [eax - 0x5d], bh
add al, 0x16
push es
fldcw word [eax + 0x1e3af4fc]
xchg ecx, eax
jne 0x446917
mov dword [0xd9061604], eax
test al, 0xfc
cld
hlt
xor dword [ebx + 0x736436e], ecx
push ds
adc byte [ecx - 0x14], 0x52
movsd dword es:[edi], dword [esi]
lcall 0x78d6, 0x5cf71029
dec edx
or eax, dword [esi - 0x53e5453b]
jbe 0x4468c4
scasb al, byte es:[edi]
xlatb
jp 0x44689f
std
mov al, byte [0x237ff28f]
bnd jg 0x446915
jg 0x446915
pop ebx
adc al, 0x3b
jg 0x44695e
pop es
adc dword [edx*2 + 0x6e773633], ebx
leave
add bl, 0x8b
loopne 0x4468f0
invalid
invalid
mov bh, 0xf2
ret 0xb4ba
dec dword [ebp - 0x14]
jne 0x4468ef
mov esp, ebp
pop ebp
ret 4

Function at 0x4bbca5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4c23b8
cmp edx, dword [eax]
je 0x4bbcc7
add eax, 8
inc ecx
cmp eax, 0x4c2448
jl 0x4bbcb8
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4c23b8]
jne 0x4bbdf5
mov eax, dword [0x4c7de4]
cmp eax, 1
je 0x4bbdcf
test eax, eax
jne 0x4bbcf8
cmp dword [0x4c22e4], 1
je 0x4bbdcf
cmp edx, 0xfc
je 0x4bbdf5
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4bbd2f
lea eax, [ebp - 0x1a4]
push 0x4c0508
push eax
call fcn.004bc690
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004bcb20
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4bbd72
lea eax, [ebp - 0x1a4]
push eax
call fcn.004bcb20
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4c0504
push edi
call fcn.004be9f0
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x4c04e8
push eax
call fcn.004bc690
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004bc6a0
lea eax, [ebp - 0xa0]
push 0x4c04e4
push eax
call fcn.004bc6a0
push dword [esi + 0x4c23bc]
lea eax, [ebp - 0xa0]
push eax
call fcn.004bc6a0
push 0x12010
lea eax, [ebp - 0xa0]
push 0x4c04bc
push eax
call fcn.004be964
add esp, 0x2c
pop edi
jmp 0x4bbdf5
lea eax, [ebp + 8]
lea esi, [esi + 0x4c23bc]
push 0
push eax
push dword [esi]
call fcn.004bcb20
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 0x4028d0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x42ac7c], 1
jne 0x4028de
call fcn.004062d0
mov eax, dword [esp + 4]
push eax
call fcn.00406310
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x402ea0
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.00402f60
mov eax, dword [0x42acc0]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x402ec4
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x42acbc], 1
mov byte [0x42acb8], bl
jne 0x402f1e
mov ecx, dword [0x42c388]
test ecx, ecx
je 0x402f0c
mov esi, dword [0x42c384]
sub esi, 4
cmp esi, ecx
jb 0x402f0c
mov eax, dword [esi]
test eax, eax
je 0x402f05
call eax
mov ecx, dword [0x42c388]
sub esi, 4
cmp esi, ecx
jae 0x402ef7
push 0x42508c
push 0x425084
call fcn.00402f80
add esp, 8
push 0x425098
push 0x425090
call fcn.00402f80
add esp, 8
test ebx, ebx
je 0x402f3d
call fcn.00402f70
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x42acc0], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x405350
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.004064f0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x425bd0], eax
je 0x4053a8
push 0x74
push 1
call fcn.00406f40
mov esi, eax
add esp, 8
test esi, esi
je 0x4053a8
mov eax, dword [0x425bd0]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4053a8
push esi
call fcn.004053b0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x4053d0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x425bd0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x40543e
push 0x74
push 1
call fcn.00406f40
mov esi, eax
add esp, 8
test esi, esi
je 0x405434
mov ecx, dword [0x425bd0]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x405434
push esi
call fcn.004053b0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.004028a0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x405e40
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x42b038]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x405e82
call edi
mov esi, eax
test esi, esi
je 0x405e6c
mov eax, 1
jmp 0x405e7d
call ebp
mov ebx, eax
test ebx, ebx
je 0x405f8f
mov eax, 2
mov dword [0x42b038], eax
cmp eax, 1
jne 0x405f22
test esi, esi
jne 0x405e9b
call edi
mov esi, eax
test esi, esi
je 0x405f8f
cmp word [esi], 0
mov eax, esi
je 0x405eb5
add eax, 2
cmp word [eax], 0
jne 0x405ea3
add eax, 2
cmp word [eax], 0
jne 0x405ea3
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x405f14
push edi
call fcn.00402aa0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x405f14
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x405f06
push ebx
call fcn.00402b70
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x405f8f
test ebx, ebx
jne 0x405f33
call ebp
mov ebx, eax
test ebx, ebx
je 0x405f8f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x405f4b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x405f3b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x405f3b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00402aa0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x405f6d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x406310
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x425c90
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x406334
add eax, 8
inc ebp
cmp eax, 0x425d20
jb 0x406325
cmp ecx, dword [ebp*8 + 0x425c90]
jne 0x4064db
mov eax, dword [0x42ac7c]
cmp eax, 1
je 0x40649d
test eax, eax
jne 0x406360
cmp dword [0x425884], 1
je 0x40649d
cmp ecx, 0xfc
je 0x4064db
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40639b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x4063e4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x4210fc
add ebx, ecx
push ebx
call fcn.00408de0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4210dc
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x425c94]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00408d50
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x42c280]
test eax, eax
je 0x4064ae
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x4064b8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x425c94]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x409140
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40916c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0x42c280]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x4091a7
push 2
push ebp
push ecx
call fcn.00409040
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x409309
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x409251
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x409202
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x4091ef
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x4091d2
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4092fa
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40924d
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x4091ce
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4092e9
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4092a5
cmp eax, 5
jne 0x40928e
call fcn.004041d0
mov dword [eax], 9
call fcn.004041e0
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00404150
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x4092c5
cmp byte [ebp], 0x1a
jne 0x4092c5
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.004041d0
mov dword [eax], 0x1c
call fcn.004041e0
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40924d
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40933a
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x409251
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x409251
Function at 0x40b720
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40b8de
push 0x3d
push edi
call fcn.004029d0
mov esi, eax
add esp, 8
test esi, esi
je 0x40b8de
cmp edi, esi
je 0x40b8de
mov dl, byte [esi + 1]
mov ecx, dword [0x42aca4]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x42aca0]
cmp eax, ecx
jne 0x40b777
push eax
call fcn.0040b9b0
add esp, 4
mov dword [0x42aca0], eax
test eax, eax
jne 0x40b7f2
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40b79e
mov eax, dword [0x42aca8]
test eax, eax
je 0x40b79e
call fcn.0040afc0
test eax, eax
je 0x40b7ed
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x40b7aa
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.00402aa0
add esp, 4
mov dword [0x42aca0], eax
test eax, eax
je 0x40b8de
mov dword [eax], 0
mov eax, dword [0x42aca8]
test eax, eax
jne 0x40b7ed
push 4
call fcn.00402aa0
add esp, 4
mov dword [0x42aca8], eax
test eax, eax
je 0x40b8de
mov dword [eax], 0
mov eax, dword [0x42aca0]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.0040b930
mov esi, eax
add esp, 8
test esi, esi
jl 0x40b8ef
cmp dword [ebx], 0
je 0x40b8ef
test ebp, ebp
je 0x40b8e7
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.00402b70
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x40b849
mov eax, edi
mov edx, dword [eax + 4]
add eax, 4
mov dword [edi], edx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x40b838
lea eax, [esi*4]
push eax
push ebx
call fcn.00405570
add esp, 8
test eax, eax
je 0x40b863
mov dword [0x42aca0], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40b8d6
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.00402aa0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40b8d6
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x10]
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
neg ebp
rep movsb byte es:[edi], byte [esi]
sbb ebp, ebp
mov byte [ebx + eax], 0
lea eax, [ebx + eax + 1]
not ebp
and ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.00402b70
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [ebx + esi*4], edi
jmp 0x40b867
test ebp, ebp
jne 0x40b8d6
test esi, esi
jge 0x40b8f9
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.00405570
add esp, 8
test eax, eax
je 0x40b8de
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x42aca0], eax
jmp 0x40b867