joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001ff89
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1001ffa9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.100224b9
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x1001ffcc
test byte [esp + 8], 2
je 0x1001ffcc
call fcn.100224a7
mov dword [eax], 0xd
call fcn.100224b0
mov dword [eax], 5
jmp 0x1001ffa5
xor eax, eax
ret

Function at 0x100211b0
Capabilities:
Accept command line arguments
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
cmp eax, 1
push esi
jne 0x1002129d
mov eax, 0x94
call fcn.1001f4b0
mov esi, esp
push esi
mov dword [esi], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x10021312
mov ecx, dword [esi + 0x10]
mov dword [0x1005ef04], ecx
mov eax, dword [esi + 4]
mov dword [0x1005ef10], eax
mov edx, dword [esi + 8]
mov dword [0x1005ef14], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
cmp ecx, 2
mov dword [0x1005ef08], esi
je 0x1002121b
or esi, 0x8000
mov dword [0x1005ef08], esi
shl eax, 8
add eax, edx
push 1
mov dword [0x1005ef0c], eax
call fcn.100231e9
test eax, eax
pop ecx
je 0x10021312
call fcn.10025b33
test eax, eax
jne 0x10021248
call fcn.1002323a
jmp 0x10021312
call fcn.10027c63
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x1005f714], eax
call fcn.10027b41
mov dword [0x1005eef0], eax
call fcn.1002618d
test eax, eax
jl 0x10021296
call fcn.10027a9f
test eax, eax
jl 0x10021291
call fcn.1002786c
test eax, eax
jl 0x10021291
call fcn.10022907
test eax, eax
jne 0x10021291
inc dword [0x1005eeec]
jmp 0x10021323
call fcn.1002638b
call fcn.10025926
jmp 0x1002123e
test eax, eax
jne 0x100212cd
cmp dword [0x1005eeec], eax
jle 0x10021312
dec dword [0x1005eeec]
cmp dword [0x1005ef40], eax
jne 0x100212bc
call fcn.10022a50
call fcn.1002638b
call fcn.10025926
call fcn.1002323a
jmp 0x10021323
cmp eax, 2
jne 0x10021316
push 0x88
push 1
call fcn.100263d7
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x10021312
push esi
push dword [0x1005e0e4]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
push esi
je 0x1002130c
call fcn.10025944
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
jmp 0x10021323
call fcn.1001f958
pop ecx
xor eax, eax
jmp 0x10021326
cmp eax, 3
jne 0x10021323
push 0
call fcn.100259c8
pop ecx
xor eax, eax
inc eax
lea esp, [ebp - 4]
pop esi
pop ebp
ret 0xc
Function at 0x10021fdf
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x100221a5
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x1005f5e0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x100221a5
test cl, 0x48
je 0x10022045
mov al, byte [eax + 5]
cmp al, 0xa
je 0x10022045
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10022097
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x1002207f
call fcn.100224a7
mov dword [eax], 9
call fcn.100224b0
mov dword [eax], esi
jmp 0x1002208f
cmp eax, 0x6d
je 0x100221a5
push eax
call fcn.100224b9
pop ecx
or eax, 0xffffffff
jmp 0x100221a7
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x100221a0
test edx, edx
je 0x100220ba
cmp byte [ebx], 0xa
jne 0x100220ba
or al, 4
jmp 0x100220bc
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x1002219a
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x1002218a
cmp al, 0xd
je 0x100220f0
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x1002217c
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x1002210a
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x10022105
add dword [ebp + 0x10], 2
jmp 0x1002215e
mov dword [ebp + 0x10], eax
jmp 0x10022178
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10022132
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10022178
cmp dword [ebp - 0xc], 0
je 0x10022178
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x10022153
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x1002215e
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x1002217b
cmp ebx, dword [ebp + 0xc]
jne 0x10022163
cmp byte [ebp - 1], 0xa
jne 0x10022163
mov byte [ebx], 0xa
jmp 0x1002217b
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1002774d
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x1002217c
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x100220d4
jmp 0x1002219a
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x1002219a
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x100221a7
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10022257
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x1005dde0]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x10022280
xor eax, eax
jmp 0x100223ee
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x1005f5e0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x100222b3
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.10021902
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x10022385
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x100223c0
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x1002230e
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x100222ff
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x100222e2
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1002234e
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x10022357
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x100222d3
jmp 0x10022359
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x100223e9
cmp dword [ebp - 8], edi
je 0x100223c0
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x100223b2
call fcn.100224a7
mov dword [eax], 9
call fcn.100224b0
mov dword [eax], esi
jmp 0x100223bb
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100223a7
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x10022359
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x10022359
push dword [ebp - 8]
call fcn.100224b9
pop ecx
or eax, 0xffffffff
jmp 0x100223ec
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x100223d5
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x100223d5
xor eax, eax
jmp 0x100223ec
call fcn.100224a7
mov dword [eax], 0x1c
call fcn.100224b0
mov dword [eax], edi
jmp 0x100223bb
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.10022e4e
leave
ret
Function at 0x1002296c
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 8
call fcn.1002319e
xor esi, esi
inc esi
cmp dword [0x1005ef44], esi
pop ecx
jne 0x10022994
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x1005ef40], esi
mov byte [0x1005ef3c], al
jne 0x100229fa
mov ecx, dword [0x1005f70c]
test ecx, ecx
je 0x100229db
mov eax, dword [0x1005f708]
sub eax, 4
cmp eax, ecx
jmp 0x100229d4
mov eax, dword [eax]
test eax, eax
je 0x100229c6
call eax
mov eax, dword [0x1005f708]
sub eax, 4
cmp eax, dword [0x1005f70c]
mov dword [0x1005f708], eax
jae 0x100229be
mov eax, 0x10037118
mov esi, 0x10037120
cmp eax, esi
mov edi, eax
jae 0x100229fa
mov eax, dword [edi]
test eax, eax
je 0x100229f3
call eax
add edi, 4
cmp edi, esi
jb 0x100229eb
mov eax, 0x10037124
mov esi, 0x1003712c
cmp eax, esi
mov edi, eax
jae 0x10022a19
mov eax, dword [edi]
test eax, eax
je 0x10022a12
call eax
add edi, 4
cmp edi, esi
jb 0x10022a0a
cmp dword [ebp + 0x10], 0
pop edi
pop esi
je 0x10022a2a
push 8
call fcn.1002310a
jmp 0x10022a3c
push dword [ebp + 8]
mov dword [0x1005ef44], 1
call fcn.100228c5
pop ecx
pop ebp
ret
Function at 0x10027ceb
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x1005dde0]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x1005e140]
je 0x10027d18
inc eax
cmp eax, 0x12
jb 0x10027d09
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x1005e140]
jne 0x10027e4c
mov eax, dword [0x1005eef8]
cmp eax, 1
je 0x10027e27
cmp eax, edx
jne 0x10027d48
cmp dword [0x1005eefc], 1
je 0x10027e27
cmp ecx, 0xfc
je 0x10027e4c
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10027d81
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.10025c20
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.10024800
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x10027dc3
lea eax, [ebp - 0x10c]
push eax
call fcn.10024800
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x10034ac4
push edi
call fcn.100207a0
add esp, 0x10
push edi
call fcn.10024800
push dword [esi + 0x1005e144]
mov ebx, eax
call fcn.10024800
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.1001f4b0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.10025c20
push edi
push ebx
call fcn.10025c30
push 0x100317d8
push ebx
call fcn.10025c30
push dword [esi + 0x1005e144]
push ebx
call fcn.10025c30
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.1002a69e
add esp, 0x2c
jmp 0x10027e4c
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x1005e144]
push dword [esi]
call fcn.10024800
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]
lea esp, [ebp - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.10022e4e
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10028511
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.1001f4b0
mov eax, dword [0x1005dde0]
xor eax, dword [ebp + 4]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.1002774d
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x1002863b
push 2
push esi
push dword [ebp + 8]
call fcn.1002774d
add esp, 0xc
cmp eax, ebx
je 0x1002863b
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x100285de
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x100c]
push esi
push eax
call fcn.10022e60
push 0x8000
push dword [ebp + 8]
call fcn.1002a902
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp edi, ebx
mov eax, ebx
jge 0x10028597
mov eax, edi
push eax
lea eax, [ebp - 0x100c]
push eax
push dword [ebp + 8]
call fcn.10022257
add esp, 0xc
cmp eax, 0xffffffff
je 0x100285b7
sub edi, eax
test edi, edi
jg 0x1002858f
jmp 0x100285cf
call fcn.100224b0
cmp dword [eax], 5
jne 0x100285cc
call fcn.100224a7
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.1002a902
pop ecx
pop ecx
jmp 0x10028626
jge 0x10028626
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.1002774d
push dword [ebp + 8]
call fcn.10021dbc
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x10028626
call fcn.100224a7
mov dword [eax], 0xd
call fcn.100224b0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.1002774d
add esp, 0xc
mov eax, esi
pop edi
jmp 0x1002863d
mov eax, ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.10022e4e
leave
ret
Function at 0x10029804
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 8], ebx
je 0x1002986f
push 0x3d
push dword [ebp + 8]
call fcn.1002abbd
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
je 0x1002986f
cmp dword [ebp + 8], esi
je 0x1002986f
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [ebp - 4], eax
mov eax, dword [0x1005ef24]
cmp eax, dword [0x1005ef28]
jne 0x10029855
mov edi, eax
call fcn.100297a3
mov dword [0x1005ef24], eax
cmp eax, ebx
jne 0x100298ae
cmp dword [ebp + 0xc], ebx
je 0x10029877
cmp dword [0x1005ef2c], ebx
je 0x10029877
call fcn.10025d66
test eax, eax
je 0x100298ae
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
jne 0x100299b2
push 4
call fcn.1001f767
cmp eax, ebx
pop ecx
mov dword [0x1005ef24], eax
je 0x1002986f
mov dword [eax], ebx
cmp dword [0x1005ef2c], ebx
jne 0x100298ae
push 4
call fcn.1001f767
cmp eax, ebx
pop ecx
mov dword [0x1005ef2c], eax
je 0x1002986f
mov dword [eax], ebx
mov ebx, dword [0x1005ef24]
mov edi, esi
mov esi, dword [ebp + 8]
sub edi, esi
push esi
call fcn.10029756
mov edi, eax
test edi, edi
pop ecx
jl 0x10029907
cmp dword [ebx], 0
je 0x10029907
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.1001f958
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x100298ef
mov eax, dword [ebp + 8]
mov dword [esi], eax
jmp 0x1002993d
mov ecx, dword [esi + 4]
mov dword [esi], ecx
inc edi
add esi, 4
cmp dword [esi], eax
jne 0x100298e6
mov eax, edi
shl eax, 2
push eax
push ebx
call fcn.1001f9c9
test eax, eax
pop ecx
pop ecx
je 0x1002993d
jmp 0x10029938
cmp dword [ebp - 4], 0
jne 0x100299ab
test edi, edi
jge 0x10029917
neg edi
lea eax, [edi*4 + 8]
push eax
push ebx
call fcn.1001f9c9
test eax, eax
pop ecx
pop ecx
je 0x1002986f
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov dword [0x1005ef24], eax
cmp dword [ebp + 0xc], 0
je 0x10029994
push dword [ebp + 8]
call fcn.10024800
inc eax
inc eax
push eax
call fcn.1001f767
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x10029994
push dword [ebp + 8]
push esi
call fcn.10025c20
mov eax, esi
sub eax, dword [ebp + 8]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
and byte [eax], 0
mov ecx, dword [ebp - 4]
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x1002998d
or dword [ebp - 8], 0xffffffff
push esi
call fcn.1001f958
pop ecx
cmp dword [ebp - 4], 0
je 0x100299a3
push dword [ebp + 8]
call fcn.1001f958
pop ecx
mov eax, dword [ebp - 8]
jmp 0x10029872
push esi
call fcn.1001f958
pop ecx
xor eax, eax
jmp 0x10029872
Function at 0x10029bd1
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.1001f4b0
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10029c66
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x1005ef04]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x10029c66
cmp eax, 1
je 0x10029c7e
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10029c66
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x10029c3b
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x10029c62
xor eax, eax
inc eax
jmp 0x10029c9a
cmp esi, ebx
jae 0x10029c6a
xor eax, eax
jmp 0x10029c9a
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x1005ef04]
jmp 0x10029c80
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1002a69e
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x1005f278], ebx
push esi
push edi
jne 0x1002a71e
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x1002a759
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10034eac
push edi
call esi
test eax, eax
mov dword [0x1005f278], eax
je 0x1002a759
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x1005f27c], eax
call esi
cmp dword [0x1005ef04], 2
mov dword [0x1005f280], eax
jne 0x1002a71e
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x1005f288], eax
je 0x1002a71e
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x1005f284], eax
mov eax, dword [0x1005f284]
test eax, eax
je 0x1002a763
call eax
test eax, eax
je 0x1002a74a
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x1005f288]
test eax, eax
je 0x1002a74a
test byte [ebp - 8], 1
jne 0x1002a763
cmp dword [0x1005ef10], 4
jb 0x1002a75d
or byte [ebp + 0x12], 0x20
jmp 0x1002a782
xor eax, eax
jmp 0x1002a792
or byte [ebp + 0x12], 4
jmp 0x1002a782
mov eax, dword [0x1005f27c]
test eax, eax
je 0x1002a782
call eax
mov ebx, eax
test ebx, ebx
je 0x1002a782
mov eax, dword [0x1005f280]
test eax, eax
je 0x1002a782
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x1005f278]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1002a7ce
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x1005dde0]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
je 0x1002a849
push ebx
call fcn.1002a797
test eax, eax
pop ecx
jne 0x1002a81b
call fcn.100224b0
mov dword [eax], 0xf
call fcn.100224a7
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop ebx
call fcn.10022e4e
leave
ret
and byte [ebp + 0xb], 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10c]
push eax
push 0x104
lea eax, [ebp + 8]
add bl, 0x40
push eax
mov byte [ebp + 8], bl
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x2e
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x1002a85b
lea eax, [ebp - 0x10c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x1002a80b
inc eax
cmp eax, 0x104
ja 0x1002a80b
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x1002a893
cmp eax, dword [ebp + 0x10]
jg 0x1002a876
mov eax, dword [ebp + 0x10]
push eax
call fcn.1001f767
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x1002a8a8
call fcn.100224a7
mov dword [eax], 0xc
jmp 0x1002a80b
cmp eax, dword [ebp + 0x10]
jle 0x1002a8a8
call fcn.100224a7
mov dword [eax], 0x22
jmp 0x1002a80b
lea eax, [ebp - 0x10c]
push eax
push ecx
call fcn.10025c20
pop ecx
pop ecx
jmp 0x1002a80d
Function at 0x401271
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x1c
push esi
push ecx
pop esi
sub ecx, ecx
mov edx, dword [esi + 0x3c]
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
add edx, esi
mov dword [eax], ecx
mov eax, 0x14c
push edi
push ecx
pop edi
cmp word [edx + 4], ax
jne 0x4013b8
push ebx
mov ebx, dword [edx + 0x88]
mov dword [ebp - 0x14], ebx
or ebx, ebx
je 0x4013b7
cmp dword [edx + 0x8c], ecx
je 0x4013b7
movzx eax, word [edx + 0x14]
add eax, 0x18
add eax, edx
movzx edx, word [edx + 6]
or edx, edx
je 0x4013b7
cmp dword [eax + 0xc], ebx
je 0x4012e2
inc ecx
add eax, 0x28
cmp ecx, edx
jb 0x4012d0
jmp 0x4013b7
mov edx, dword [eax + 0x14]
add edx, esi
push 0
movzx ecx, word [edx + 0xe]
movzx eax, word [edx + 0xc]
add ecx, eax
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x1c], ecx
pop ebx
je 0x4013b7
xor eax, eax
mov esi, dword [edx + eax*8 + 0x14]
and esi, 0x7fffffff
add esi, edx
push 0
movzx ecx, word [esi + 0xe]
movzx eax, word [esi + 0xc]
add ecx, eax
mov dword [ebp - 0x18], ecx
pop ecx
mov dword [ebp - 0xc], ecx
je 0x4013aa
xor eax, eax
cmp word [esi + eax*8 + 0x10], 0x65
jne 0x40139a
mov ecx, dword [esi + eax*8 + 0x14]
and ecx, 0x7fffffff
add ecx, edx
mov dword [ebp - 8], 0
movzx eax, word [ecx + 0xe]
mov dword [ebp - 4], eax
movzx eax, word [ecx + 0xc]
add dword [ebp - 4], eax
je 0x401393
sub eax, eax
mov edx, 0x409
cmp word [ecx + eax*8 + 0x10], dx
mov edx, dword [ebp - 0x10]
je 0x401376
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
movzx eax, ax
cmp eax, dword [ebp - 4]
jb 0x401356
jmp 0x401393
mov ecx, dword [ecx + eax*8 + 0x14]
mov edi, dword [ebp + 0xc]
mov eax, dword [ecx + edx]
sub eax, dword [ebp - 0x14]
add eax, edx
mov dword [edi], eax
mov eax, dword [ecx + edx + 4]
mov ecx, dword [ebp + 0x10]
sub edi, edi
mov dword [ecx], eax
inc edi
or edi, edi
jne 0x4013b7
mov ecx, dword [ebp - 0xc]
inc ecx
movzx eax, cx
mov dword [ebp - 0xc], ecx
cmp eax, dword [ebp - 0x18]
jb 0x401329
or edi, edi
jne 0x4013b7
inc ebx
movzx eax, bx
cmp eax, dword [ebp - 0x1c]
jb 0x401302
pop ebx
mov eax, edi
pop edi
pop esi
leave
ret 0xc

Function at 0x4013c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push esp
pop ebp
push ebx
push esi
push edi
mov edi, edx
mov ebx, edi
shr ebx, 2
and edi, 3
mov esi, ecx
test ebx, ebx
je 0x4013f3
mov al, byte [ebp + 0xc]
mov edx, dword [esi]
add al, bl
movzx ecx, al
mov eax, dword [ebp + 8]
ror edx, cl
xor edx, eax
sub edx, ebx
mov dword [esi], edx
add esi, 4
dec ebx
jne 0x4013d6
jmp 0x4013f6
mov eax, dword [ebp + 8]
test edi, edi
je 0x401400
xor byte [esi], al
inc esi
dec edi
jne 0x4013fa
pop edi
pop esi
pop ebx
pop ebp
ret 0xc

Function at 0x401407
Capabilities:
Terminate process

Disassembly:
push ebx
mov eax, 0x506f7
mov ebx, 0x12345678
mov ecx, 0x12345678
mov edx, 0x12345678
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [section..data], eax
jmp loc.0047950e