joyce8/EMBER2024-capa huggingface dataset:
Function at 0x652e1530
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0xe8
push ebx
push ebp
mov ebp, dword [esp + 0xfc]
push esi
push edi
mov ebx, eax
xor eax, eax
cmp ebx, 0x40
mov ecx, 0x10
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
mov ecx, 0x10
lea edi, [esp + 0x60]
rep stosd dword es:[edi], eax
jg 0x652e158e
mov ecx, ebx
mov eax, ecx
shr ecx, 2
mov esi, ebp
lea edi, [esp + 0x20]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
mov esi, ebp
lea edi, [esp + 0x60]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x652e15ef
lea eax, [esp + 0xa0]
push eax
call fcn.652e51c0
push ebx
lea ecx, [esp + 0xa8]
push ebp
push ecx
call fcn.652e5ad0
lea edx, [esp + 0xb0]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.652e5b90
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
add esp, 0x18
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], esi
xor eax, eax
mov cl, byte [esp + eax + 0x20]
mov bl, byte [esp + eax + 0x60]
xor cl, 0x36
xor bl, 0x5c
mov byte [esp + eax + 0x20], cl
mov byte [esp + eax + 0x60], bl
inc eax
cmp eax, 0x40
jl 0x652e15f1
lea ecx, [esp + 0xa0]
push ecx
call fcn.652e51c0
push 0x40
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0xac]
push eax
call fcn.652e5ad0
mov ecx, dword [esp + 0x110]
mov edx, dword [esp + 0x10c]
push ecx
push edx
lea eax, [esp + 0xb8]
push eax
call fcn.652e5ad0
mov esi, dword [esp + 0x124]
lea ecx, [esp + 0xbc]
push ecx
push esi
call fcn.652e5b90
lea edx, [esp + 0xc4]
push edx
call fcn.652e51c0
push 0x40
lea eax, [esp + 0x8c]
push eax
lea ecx, [esp + 0xd0]
push ecx
call fcn.652e5ad0
push 0x10
lea edx, [esp + 0xd8]
push esi
push edx
call fcn.652e5ad0
add esp, 0x40
lea eax, [esp + 0xa0]
push eax
push esi
call fcn.652e5b90
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe8
ret
Function at 0x652e4730
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x100
push esi
push edi
push str.WSOCK32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, 0x20
mov dword [ebx + 0x68], esi
jge 0x652e47b5
lea eax, [esp + 8]
push eax
push 0x1a1f
call fcn.652e7560
lea edi, [esp + 0x10]
add esp, 8
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x652e4764
mov ecx, dword [str.WSOCK32.DLL]
mov edx, dword [0x652f5f54]
mov eax, dword [0x652f5f58]
mov dword [edi], ecx
mov dword [edi + 4], edx
mov dword [edi + 8], eax
lea edi, [esp + 8]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x652e4790
mov cx, word [0x652f5f4c]
lea edx, [esp + 8]
push edx
mov word [edi], cx
call dword [ebx + 0x64]
pop edi
xor eax, eax
pop esi
add esp, 0x100
ret
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebp
push str.closesocket
push esi
xor ebp, ebp
call edi
test eax, eax
mov dword [ebx], eax
je 0x652e491a
push str.connect
push esi
call edi
test eax, eax
mov dword [ebx + 4], eax
je 0x652e491a
push str.listen
push esi
call edi
test eax, eax
mov dword [ebx + 8], eax
je 0x652e491a
push str.accept
push esi
call edi
test eax, eax
mov dword [ebx + 0xc], eax
je 0x652e491a
push str.bind
push esi
call edi
test eax, eax
mov dword [ebx + 0x10], eax
je 0x652e491a
push str.getsockopt
push esi
call edi
test eax, eax
mov dword [ebx + 0x18], eax
je 0x652e491a
push str.recv
push esi
call edi
test eax, eax
mov dword [ebx + 0x20], eax
je 0x652e491a
push str.send
push esi
call edi
test eax, eax
mov dword [ebx + 0x24], eax
je 0x652e491a
push str.setsockopt
push esi
call edi
test eax, eax
mov dword [ebx + 0x28], eax
je 0x652e491a
push str.socket
push esi
call edi
test eax, eax
mov dword [ebx + 0x2c], eax
je 0x652e491a
push str.getsockname
push esi
call edi
test eax, eax
mov dword [ebx + 0x14], eax
je 0x652e491a
push str.WSAGetLastError
push esi
call edi
test eax, eax
mov dword [ebx + 0x44], eax
je 0x652e491a
push str.WSACleanup
push esi
mov dword [ebx + 0x48], eax
call edi
test eax, eax
mov dword [ebx + 0x4c], eax
je 0x652e491a
push str.WSAStartup
push esi
call edi
test eax, eax
mov dword [ebx + 0x50], eax
je 0x652e491a
push str.gethostbyname
push esi
call edi
test eax, eax
mov dword [ebx + 0x34], eax
je 0x652e491a
push str.getprotobyname
push esi
call edi
test eax, eax
mov dword [ebx + 0x3c], eax
je 0x652e491a
push str.inet_addr
push esi
call edi
test eax, eax
mov dword [ebx + 0x38], eax
je 0x652e491a
push str.gethostname
push esi
call edi
test eax, eax
mov dword [ebx + 0x40], eax
je 0x652e491a
push str.htons
push esi
call edi
test eax, eax
mov dword [ebx + 0x1c], eax
je 0x652e491a
mov ebp, 1
mov eax, ebp
pop ebp
pop edi
pop esi
add esp, 0x100
ret
mov eax, dword [ebx + 0x64]
push 0x1a24
push eax
call fcn.652e5d50
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, ebp
pop ebp
pop edi
pop esi
add esp, 0x100
ret
Function at 0x652e51c0
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x10], ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret

