joyce8/EMBER2024-capa huggingface dataset:
Function at 0x659a20
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x184
push ebx
push esi
xor esi, esi
mov ebx, ecx
cmp ebx, esi
push edi
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], 0x104
jne 0x659a55
mov eax, 0x325
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, 0x64
lea ecx, [esp + 0x20]
call fcn.006515e0
cmp esi, 0xff
jae 0x659b3d
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x88]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x9c]
push edx
push esi
push ebx
mov dword [esp + 0x30], 0x105
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
inc esi
cmp eax, 0x103
je 0x659b3d
test eax, eax
jne 0x659a63
mov eax, dword [esp + 0x10]
test eax, eax
je 0x659a63
movsx eax, byte [esp + 0x88]
push eax
call fcn.006988e7
add esp, 4
test eax, eax
je 0x659a63
lea ecx, [esp + 0xc]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x94]
push edx
push ebx
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x659a63
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x659a63
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0x14]
push edi
push eax
lea edx, [esp + 0x28]
call fcn.00658d20
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0xc]
push edi
call fcn.00659940
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x659a63
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x659b50
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x11c
push ebx
push esi
xor esi, esi
mov ebx, ecx
cmp ebx, esi
push edi
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], esi
jne 0x659b80
mov eax, 0x325
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp esi, 0xff
jae 0x659c1d
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
push esi
push ebx
mov dword [esp + 0x30], 0x105
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
inc esi
cmp eax, 0x103
je 0x659c1d
test eax, eax
jne 0x659b80
mov eax, dword [esp + 0x10]
test eax, eax
je 0x659b80
lea eax, [esp + 0xc]
push eax
push 0x20019
push 0
lea ecx, [esp + 0x2c]
push ecx
push ebx
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x659b80
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x659b80
mov edx, dword [ebp + 8]
push edx
mov edx, dword [esp + 0x18]
call fcn.00659a20
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x659b80
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x659c30
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1f0
push ebx
push ebp
push esi
push edi
mov ebp, edx
xor esi, esi
mov ebx, ecx
cmp ebx, esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], 0x104
je 0x659dcb
cmp ebp, 0xa
jl 0x659dcb
mov ecx, ebp
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, 0x64
lea ecx, [esp + 0x90]
call fcn.0064eb20
mov edx, 0x64
lea ecx, [esp + 0x28]
call fcn.006515e0
lea eax, [esp + 0x14]
push eax
push 0x20019
push esi
lea ecx, [esp + 0x9c]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x659dbe
mov eax, dword [esp + 0x14]
test eax, eax
je 0x659dbe
lea ebx, [ebx]
cmp esi, 0xff
jae 0x659da9
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0xf8]
rep stosd dword es:[edi], eax
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x18]
push 0
push 0
push 0
stosw word es:[edi], ax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x10c]
push ecx
push esi
push edx
mov dword [esp + 0x3c], 0x105
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
inc esi
cmp eax, 0x103
je 0x659da9
test eax, eax
jne 0x659cd0
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x659cd0
movsx eax, byte [esp + 0xf8]
push eax
call fcn.006988e7
add esp, 4
test eax, eax
je 0x659cd0
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x104]
push edx
push eax
mov dword [esp + 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x659cd0
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x659cd0
push ebp
push ebx
lea edx, [esp + 0x30]
call fcn.00658d20
mov ecx, dword [esp + 0x18]
push ebp
mov edx, ebx
call fcn.00659b50
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x659cd0
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x338
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, 0x325
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x660476
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 closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x6604cc
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0x6ba3e6
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x6604bf
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x6604ce
xor eax, eax
pop esi
leave
ret 4

Function at 0x662d90
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x58], ecx
ret
Function at 0x677d50
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x5c], ecx
ret
Function at 0x697e71
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x7ee77c], esi
push edi
jne 0x697e91
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 [0x7ee778], esi
mov byte [0x7ee774], al
jne 0x697ef7
mov ecx, dword [0x7f062c]
test ecx, ecx
je 0x697ed8
mov eax, dword [0x7f0628]
sub eax, 4
cmp eax, ecx
jmp 0x697ed1
mov eax, dword [eax]
test eax, eax
je 0x697ec3
call eax
mov eax, dword [0x7f0628]
sub eax, 4
cmp eax, dword [0x7f062c]
mov dword [0x7f0628], eax
jae 0x697ebb
mov eax, 0x6e92c8
mov esi, 0x6e92d4
cmp eax, esi
mov edi, eax
jae 0x697ef7
mov eax, dword [edi]
test eax, eax
je 0x697ef0
call eax
add edi, 4
cmp edi, esi
jb 0x697ee8
mov eax, 0x6e92d8
mov esi, 0x6e92e0
cmp eax, esi
mov edi, eax
jae 0x697f16
mov eax, dword [edi]
test eax, eax
je 0x697f0f
call eax
add edi, 4
cmp edi, esi
jb 0x697f07
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x697f30
push dword [ebp + 8]
mov dword [0x7ee77c], 1
call fcn.00697dd7
pop ebp
ret

