joyce8/EMBER2024-capa huggingface dataset:
Function at 0x652e2a70
Capabilities:
Allocate thread local storage

Disassembly:
mov eax, dword [0x652f9014]
push edi
xor edi, edi
cmp eax, edi
jne 0x652e2aa8
mov dword [0x652f9014], 1
call fcn.652e4770
push edi
mov dword [0x652f9004], edi
mov dword [0x652f9008], edi
mov dword [0x652f900c], edi
call fcn.652e28b0
add esp, 4
pop edi
ret
push esi
call fcn.652e47b0
mov esi, eax
cmp esi, edi
jne 0x652e2abf
push edi
call fcn.652e28b0
add esp, 4
mov esi, eax
mov eax, dword [0x652f9008]
cmp eax, esi
jne 0x652e2ad1
mov ecx, dword [0x652f900c]
inc ecx
jmp 0x652e2aeb
push esi
push 0x652f9004
call fcn.652e27d0
mov eax, esi
add esp, 8
mov dword [0x652f9008], eax
mov ecx, 1
mov esi, dword [0x652f9014]
inc esi
dec ecx
mov dword [0x652f9014], esi
pop esi
mov dword [0x652f900c], ecx
jne 0x652e2b17
mov dword [0x652f9008], edi
push 0x652f9004
mov edi, eax
call fcn.652e2840
add esp, 4
pop edi
ret
Function at 0x652e5f10
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
mov eax, str.Unknown_error
je 0x652e5f20
mov eax, esi
push 0
push str.SQLAnywhere_Fatal_Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
test esi, esi
je 0x652e5f3d
push esi
call fcn.652e7d16
add esp, 4
push 1
call fcn.652e9c6f
pop esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x652e6120
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xd0
push ebx
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push esi
push edi
mov ebx, 0x652f80c8
jmp 0x652e6140
mov ecx, 0xa
mov esi, str.SoftwareSybaseAdaptive_Server_Anywhere
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x652e6156
mov ax, word [0x652f3f68]
mov word [edi], ax
mov eax, dword [esp + 0xe4]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x652e6170
lea edi, [esp + 0x18]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x652e6180
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebx]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x24]
push edx
push eax
call ebp
test eax, eax
jne 0x652e61fa
mov edx, dword [esp + 0xec]
lea ecx, [esp + 0xf0]
push ecx
mov ecx, dword [esp + 0xec]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x652e61fa
mov ecx, dword [esp + 0xf4]
cmp dword [esp + 0x14], ecx
je 0x652e6216
add ebx, 4
cmp ebx, 0x652f80d0
jl 0x652e6140
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd0
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xd0
ret
Function at 0x652e79d6
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 0x652e7ac3
mov eax, 0x94
call fcn.652ec590
mov esi, esp
push esi
mov dword [esi], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x652e7b38
mov ecx, dword [esi + 0x10]
mov dword [0x652f98a0], ecx
mov eax, dword [esi + 4]
mov dword [0x652f98ac], eax
mov edx, dword [esi + 8]
mov dword [0x652f98b0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
cmp ecx, 2
mov dword [0x652f98a4], esi
je 0x652e7a41
or esi, 0x8000
mov dword [0x652f98a4], esi
shl eax, 8
add eax, edx
push 1
mov dword [0x652f98a8], eax
call fcn.652ec4bc
test eax, eax
pop ecx
je 0x652e7b38
call fcn.652eac2f
test eax, eax
jne 0x652e7a6e
call fcn.652ec50d
jmp 0x652e7b38
call fcn.652ec41a
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x652fb0b0], eax
call fcn.652ec2f8
mov dword [0x652f9884], eax
call fcn.652ebdd9
test eax, eax
jl 0x652e7abc
call fcn.652ec256
test eax, eax
jl 0x652e7ab7
call fcn.652ec023
test eax, eax
jl 0x652e7ab7
call fcn.652e9b37
test eax, eax
jne 0x652e7ab7
inc dword [0x652f9880]
jmp 0x652e7b49
call fcn.652ebfd7
call fcn.652eaa22
jmp 0x652e7a64
test eax, eax
jne 0x652e7af3
cmp dword [0x652f9880], eax
jle 0x652e7b38
dec dword [0x652f9880]
cmp dword [0x652f98dc], eax
jne 0x652e7ae2
call fcn.652e9c91
call fcn.652ebfd7
call fcn.652eaa22
call fcn.652ec50d
jmp 0x652e7b49
cmp eax, 2
jne 0x652e7b3c
push 0x88
push 1
call fcn.652ebd1e
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x652e7b38
push esi
push dword [0x652f82b8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
push esi
je 0x652e7b32
call fcn.652eaa40
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
jmp 0x652e7b49
call fcn.652e909d
pop ecx
xor eax, eax
jmp 0x652e7b4c
cmp eax, 3
jne 0x652e7b49
push 0
call fcn.652eaac4
pop ecx
xor eax, eax
inc eax
lea esp, [ebp - 4]
pop esi
pop ebp
ret 0xc

Function at 0x652e7ead
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x652e7ecd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.652e744a
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x652e7ef0
test byte [esp + 8], 2
je 0x652e7ef0
call fcn.652e7438
mov dword [eax], 0xd
call fcn.652e7441
mov dword [eax], 5
jmp 0x652e7ec9
xor eax, eax
ret
Function at 0x652e86ee
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 0x652e88b4
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x652fad60]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x652e88b4
test cl, 0x48
je 0x652e8754
mov al, byte [eax + 5]
cmp al, 0xa
je 0x652e8754
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 0x652e87a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x652e878e
call fcn.652e7438
mov dword [eax], 9
call fcn.652e7441
mov dword [eax], esi
jmp 0x652e879e
cmp eax, 0x6d
je 0x652e88b4
push eax
call fcn.652e744a
pop ecx
or eax, 0xffffffff
jmp 0x652e88b6
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 0x652e88af
test edx, edx
je 0x652e87c9
cmp byte [ebx], 0xa
jne 0x652e87c9
or al, 4
jmp 0x652e87cb
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 0x652e88a9
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x652e8899
cmp al, 0xd
je 0x652e87ff
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x652e888b
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x652e8819
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x652e8814
add dword [ebp + 0x10], 2
jmp 0x652e886d
mov dword [ebp + 0x10], eax
jmp 0x652e8887
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 0x652e8841
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x652e8887
cmp dword [ebp - 0xc], 0
je 0x652e8887
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x652e8862
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x652e886d
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x652e888a
cmp ebx, dword [ebp + 0xc]
jne 0x652e8872
cmp byte [ebp - 1], 0xa
jne 0x652e8872
mov byte [ebx], 0xa
jmp 0x652e888a
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.652ed0dc
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x652e888b
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x652e87e3
jmp 0x652e88a9
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x652e88a9
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x652e88b6
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x652e8995
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x652f89c8]
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 0x652e89be
xor eax, eax
jmp 0x652e8b2c
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 + 0x652fad60]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x652e89f1
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.652e8011
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x652e8ac3
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x652e8afe
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 0x652e8a4c
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x652e8a3d
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 0x652e8a20
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 0x652e8a8c
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x652e8a95
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x652e8a11
jmp 0x652e8a97
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x652e8b27
cmp dword [ebp - 8], edi
je 0x652e8afe
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x652e8af0
call fcn.652e7438
mov dword [eax], 9
call fcn.652e7441
mov dword [eax], esi
jmp 0x652e8af9
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 0x652e8ae5
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x652e8a97
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x652e8a97
push dword [ebp - 8]
call fcn.652e744a
pop ecx
or eax, 0xffffffff
jmp 0x652e8b2a
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x652e8b13
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x652e8b13
xor eax, eax
jmp 0x652e8b2a
call fcn.652e7438
mov dword [eax], 0x1c
call fcn.652e7441
mov dword [eax], edi
jmp 0x652e8af9
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.652ed2c7
leave
ret
Function at 0x652e97c4
Capabilities:
Create thread
Resume thread