Function at 0x652e6070
Capabilities:
Allocate thread local storage

Disassembly:
mov eax, dword [0x652fc394]
push edi
xor edi, edi
cmp eax, edi
jne 0x652e60a8
mov dword [0x652fc394], 1
call fcn.652e7cc0
push edi
mov dword [0x652fc384], edi
mov dword [0x652fc388], edi
mov dword [0x652fc38c], edi
call fcn.652e5eb0
add esp, 4
pop edi
ret
push esi
call fcn.652e7d00
mov esi, eax
cmp esi, edi
jne 0x652e60bf
push edi
call fcn.652e5eb0
add esp, 4
mov esi, eax
mov eax, dword [0x652fc388]
cmp eax, esi
jne 0x652e60d1
mov ecx, dword [0x652fc38c]
inc ecx
jmp 0x652e60eb
push esi
push 0x652fc384
call fcn.652e5dd0
mov eax, esi
add esp, 8
mov dword [0x652fc388], eax
mov ecx, 1
mov esi, dword [0x652fc394]
inc esi
dec ecx
mov dword [0x652fc394], esi
pop esi
mov dword [0x652fc38c], ecx
jne 0x652e6117
mov dword [0x652fc388], edi
push 0x652fc384
mov edi, eax
call fcn.652e5e40
add esp, 4
pop edi
ret
Function at 0x652e94e0
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
mov eax, str.Unknown_error
je 0x652e94f0
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 0x652e950d
push esi
call fcn.652ecfe0
add esp, 4
push 1
call fcn.652ecfaf
pop esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x652e9870
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, 0x652fb418
jmp 0x652e9890
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 0x652e98a6
mov ax, word [0x652f7c14]
mov word [edi], ax
mov eax, dword [esp + 0xe4]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x652e98c0
lea edi, [esp + 0x18]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x652e98d0
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 0x652e994a
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 0x652e994a
mov ecx, dword [esp + 0xf4]
cmp dword [esp + 0x14], ecx
je 0x652e9966
add ebx, 4
cmp ebx, 0x652fb420
jl 0x652e9890
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 0x652ebd95
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 0x652ebe82
mov eax, 0x94
call fcn.652f0860
mov esi, esp
push esi
mov dword [esi], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x652ebef7
mov ecx, dword [esi + 0x10]
mov dword [0x652fcd48], ecx
mov eax, dword [esi + 4]
mov dword [0x652fcd54], eax
mov edx, dword [esi + 8]
mov dword [0x652fcd58], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
cmp ecx, 2
mov dword [0x652fcd4c], esi
je 0x652ebe00
or esi, 0x8000
mov dword [0x652fcd4c], esi
shl eax, 8
add eax, edx
push 1
mov dword [0x652fcd50], eax
call fcn.652ef228
test eax, eax
pop ecx
je 0x652ebef7
call fcn.652edee1
test eax, eax
jne 0x652ebe2d
call fcn.652ef279
jmp 0x652ebef7
call fcn.652f0f99
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x652fe550], eax
call fcn.652f0e77
mov dword [0x652fcd08], eax
call fcn.652f0958
test eax, eax
jl 0x652ebe7b
call fcn.652f0dd5
test eax, eax
jl 0x652ebe76
call fcn.652f0ba2
test eax, eax
jl 0x652ebe76
call fcn.652ece77
test eax, eax
jne 0x652ebe76
inc dword [0x652fcd04]
jmp 0x652ebf08
call fcn.652f0b56
call fcn.652edcd4
jmp 0x652ebe23
test eax, eax
jne 0x652ebeb2
cmp dword [0x652fcd04], eax
jle 0x652ebef7
dec dword [0x652fcd04]
cmp dword [0x652fcd84], eax
jne 0x652ebea1
call fcn.652ecfd1
call fcn.652f0b56
call fcn.652edcd4
call fcn.652ef279
jmp 0x652ebf08
cmp eax, 2
jne 0x652ebefb
push 0x88
push 1
call fcn.652f089d
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x652ebef7
push esi
push dword [0x652fb864]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
push esi
je 0x652ebef1
call fcn.652edcf2
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
jmp 0x652ebf08
call fcn.652eb36d
pop ecx
xor eax, eax
jmp 0x652ebf0b
cmp eax, 3
jne 0x652ebf08
push 0
call fcn.652edd76
pop ecx
xor eax, eax
inc eax
lea esp, [ebp - 4]
pop esi
pop ebp
ret 0xc