Function at 0x69c5f0
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x6fb3d0]
mov ecx, dword [ebp + 0x98]
push ebx
xor eax, ebp
push esi
mov dword [ebp + 0x8c], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x6fb3e8]
je 0x69c627
inc eax
cmp eax, 0x13
jb 0x69c618
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x6fb3e8]
jne 0x69c74a
mov eax, dword [0x7ee728]
cmp eax, 1
je 0x69c725
cmp eax, edx
jne 0x69c657
cmp dword [0x6fb0e4], 1
je 0x69c725
cmp ecx, 0xfc
je 0x69c74a
push 0x104
lea eax, [ebp - 0x7c]
push eax
push edx
mov byte [ebp + 0x88], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x69c68d
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.0069e500
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.0069b0d0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x69c6c1
mov eax, edi
push eax
call fcn.0069b0d0
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x6e369c
push edi
call fcn.006985c0
add esp, 0x10
push edi
call fcn.0069b0d0
push dword [esi + 0x6fb3ec]
mov ebx, eax
call fcn.0069b0d0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00697340
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0069e500
push edi
push ebx
call fcn.0069e510
push 0x6bcb6c
push ebx
call fcn.0069e510
push dword [esi + 0x6fb3ec]
push ebx
call fcn.0069e510
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.006a025b
add esp, 0x2c
jmp 0x69c74a
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x6fb3ec]
push dword [esi]
call fcn.0069b0d0
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 - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x8c]
xor ecx, ebp
call fcn.0069b21c
add ebp, 0x90
leave
ret
Function at 0x69e6d6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x7ef4c0]
push edi
jae 0x69e8ad
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x7ef4e0]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x69e8ad
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x69e781
test dl, 2
jne 0x69e781
test dl, 0x48
je 0x69e74b
cmp byte [eax + 5], 0xa
je 0x69e74b
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x69e794
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x69e77c
mov dword [0x7ee734], ecx
jmp 0x69e8b4
cmp eax, 0x6d
jne 0x69e788
xor eax, eax
jmp 0x69e8c1
push eax
call fcn.0069faeb
pop ecx
jmp 0x69e8be
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x69e8a8
test eax, eax
je 0x69e7bb
cmp byte [ebx], 0xa
jne 0x69e7bb
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x69e7c4
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x69e8a2
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x69e892
cmp al, 0xd
je 0x69e7f6
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x69e884
dec ecx
cmp dword [ebp - 8], ecx
jae 0x69e810
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x69e80b
add dword [ebp - 8], 2
jmp 0x69e864
mov dword [ebp - 8], eax
jmp 0x69e880
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
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 0x69e838
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x69e880
cmp dword [ebp - 0x10], 0
je 0x69e880
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x69e859
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x69e864
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x69e883
cmp ebx, dword [ebp + 0xc]
jne 0x69e869
cmp byte [ebp - 1], 0xa
jne 0x69e869
mov byte [ebx], 0xa
jmp 0x69e883
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.006a1119
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x69e884
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x69e7da
jmp 0x69e8a2
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x69e8a2
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x69e8c1
and dword [0x7ee734], 0
mov dword [0x7ee730], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x69e8c6
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a4]
sub esp, 0x424
mov eax, dword [0x6fb3d0]
mov ecx, dword [ebp + 0x3ac]
push ebx
push esi
xor eax, ebp
cmp ecx, dword [0x7ef4c0]
push edi
mov edi, dword [ebp + 0x3b0]
mov dword [ebp + 0x3a0], eax
mov dword [ebp - 0x78], edi
jae 0x69ea68
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x7ef4e0]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x69ea68
and dword [ebp - 0x70], 0
and dword [ebp - 0x7c], 0
cmp dword [ebp + 0x3b4], 0
jne 0x69e93c
xor eax, eax
jmp 0x69ea7c
test al, 0x20
je 0x69e94f
push 2
push 0
push 0
push ecx
call fcn.006a1119
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x69e9e4
and dword [ebp - 0x68], 0
cmp dword [ebp + 0x3b4], 0
mov dword [ebp - 0x6c], edi
jbe 0x69ea45
mov ecx, dword [ebp - 0x6c]
xor edi, edi
sub ecx, dword [ebp - 0x78]
lea eax, [ebp - 0x64]
cmp ecx, dword [ebp + 0x3b4]
jae 0x69e9a9
mov edx, dword [ebp - 0x6c]
inc dword [ebp - 0x6c]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x69e99a
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x69e97c
mov edi, eax
lea eax, [ebp - 0x64]
sub edi, eax
push 0
lea eax, [ebp - 0x74]
push eax
push edi
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x69ea09
mov eax, dword [ebp - 0x74]
add dword [ebp - 0x70], eax
cmp eax, edi
jl 0x69ea12
mov eax, dword [ebp - 0x6c]
sub eax, dword [ebp - 0x78]
cmp eax, dword [ebp + 0x3b4]
jb 0x69e971
jmp 0x69ea12
push 0
lea ecx, [ebp - 0x74]
push ecx
push dword [ebp + 0x3b4]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x69ea09
mov eax, dword [ebp - 0x74]
and dword [ebp - 0x68], 0
mov dword [ebp - 0x70], eax
jmp 0x69ea12
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x70]
test eax, eax
jne 0x69ea63
cmp dword [ebp - 0x68], eax
je 0x69ea42
push 5
pop eax
cmp dword [ebp - 0x68], eax
jne 0x69ea37
mov dword [0x7ee730], 9
mov dword [0x7ee734], eax
jmp 0x69ea79
push dword [ebp - 0x68]
call fcn.0069faeb
pop ecx
jmp 0x69ea79
mov edi, dword [ebp - 0x78]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x69ea57
cmp byte [edi], 0x1a
je 0x69e935
mov dword [0x7ee730], 0x1c
jmp 0x69ea72
sub eax, dword [ebp - 0x7c]
jmp 0x69ea7c
mov dword [0x7ee730], 9
and dword [0x7ee734], 0
or eax, 0xffffffff
mov ecx, dword [ebp + 0x3a0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0069b21c
add ebp, 0x3a4
leave
ret
Function at 0x69eb77
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x69eba5
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x69ebac
cmp ebx, dword [eax + 4]
jae 0x69ebac
xor eax, eax
jmp 0x69ed9c
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x69ebbd
xor eax, eax
inc eax
jmp 0x69ed9b
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x69ebd3
cmp ecx, edx
jae 0x69ed18
cmp dword [eax + 4], 0
je 0x69ebdc
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x69ebc4
cmp dword [ebp + 8], 0
je 0x69ebfe
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x69ed18
cmp eax, esi
jae 0x69ed18
mov eax, dword [0x7eea10]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x69ec23
cmp dword [esi*4 + 0x7eea18], edi
je 0x69ed1c
inc esi
cmp esi, eax
jl 0x69ec11
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x69ed98
cmp dword [ebp - 8], 0x1000000
jne 0x69ed98
test byte [ebp - 0xc], 0xcc
je 0x69eca1
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x69ed98
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x69ed98
cmp word [eax + 0x18], 0x10b
jne 0x69ed98
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x69ed98
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x69eca1
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x69eca1
test byte [ecx + 0x27], 0x80
jne 0x69ed18
push 1
push 0x7eea58
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x69ebb5
mov ecx, dword [0x7eea10]
test ecx, ecx
mov edx, ecx
jle 0x69ecd5
lea eax, [ecx*4 + 0x7eea14]
cmp dword [eax], edi
je 0x69ecd5
dec edx
sub eax, 4
test edx, edx
jg 0x69ecc9
test edx, edx
jne 0x69ed06
push 0xf
pop ebx
cmp ecx, ebx
jg 0x69ece2
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x69ecfa
lea eax, [edx*4 + 0x7eea18]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x69ece8
cmp ecx, 0x10
jge 0x69ed06
inc ecx
mov dword [0x7eea10], ecx
push 0
push 0x7eea58
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x69ebb5
xor eax, eax
jmp 0x69ed9b
test esi, esi
jle 0x69ebb5
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x7eea58
call ebx
test eax, eax
jne 0x69ebb5
cmp dword [esi*4 + 0x7eea18], edi
je 0x69ed72
mov eax, dword [0x7eea10]
lea esi, [eax - 1]
test esi, esi
jl 0x69ed60
cmp dword [esi*4 + 0x7eea18], edi
je 0x69ed5c
dec esi
jns 0x69ed50
test esi, esi
jge 0x69ed70
cmp eax, 0x10
jge 0x69ed6b
inc eax
mov dword [0x7eea10], eax
lea esi, [eax - 1]
jmp 0x69ed72
je 0x69ed8a
xor ecx, ecx
test esi, esi
jl 0x69ed8a
lea eax, [ecx*4 + 0x7eea18]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x69ed78
push 0
push 0x7eea58
call ebx
jmp 0x69ebb5
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x69f764
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x69f77d
or eax, 0xffffffff
jmp 0x69f7de
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 8], esi
je 0x69f7da
push 0x3d
push esi
call fcn.006a11e3
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x69f7da
cmp esi, eax
je 0x69f7da
xor ecx, ecx
cmp byte [eax + 1], cl
mov eax, dword [0x7ee75c]
sete cl
cmp eax, dword [0x7ee760]
mov dword [ebp - 4], ecx
jne 0x69f7c0
mov edi, eax
call fcn.0069f703
mov dword [0x7ee75c], eax
cmp eax, ebx
jne 0x69f819
cmp dword [ebp + 0xc], ebx
je 0x69f7e2
cmp dword [0x7ee764], ebx
je 0x69f7e2
call fcn.0069b15b
test eax, eax
je 0x69f819
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
je 0x69f7eb
xor eax, eax
jmp 0x69f7dd
push 4
call fcn.006972ba
cmp eax, ebx
pop ecx
mov dword [0x7ee75c], eax
je 0x69f7da
mov dword [eax], ebx
cmp dword [0x7ee764], ebx
jne 0x69f819
push 4
call fcn.006972ba
cmp eax, ebx
pop ecx
mov dword [0x7ee764], eax
je 0x69f7da
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
mov ebx, dword [0x7ee75c]
sub edi, esi
push esi
call fcn.0069f6b6
mov edi, eax
test edi, edi
pop ecx
jl 0x69f880
cmp dword [ebx], 0
je 0x69f880
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.00697210
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x69f860
mov ecx, dword [ebp - 8]
mov dword [esi], ecx
mov ecx, dword [ebp + 8]
mov esi, dword [ebp - 8]
mov dword [ecx], eax
jmp 0x69f8c1
mov ecx, dword [esi + 4]
inc edi
mov dword [esi], ecx
lea esi, [ebx + edi*4]
cmp dword [esi], eax
jne 0x69f857
mov eax, edi
shl eax, 2
push eax
push dword [0x7ee75c]
call fcn.00698ba3
test eax, eax
mov esi, dword [ebp - 8]
pop ecx
pop ecx
je 0x69f8c1
jmp 0x69f8bc
cmp dword [ebp - 4], 0
jne 0x69f928
test edi, edi
jge 0x69f890
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x7ee75c]
call fcn.00698ba3
test eax, eax
pop ecx
pop ecx
je 0x69f7da
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov ecx, dword [ebp + 8]
and dword [ecx], 0
mov dword [0x7ee75c], eax
cmp dword [ebp + 0xc], 0
je 0x69f913
push esi
call fcn.0069b0d0
inc eax
inc eax
push eax
call fcn.006972ba
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x69f913
push esi
push edi
call fcn.0069e500
mov eax, edi
sub eax, esi
add eax, dword [ebp - 0xc]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov byte [eax], 0
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x69f90c
or dword [ebp - 0x10], 0xffffffff
push edi
call fcn.00697210
pop ecx
cmp dword [ebp - 4], 0
je 0x69f920
push esi
call fcn.00697210
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x69f7dd
push esi
call fcn.00697210
mov eax, dword [ebp + 8]
and dword [eax], 0
pop ecx
jmp 0x69f7e7