Disassembly:
push ebx
push edi
mov edi, dword [esp + 0xc]
xor ebx, ebx
test edi, edi
jne 0x652e97e0
call fcn.652e7438
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x652e9852
push esi
push 0x88
push 1
call fcn.652ebd1e
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x652e9838
push esi
call fcn.652eaa40
mov eax, dword [esp + 0x1c]
pop ecx
push esi
push 4
push esi
push 0x652e9724
push dword [esp + 0x24]
mov dword [esi + 0x4c], edi
push 0
mov dword [esi + 0x50], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
test edi, edi
mov dword [esi + 4], edi
je 0x652e9830
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x652e984f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.652e909d
test ebx, ebx
pop ecx
je 0x652e984a
push ebx
call fcn.652e744a
pop ecx
or eax, 0xffffffff
jmp 0x652e9851
mov eax, edi
pop esi
pop edi
pop ebx
ret

Function at 0x652e9b9c
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 8
call fcn.652ebbc6
xor esi, esi
inc esi
cmp dword [0x652f98e0], esi
pop ecx
jne 0x652e9bc4
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 [0x652f98dc], esi
mov byte [0x652f98d8], al
jne 0x652e9c2a
mov ecx, dword [0x652fb0a8]
test ecx, ecx
je 0x652e9c0b
mov eax, dword [0x652fb0a4]
sub eax, 4
cmp eax, ecx
jmp 0x652e9c04
mov eax, dword [eax]
test eax, eax
je 0x652e9bf6
call eax
mov eax, dword [0x652fb0a4]
sub eax, 4
cmp eax, dword [0x652fb0a8]
mov dword [0x652fb0a4], eax
jae 0x652e9bee
mov eax, 0x652f7028
mov esi, 0x652f7030
cmp eax, esi
mov edi, eax
jae 0x652e9c2a
mov eax, dword [edi]
test eax, eax
je 0x652e9c23
call eax
add edi, 4
cmp edi, esi
jb 0x652e9c1b
mov eax, 0x652f7034
mov esi, 0x652f7038
cmp eax, esi
mov edi, eax
jae 0x652e9c49
mov eax, dword [edi]
test eax, eax
je 0x652e9c42
call eax
add edi, 4
cmp edi, esi
jb 0x652e9c3a
cmp dword [ebp + 0x10], 0
pop edi
pop esi
je 0x652e9c5a
push 8
call fcn.652ebb32
jmp 0x652e9c6c
push dword [ebp + 8]
mov dword [0x652f98e0], 1
call fcn.652e9af5
pop ecx
pop ebp
ret
Function at 0x652ec5d3
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x652f89c8]
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 + 0x652f86a0]
je 0x652ec600
inc eax
cmp eax, 0x12
jb 0x652ec5f1
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x652f86a0]
jne 0x652ec734
mov eax, dword [0x652f988c]
cmp eax, 1
je 0x652ec70f
cmp eax, edx
jne 0x652ec630
cmp dword [0x652f9890], 1
je 0x652ec70f
cmp ecx, 0xfc
je 0x652ec734
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 0x652ec669
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.652ee4e0
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.652eb950
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x652ec6ab
lea eax, [ebp - 0x10c]
push eax
call fcn.652eb950
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x652f4708
push edi
call fcn.652e8ec0
add esp, 0x10
push edi
call fcn.652eb950
push dword [esi + 0x652f86a4]
mov ebx, eax
call fcn.652eb950
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.652ec590
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.652ee4e0
push edi
push ebx
call fcn.652ee4f0
push 0x652f46e8
push ebx
call fcn.652ee4f0
push dword [esi + 0x652f86a4]
push ebx
call fcn.652ee4f0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.652efa70
add esp, 0x2c
jmp 0x652ec734
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x652f86a4]
push dword [esi]
call fcn.652eb950
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.652ed2c7
pop edi
pop esi
pop ebx
leave
ret
Function at 0x652ecfa1
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.652ec590
mov eax, dword [0x652f89c8]
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.652ed0dc
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x652ed0cb
push 2
push esi
push dword [ebp + 8]
call fcn.652ed0dc
add esp, 0xc
cmp eax, ebx
je 0x652ed0cb
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x652ed06e
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x100c]
push esi
push eax
call fcn.652ee930
push 0x8000
push dword [ebp + 8]
call fcn.652f0968
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp edi, ebx
mov eax, ebx
jge 0x652ed027
mov eax, edi
push eax
lea eax, [ebp - 0x100c]
push eax
push dword [ebp + 8]
call fcn.652e8995
add esp, 0xc
cmp eax, 0xffffffff
je 0x652ed047
sub edi, eax
test edi, edi
jg 0x652ed01f
jmp 0x652ed05f
call fcn.652e7441
cmp dword [eax], 5
jne 0x652ed05c
call fcn.652e7438
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.652f0968
pop ecx
pop ecx
jmp 0x652ed0b6
jge 0x652ed0b6
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.652ed0dc
push dword [ebp + 8]
call fcn.652e84cb
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 0x652ed0b6
call fcn.652e7438
mov dword [eax], 0xd
call fcn.652e7441
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.652ed0dc
add esp, 0xc
mov eax, esi
pop edi
jmp 0x652ed0cd
mov eax, ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.652ed2c7
leave
ret
Function at 0x652eeba8
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.652ec590
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x652eec3d
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 [0x652f98a0]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x652eec3d
cmp eax, 1
je 0x652eec55
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 0x652eec3d
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x652eec12
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x652eec39
xor eax, eax
inc eax
jmp 0x652eec71
cmp esi, ebx
jae 0x652eec41
xor eax, eax
jmp 0x652eec71
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x652f98a0]
jmp 0x652eec57
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 0x652ef7da
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 0x652ef845
push 0x3d
push dword [ebp + 8]
call fcn.652f0e2c
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
je 0x652ef845
cmp dword [ebp + 8], esi
je 0x652ef845
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [ebp - 4], eax
mov eax, dword [0x652f98c0]
cmp eax, dword [0x652f98c4]
jne 0x652ef82b
mov edi, eax
call fcn.652ef779
mov dword [0x652f98c0], eax
cmp eax, ebx
jne 0x652ef884
cmp dword [ebp + 0xc], ebx
je 0x652ef84d
cmp dword [0x652f98c8], ebx
je 0x652ef84d
call fcn.652eba29
test eax, eax
je 0x652ef884
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
jne 0x652ef988
push 4
call fcn.652e908b
cmp eax, ebx
pop ecx
mov dword [0x652f98c0], eax
je 0x652ef845
mov dword [eax], ebx
cmp dword [0x652f98c8], ebx
jne 0x652ef884
push 4
call fcn.652e908b
cmp eax, ebx
pop ecx
mov dword [0x652f98c8], eax
je 0x652ef845
mov dword [eax], ebx
mov ebx, dword [0x652f98c0]
mov edi, esi
mov esi, dword [ebp + 8]
sub edi, esi
push esi
call fcn.652ef72c
mov edi, eax
test edi, edi
pop ecx
jl 0x652ef8dd
cmp dword [ebx], 0
je 0x652ef8dd
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.652e909d
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x652ef8c5
mov eax, dword [ebp + 8]
mov dword [esi], eax
jmp 0x652ef913
mov ecx, dword [esi + 4]
mov dword [esi], ecx
inc edi
add esi, 4
cmp dword [esi], eax
jne 0x652ef8bc
mov eax, edi
shl eax, 2
push eax
push ebx
call fcn.652e910e
test eax, eax
pop ecx
pop ecx
je 0x652ef913
jmp 0x652ef90e
cmp dword [ebp - 4], 0
jne 0x652ef981
test edi, edi
jge 0x652ef8ed
neg edi
lea eax, [edi*4 + 8]
push eax
push ebx
call fcn.652e910e
test eax, eax
pop ecx
pop ecx
je 0x652ef845
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov dword [0x652f98c0], eax
cmp dword [ebp + 0xc], 0
je 0x652ef96a
push dword [ebp + 8]
call fcn.652eb950
inc eax
inc eax
push eax
call fcn.652e908b
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x652ef96a
push dword [ebp + 8]
push esi
call fcn.652ee4e0
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 0x652ef963
or dword [ebp - 8], 0xffffffff
push esi
call fcn.652e909d
pop ecx
cmp dword [ebp - 4], 0
je 0x652ef979
push dword [ebp + 8]
call fcn.652e909d
pop ecx
mov eax, dword [ebp - 8]
jmp 0x652ef848
push esi
call fcn.652e909d
pop ecx
xor eax, eax
jmp 0x652ef848
Function at 0x652efa70
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x652f9bf0], ebx
push esi
push edi
jne 0x652efaf0
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x652efb2b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x652f4db0
push edi
call esi
test eax, eax
mov dword [0x652f9bf0], eax
je 0x652efb2b
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x652f9bf4], eax
call esi
cmp dword [0x652f98a0], 2
mov dword [0x652f9bf8], eax
jne 0x652efaf0
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x652f9c00], eax
je 0x652efaf0
push 0x652f4d58
push edi
call esi
mov dword [0x652f9bfc], eax
mov eax, dword [0x652f9bfc]
test eax, eax
je 0x652efb35
call eax
test eax, eax
je 0x652efb1c
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x652f9c00]
test eax, eax
je 0x652efb1c
test byte [ebp - 8], 1
jne 0x652efb35
cmp dword [0x652f98ac], 4
jb 0x652efb2f
or byte [ebp + 0x12], 0x20
jmp 0x652efb54
xor eax, eax
jmp 0x652efb64
or byte [ebp + 0x12], 4
jmp 0x652efb54
mov eax, dword [0x652f9bf4]
test eax, eax
je 0x652efb54
call eax
mov ebx, eax
test ebx, ebx
je 0x652efb54
mov eax, dword [0x652f9bf8]
test eax, eax
je 0x652efb54
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x652f9bf0]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x652f0ba1
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x652f89c8]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
je 0x652f0c1c
push ebx
call fcn.652f0b6a
test eax, eax
pop ecx
jne 0x652f0bee
call fcn.652e7441
mov dword [eax], 0xf
call fcn.652e7438
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop ebx
call fcn.652ed2c7
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 0x652f0c2e
lea eax, [ebp - 0x10c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x652f0bde
inc eax
cmp eax, 0x104
ja 0x652f0bde
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x652f0c66
cmp eax, dword [ebp + 0x10]
jg 0x652f0c49
mov eax, dword [ebp + 0x10]
push eax
call fcn.652e908b
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x652f0c7b
call fcn.652e7438
mov dword [eax], 0xc
jmp 0x652f0bde
cmp eax, dword [ebp + 0x10]
jle 0x652f0c7b
call fcn.652e7438
mov dword [eax], 0x22
jmp 0x652f0bde
lea eax, [ebp - 0x10c]
push eax
push ecx
call fcn.652ee4e0
pop ecx
pop ecx
jmp 0x652f0be0