Function at 0x652eca44
Capabilities:
Create thread
Resume thread

Disassembly:
push ebx
push edi
mov edi, dword [esp + 0xc]
xor ebx, ebx
test edi, edi
jne 0x652eca60
call fcn.652ed215
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x652ecad2
push esi
push 0x88
push 1
call fcn.652f089d
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x652ecab8
push esi
call fcn.652edcf2
mov eax, dword [esp + 0x1c]
pop ecx
push esi
push 4
push esi
push 0x652ec9a4
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 0x652ecab0
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x652ecacf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.652eb36d
test ebx, ebx
pop ecx
je 0x652ecaca
push ebx
call fcn.652ed227
pop ecx
or eax, 0xffffffff
jmp 0x652ecad1
mov eax, edi
pop esi
pop edi
pop ebx
ret
Function at 0x652ecedc
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 8
call fcn.652ef42a
xor esi, esi
inc esi
cmp dword [0x652fcd88], esi
pop ecx
jne 0x652ecf04
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 [0x652fcd84], esi
mov byte [0x652fcd80], al
jne 0x652ecf6a
mov ecx, dword [0x652fe548]
test ecx, ecx
je 0x652ecf4b
mov eax, dword [0x652fe544]
sub eax, 4
cmp eax, ecx
jmp 0x652ecf44
mov eax, dword [eax]
test eax, eax
je 0x652ecf36
call eax
mov eax, dword [0x652fe544]
sub eax, 4
cmp eax, dword [0x652fe548]
mov dword [0x652fe544], eax
jae 0x652ecf2e
mov eax, 0x652fa028
mov esi, 0x652fa030
cmp eax, esi
mov edi, eax
jae 0x652ecf6a
mov eax, dword [edi]
test eax, eax
je 0x652ecf63
call eax
add edi, 4
cmp edi, esi
jb 0x652ecf5b
mov eax, 0x652fa034
mov esi, 0x652fa038
cmp eax, esi
mov edi, eax
jae 0x652ecf89
mov eax, dword [edi]
test eax, eax
je 0x652ecf82
call eax
add edi, 4
cmp edi, esi
jb 0x652ecf7a
cmp dword [ebp + 0x10], 0
pop edi
pop esi
je 0x652ecf9a
push 8
call fcn.652ef396
jmp 0x652ecfac
push dword [ebp + 8]
mov dword [0x652fcd88], 1
call fcn.652ece35
pop ecx
pop ebp
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x652ed2f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.652ed227
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x652ed317
test byte [esp + 8], 2
je 0x652ed317
call fcn.652ed215
mov dword [eax], 0xd
call fcn.652ed21e
mov dword [eax], 5
jmp 0x652ed2f0
xor eax, eax
ret
Function at 0x652ed610
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x652fbd18]
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 0x652ed639
xor eax, eax
jmp 0x652ed7a7
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 + 0x652fe1e0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x652ed66c
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.652ed438
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x652ed73e
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x652ed779
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 0x652ed6c7
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x652ed6b8
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 0x652ed69b
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 0x652ed707
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x652ed710
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x652ed68c
jmp 0x652ed712
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x652ed7a2
cmp dword [ebp - 8], edi
je 0x652ed779
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x652ed76b
call fcn.652ed215
mov dword [eax], 9
call fcn.652ed21e
mov dword [eax], esi
jmp 0x652ed774
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 0x652ed760
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x652ed712
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x652ed712
push dword [ebp - 8]
call fcn.652ed227
pop ecx
or eax, 0xffffffff
jmp 0x652ed7a5
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x652ed78e
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x652ed78e
xor eax, eax
jmp 0x652ed7a5
call fcn.652ed215
mov dword [eax], 0x1c
call fcn.652ed21e
mov dword [eax], edi
jmp 0x652ed774
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.652f1a16
leave
ret
Function at 0x652f078e
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.652f0860
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x652f0823
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 [0x652fcd48]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x652f0823
cmp eax, 1
je 0x652f083b
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 0x652f0823
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x652f07f8
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x652f081f
xor eax, eax
inc eax
jmp 0x652f0857
cmp esi, ebx
jae 0x652f0827
xor eax, eax
jmp 0x652f0857
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x652fcd48]
jmp 0x652f083d
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 0x652f1027
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x652fbd18]
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 + 0x652fbb78]
je 0x652f1054
inc eax
cmp eax, 0x12
jb 0x652f1045
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x652fbb78]
jne 0x652f1188
mov eax, dword [0x652fcd10]
cmp eax, 1
je 0x652f1163
cmp eax, edx
jne 0x652f1084
cmp dword [0x652fcd14], 1
je 0x652f1163
cmp ecx, 0xfc
je 0x652f1188
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 0x652f10bd
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.652effd0
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.652f00d0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x652f10ff
lea eax, [ebp - 0x10c]
push eax
call fcn.652f00d0
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x652f8908
push edi
call fcn.652eac60
add esp, 0x10
push edi
call fcn.652f00d0
push dword [esi + 0x652fbb7c]
mov ebx, eax
call fcn.652f00d0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.652f0860
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.652effd0
push edi
push ebx
call fcn.652effe0
push 0x652f88e8
push ebx
call fcn.652effe0
push dword [esi + 0x652fbb7c]
push ebx
call fcn.652effe0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.652f2d94
add esp, 0x2c
jmp 0x652f1188
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x652fbb7c]
push dword [esi]
call fcn.652f00d0
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.652f1a16
pop edi
pop esi
pop ebx
leave
ret
Function at 0x652f2d94
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x652fd154], ebx
push esi
push edi
jne 0x652f2e14
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x652f2e4f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x652f8a5c
push edi
call esi
test eax, eax
mov dword [0x652fd154], eax
je 0x652f2e4f
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x652fd158], eax
call esi
cmp dword [0x652fcd48], 2
mov dword [0x652fd15c], eax
jne 0x652f2e14
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x652fd164], eax
je 0x652f2e14
push 0x652f8a04
push edi
call esi
mov dword [0x652fd160], eax
mov eax, dword [0x652fd160]
test eax, eax
je 0x652f2e59
call eax
test eax, eax
je 0x652f2e40
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x652fd164]
test eax, eax
je 0x652f2e40
test byte [ebp - 8], 1
jne 0x652f2e59
cmp dword [0x652fcd54], 4
jb 0x652f2e53
or byte [ebp + 0x12], 0x20
jmp 0x652f2e78
xor eax, eax
jmp 0x652f2e88
or byte [ebp + 0x12], 4
jmp 0x652f2e78
mov eax, dword [0x652fd158]
test eax, eax
je 0x652f2e78
call eax
mov ebx, eax
test ebx, ebx
je 0x652f2e78
mov eax, dword [0x652fd15c]
test eax, eax
je 0x652f2e78
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x652fd154]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x652f3582
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x652fbd18]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
je 0x652f35fd
push ebx
call fcn.652f354b
test eax, eax
pop ecx
jne 0x652f35cf
call fcn.652ed21e
mov dword [eax], 0xf
call fcn.652ed215
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop ebx
call fcn.652f1a16
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 0x652f360f
lea eax, [ebp - 0x10c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x652f35bf
inc eax
cmp eax, 0x104
ja 0x652f35bf
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x652f3647
cmp eax, dword [ebp + 0x10]
jg 0x652f362a
mov eax, dword [ebp + 0x10]
push eax
call fcn.652ec17c
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x652f365c
call fcn.652ed215
mov dword [eax], 0xc
jmp 0x652f35bf
cmp eax, dword [ebp + 0x10]
jle 0x652f365c
call fcn.652ed215
mov dword [eax], 0x22
jmp 0x652f35bf
lea eax, [ebp - 0x10c]
push eax
push ecx
call fcn.652effd0
pop ecx
pop ecx
jmp 0x652f35c1