joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404290
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x4042ba
cmp dword [ebp - 4], 3
ja 0x4042dd
add esp, 0xfffffffc
push dword [ebp - 4]
call sub.KERNEL32.dll_GetLastError
push eax
push 0x40426a
call fcn.004086f0
add esp, 0xfffffff4
push 0x404277
call fcn.00403aec
mov eax, dword [ebp - 8]
leave
ret

Function at 0x4042fc
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push 2
lea eax, [ebp - 6]
push eax
push dword [ebp + 8]
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x404326
cmp dword [ebp - 4], 1
ja 0x404346
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x4041f4
call fcn.004086f0
add esp, 0xfffffff4
push 0x4042e2
call fcn.00403aec
movsx eax, word [ebp - 6]
leave
ret

Function at 0x404368
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
mov ebx, dword [ebp + 8]
add esp, 0xfffffff4
push ebx
call fcn.00404290
mov esi, eax
add esp, 0xfffffff4
lea eax, [esi + 1]
push eax
call fcn.00417534
mov edi, eax
mov byte [esi + edi], 0
add esp, 0x20
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push esi
push edi
push ebx
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x4043b1
cmp dword [ebp - 4], esi
jae 0x4043be
add esp, 0xfffffff4
push 0x40434c
call fcn.00403aec
mov eax, edi
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x4043e4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
add esp, 0xfffffff4
mov eax, dword [ebp + 8]
push eax
call fcn.00404290
mov esi, eax
add esp, 0xfffffff4
shr eax, 0x1f
lea ebx, [eax + esi]
sar ebx, 1
lea eax, [ebx*2 + 2]
push eax
call fcn.00417534
mov edi, eax
mov word [edi + ebx*2], 0
add esp, 0x20
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push esi
push edi
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x40443e
cmp dword [ebp - 4], esi
jae 0x40444b
add esp, 0xfffffff4
push 0x4043c8
call fcn.00403aec
mov eax, edi
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x404a78
Capabilities:
Create directory
Delete directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2014
call fcn.00417744
push ebx
add esp, 0xfffffffc
push dword [ebp + 8]
push 0x404a65
lea ebx, [ebp - 0x2000]
push ebx
call sub.msvcrt.dll_sprintf
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll__rmdir
add esp, 0x20
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll__mkdir
add esp, 0x10
test eax, eax
jne 0x404ae1
add esp, 0xfffffff4
push ebx
call fcn.00404464
add esp, 0x10
test al, al
je 0x404ad8
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll__rmdir
mov al, 1
jmp 0x404ae3
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll__rmdir
mov al, 0
mov ebx, dword [ebp - 0x2018]
leave
ret
Function at 0x404b94
Capabilities:
Create directory
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x400c
call fcn.00417744
push edi
push esi
push ebx
mov esi, dword [ebp + 8]
add esp, 0xfffffff8
push esi
push 0x2000
call sub.KERNEL32.dll_GetTempPathA
mov ebx, eax
add esp, 0xfffffff4
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push ebx
push 0x404b00
call fcn.004086f0
mov edi, esi
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
add esp, 0x28
cmp ecx, 0xfffffffe
jne 0x404c3c
add esp, 0xfffffffc
push 0x2000
push esi
push 0x404b28
call sub.KERNEL32.dll_GetEnvironmentVariableA
mov edi, esi
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx + 0x1fff]
push eax
mov edi, esi
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [esi + ecx - 1]
push eax
push 0x404b32
call sub.KERNEL32.dll_GetEnvironmentVariableA
add esp, 0xfffffffc
push esi
push 0x404b40
call fcn.004086f0
add esp, 0x10
jmp 0x404c5a
test ebx, ebx
jle 0x404c5a
add esp, 0xfffffff8
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll__mkdir
push eax
push 0x404b63
call fcn.004086f0
add esp, 0x20
add esp, 0xfffffffc
push 0x2000
lea ebx, [ebp - 0x2000]
push ebx
push esi
mov eax, dword [0x422020]
call eax
add esp, 0xfffffffc
push 0x3f
push ebx
call sub.msvcrt.dll_strchr
add esp, 0x10
test eax, eax
je 0x404d7c
add esp, 0xfffffff8
push 0x2000
lea ebx, [ebp - 0x4000]
push ebx
call sub.KERNEL32.dll_GetWindowsDirectoryA
add esp, 0xfffffff4
push ebx
push 0x404b78
push esi
call sub.msvcrt.dll_sprintf
add esp, 0x20
add esp, 0xfffffff4
push esi
call fcn.00404a78
add esp, 0x10
test al, al
jne 0x404d7c
mov eax, dword [0x404b80]
mov dword [esi], eax
mov eax, dword [0x404b84]
mov dword [esi + 4], eax
add esp, 0xfffffff4
push esi
call fcn.00404a78
add esp, 0x10
test al, al
jne 0x404d7c
mov edi, 0x404b88
mov eax, dword [0x404b88]
mov dword [esi], eax
movzx eax, word [edi + 4]
mov word [esi + 4], ax
mov al, byte [edi + 6]
mov byte [esi + 6], al
add esp, 0xfffffff4
push esi
call fcn.00404a78
add esp, 0x10
test al, al
jne 0x404d7c
add esp, 0xfffffff8
push ebx
push esi
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff4
push esi
call fcn.00404a78
add esp, 0x20
test al, al
jne 0x404d7c
mov eax, dword [0x404b8f]
mov dword [esi], eax
add esp, 0xfffffff4
push esi
call fcn.00404a78
add esp, 0x10
test al, al
je 0x404d6d
mov eax, dword [0x404b88]
mov dword [esi], eax
movzx eax, word [edi + 4]
mov word [esi + 4], ax
mov al, byte [edi + 6]
mov byte [esi + 6], al
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll__mkdir
add esp, 0xfffffff4
push esi
call fcn.00404a78
add esp, 0x20
test al, al
jne 0x404d7c
add esp, 0xfffffff8
push 0
push 0x3f7
call fcn.00403b40
lea esp, [ebp - 0x4018]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x404de0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2010
call fcn.00417744
push esi
push ebx
mov esi, dword [ebp + 8]
add esp, 0xfffffff4
lea ebx, [ebp - 0x2000]
push ebx
call fcn.00404b94
add esp, 0xfffffff8
push ebx
push 0x404d87
call fcn.004086f0
add esp, 0x20
push esi
push 0
push 0x404d96
push ebx
call sub.KERNEL32.dll_GetTempFileNameA
test eax, eax
jne 0x404e62
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x404da0
call fcn.004086f0
add esp, 0xfffffff4
add esp, 0xfffffff4
push 0
call sub.msvcrt.dll_time
push eax
call sub.msvcrt.dll_srand
add esp, 0x30
call sub.msvcrt.dll_rand
push eax
push ebx
push 0x404dc7
push esi
call sub.msvcrt.dll_sprintf
add esp, 0x10
add esp, 0xfffffff8
push esi
push 0x404dcf
call fcn.004086f0
lea esp, [ebp - 0x2018]
pop ebx
pop esi
leave
ret
Function at 0x407b4c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
push esi
push ebx
mov esi, 0x422030
mov edi, dword [0x422030]
jmp 0x407bbd
mov ebx, dword [esi]
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea edi, [ecx - 1]
add esp, 0xfffffff4
push ecx
call fcn.00417534
xor edx, edx
add esp, 0x10
cmp edx, edi
jge 0x407b9a
lea esi, [esi]
mov cl, byte [edx + ebx]
xor cl, 0xbb
mov byte [edx + eax], cl
inc edx
cmp edx, edi
jl 0x407b8c
mov byte [edi + eax], 0
add esp, 0xfffffffc
push edi
push eax
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_strncmp
add esp, 0x10
test eax, eax
jne 0x407bb8
mov al, 1
jmp 0x407bce
add esi, 4
mov edi, dword [esi]
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
cmp ecx, 0xfffffffe
jne 0x407b64
mov al, 0
lea esp, [ebp - 0x18]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x4083ac
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x4083d9
mov ecx, eax
mov eax, dword [esi]
mov dl, al
xor dl, byte [ebx]
movzx edx, dl
shr eax, 8
xor eax, dword [edx*4 + 0x42204c]
mov dword [esi], eax
inc ebx
dec ecx
jne 0x4083c0
pop ebx
pop esi
leave
ret
Function at 0x4084d4
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x401c
call fcn.00417744
push edi
push esi
push ebx
mov eax, dword [0x422854]
test eax, eax
je 0x40850c
cmp dword [0x422850], 0
jne 0x40850c
add esp, 0xfffffff8
push 0x40847b
push eax
call sub.msvcrt.dll_fopen
mov dword [0x422850], eax
add esp, 0x10
cmp byte [0x42284c], 0
jne 0x40865c
mov byte [0x42284c], 1
mov al, byte [0x42287e]
mov byte [ebp - 0x4005], al
add esp, 0xfffffffc
push 0x2000
lea ebx, [ebp - 0x2000]
push ebx
push 0x40847d
call sub.KERNEL32.dll_GetEnvironmentVariableA
add esp, 4
test eax, eax
je 0x408565
mov esi, ebx
mov edi, 0x408487
mov ecx, 4
cld
test al, 0
repe cmpsb byte [esi], byte es:[edi]
jne 0x408565
mov byte [ebp - 0x4005], 1
add esp, 0xfffffffc
push 0x2000
push ebx
push 0x40848b
call sub.KERNEL32.dll_GetEnvironmentVariableA
add esp, 4
test eax, eax
je 0x408599
mov esi, ebx
mov edi, 0x408487
mov ecx, 4
cld
test al, 0
repe cmpsb byte [esi], byte es:[edi]
jne 0x408599
mov byte [ebp - 0x4005], 1
cmp byte [ebp - 0x4005], 0
je 0x40865c
add esp, 0xfffffff8
push 0x408499
push 0x4084a3
call sub.msvcrt.dll__tempnam
mov dword [0x422854], eax
add esp, 0x10
test eax, eax
je 0x4085da
add esp, 0xfffffff8
push 0x4084a7
push eax
call sub.msvcrt.dll_fopen
mov dword [0x422850], eax
add esp, 0x10
cmp dword [0x422850], 0
jne 0x40860b
mov dword [0x422854], 0x4084a9
add esp, 0xfffffff8
push 0x4084a7
push 0x4084a9
call sub.msvcrt.dll_fopen
mov dword [0x422850], eax
add esp, 0x10
test eax, eax
je 0x40865c
add esp, 0xfffffffc
push 0x2000
lea esi, [ebp - 0x4000]
push esi
push 0
call sub.KERNEL32.dll_GetModuleFileNameA
add esp, 0xfffffff8
lea ebx, [ebp - 0x4004]
push ebx
call sub.msvcrt.dll_time
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll_ctime
push eax
push esi
push 0x4084b5
push dword [0x422850]
call sub.msvcrt.dll_fprintf
add esp, 0x30
add esp, 0xfffffff4
push dword [0x422850]
call sub.msvcrt.dll_fflush
lea esp, [ebp - 0x4028]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x4087dc
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2024
call fcn.00417744
push ebx
add esp, 0xfffffffc
add esp, 0xfffffffe
push 0
call fcn.00404618
push eax
lea ebx, [ebp - 0x2000]
push ebx
call fcn.00404a04
add esp, 0xfffffff4
push 0
lea eax, [ebp - 0x2004]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push 0x4087b4
push 0x80000001
call sub.ADVAPI32.DLL_RegCreateKeyExA
add esp, 0x1c
test eax, eax
jne 0x408869
call sub.KERNEL32.dll_GetCurrentProcessId
mov dword [ebp - 0x2008], eax
add esp, 0xfffffff8
push 4
lea eax, [ebp - 0x2008]
push eax
push 4
push 0
push ebx
push dword [ebp - 0x2004]
call sub.ADVAPI32.DLL_RegSetValueExA
add esp, 0xfffffffc
push dword [ebp - 0x2004]
call sub.ADVAPI32.DLL_RegCloseKey
mov ebx, dword [ebp - 0x2028]
leave
ret
Function at 0x408874
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2020
call fcn.00417744
push esi
push ebx
add esp, 0xfffffffc
add esp, 0xfffffffe
push 0
call fcn.00404618
push eax
lea ebx, [ebp - 0x2000]
push ebx
call fcn.00404a04
xor esi, esi
add esp, 0xfffffff4
lea eax, [ebp - 0x2004]
push eax
push 0x20019
push 0
push 0x4087b4
push 0x80000001
call sub.ADVAPI32.DLL_RegOpenKeyExA
add esp, 0x1c
test eax, eax
jne 0x40891b
mov dword [ebp - 0x2008], 4
add esp, 0xfffffff8
lea eax, [ebp - 0x2008]
push eax
lea eax, [ebp - 0x200c]
push eax
lea eax, [ebp - 0x2010]
push eax
push 0
push ebx
push dword [ebp - 0x2004]
call sub.ADVAPI32.DLL_RegQueryValueExA
add esp, 8
test eax, eax
jne 0x40890d
cmp dword [ebp - 0x2008], 4
jne 0x40890d
mov esi, dword [ebp - 0x200c]
add esp, 0xfffffff4
push dword [ebp - 0x2004]
call sub.ADVAPI32.DLL_RegCloseKey
mov eax, esi
lea esp, [ebp - 0x2028]
pop ebx
pop esi
leave
ret
Function at 0x409340
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2010
call fcn.00417744
push esi
push ebx
add esp, 0xfffffff4
push 0x278b
call fcn.004019cc
add esp, 0x10
test eax, eax
je 0x40949a
cmp dword [ebp + 8], 0
jne 0x409388
cmp byte [0x422864], 0
je 0x40949a
mov eax, dword [0x42e160]
call eax
jmp 0x40949a
cmp byte [0x422864], 0
jne 0x40949a
add esp, 0xfffffffc
call fcn.0040528c
push eax
push 0x409201
lea ebx, [ebp - 0x2000]
push ebx
call sub.msvcrt.dll_sprintf
add esp, 0xfffffff8
push ebx
push 0x409234
call fcn.004086f0
add esp, 0x20
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_LoadLibraryA
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4093e4
add esp, 0xfffffff4
push 0x409274
call fcn.00408684
jmp 0x40949a
add esp, 0xfffffff8
push 0x409294
push ebx
call sub.KERNEL32.dll_GetProcAddress
mov dword [0x42e160], eax
push 0x4092a0
push ebx
call sub.KERNEL32.dll_GetProcAddress
mov dword [0x42e150], eax
push 0x4092ab
push ebx
call sub.KERNEL32.dll_GetProcAddress
mov dword [0x42e140], eax
add esp, 8
cmp dword [0x42e160], 0
je 0x409431
mov edx, dword [0x42e150]
test edx, edx
je 0x409431
test eax, eax
jne 0x409440
add esp, 0xfffffff4
push 0x4092d4
call fcn.00408684
jmp 0x40949a
call edx
add esp, 0xfffffffc
push 0xa
push 0x2710
push 0
call sub.KERNEL32.dll_FindResourceA
mov ebx, eax
add esp, 0xfffffff8
add esp, 0xfffffffc
push ebx
push 0
call sub.KERNEL32.dll_LoadResource
push eax
call sub.KERNEL32.dll_LockResource
mov esi, eax
add esp, 0xfffffff8
push ebx
push 0
call sub.KERNEL32.dll_SizeofResource
add esp, 0xfffffffc
push eax
push esi
push ebx
push eax
push esi
mov eax, dword [0x42e140]
call eax
add esp, 8
push eax
push 0x409314
call fcn.004086f0
mov byte [0x422864], 1
lea esp, [ebp - 0x2018]
pop ebx
pop esi
leave
ret

Function at 0x40a564
Capabilities:
Set console window title

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4010
call fcn.00417744
push esi
push ebx
cmp dword [0x422878], 1
jne 0x40a607
mov dword [0x422878], 0
add esp, 0xfffffff4
push 0x6b
call fcn.004019cc
add esp, 0x10
cmp eax, 1
je 0x40a607
add esp, 0xfffffff8
push 0x2000
lea esi, [ebp - 0x4000]
push esi
call sub.KERNEL32.dll_GetConsoleTitleA
add esp, 8
test eax, eax
je 0x40a607
call sub.KERNEL32.dll_GetCurrentProcessId
push eax
call sub.KERNEL32.dll_GetTickCount
push eax
push 0x40a55e
lea ebx, [ebp - 0x2000]
push ebx
call sub.msvcrt.dll_sprintf
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_SetConsoleTitleA
add esp, 0x1c
test eax, eax
je 0x40a607
add esp, 0xfffffff4
push 0x28
call sub.KERNEL32.dll_Sleep
add esp, 0xfffffff4
push ebx
push 0
call sub.USER32.dll_FindWindowA
mov dword [0x422878], eax
add esp, 0xfffffffc
push esi
call sub.KERNEL32.dll_SetConsoleTitleA
lea esp, [ebp - 0x4018]
pop ebx
pop esi
leave
ret

Function at 0x40a614
Capabilities:
Enumerate gui resources

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov edx, dword [ebp + 8]
movzx eax, byte [ebp + 0xc]
mov dword [0x42e180], edx
add esp, 0xfffffff8
push eax
push 0x40a720
call sub.USER32.dll_EnumWindows
leave
ret
Function at 0x40a97c
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2010
call fcn.00417744
push esi
push ebx
xor esi, esi
lea esi, [esi]
add esp, 0xfffffff4
lea ebx, [ebp - 0x2000]
push ebx
call fcn.00404de0
add esp, 0xfffffff8
push ebx
push 0x42e198
call sub.msvcrt.dll_strcpy
add esp, 0x20
add esp, 0xfffffff8
push 0x40a94c
push 0x42e198
call sub.msvcrt.dll_strcat
add esp, 0xfffffff8
push 0x42e198
push 0x40a951
call fcn.004086f0
add esp, 0x20
add esp, 0xfffffff8
push 0
push 0x42e198
call sub.KERNEL32.dll_CreateDirectoryA
add esp, 8
test eax, eax
jne 0x40aa1b
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x40a95e
call fcn.004086f0
add esp, 0x10
inc esi
cmp esi, 4
jle 0x40a990
add esp, 0xfffffff8
push 0x40a978
push 0x3f1
call fcn.00403b40
lea esp, [ebp - 0x2018]
pop ebx
pop esi
leave
ret

Function at 0x40aa8c
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
add esp, 0xfffffff4
push 0x1388
call sub.KERNEL32.dll_Sleep
add esp, 0xfffffffc
call fcn.0040b084
add esp, 0x10
test al, al
je 0x40ab11
add esp, 0xfffffffc
lea eax, [ebp - 0x14]
push eax
push 0x28
call sub.KERNEL32.dll_GetCurrentProcess
push eax
call sub.ADVAPI32.DLL_OpenProcessToken
add esp, 4
test eax, eax
je 0x40ab1d
add esp, 0xfffffffc
lea ebx, [ebp - 0x10]
lea eax, [ebp - 0xc]
push eax
push 0x40aa78
push 0
call sub.ADVAPI32.DLL_LookupPrivilegeValueA
mov dword [ebp - 0x10], 1
mov dword [ebp - 4], 2
add esp, 0xfffffffc
push 0
push 0
push 0
push ebx
push 0
push dword [ebp - 0x14]
call sub.ADVAPI32.DLL_AdjustTokenPrivileges
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
add esp, 0x10
test eax, eax
jne 0x40ab1d
add esp, 0xfffffff8
push 0
push 2
call sub.USER32.dll_ExitWindowsEx
mov ebx, dword [ebp - 0x38]
leave
ret
Function at 0x40abb0
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x8010
call fcn.00417744
push edi
push ebx
add esp, 0xfffffffc
push 0x2000
lea ebx, [ebp - 0x6000]
push ebx
push 0x2714
call fcn.00401aa8
add esp, 0xfffffff8
push ebx
push 0x40ab22
call fcn.004086f0
add esp, 0x20
add esp, 0xfffffff4
push ebx
call fcn.00406dd8
add esp, 0xfffffff8
push ebx
lea ebx, [ebp - 0x4000]
push ebx
call fcn.0040413c
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
add esp, 0x20
cmp ecx, 0xfffffffe
je 0x40ac3a
mov edi, ebx
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
cmp byte [ebx + ecx - 2], 0x3b
je 0x40ac3a
add esp, 0xfffffff8
push 0x40ab37
push ebx
call sub.msvcrt.dll_strcat
add esp, 0x10
add esp, 0xfffffffc
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
mov eax, 0x4001
sub eax, ecx
push eax
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [ebx + ecx - 1]
push eax
push 0x40ab39
call sub.KERNEL32.dll_GetEnvironmentVariableA
add esp, 0xfffffffc
push ebx
push 0x40ab39
call sub.KERNEL32.dll_SetEnvironmentVariableA
add esp, 8
test eax, eax
je 0x40ac90
add esp, 0xfffffff8
push ebx
push 0x40ab3e
jmp 0x40ac9f
add esp, 0xfffffffc
call sub.KERNEL32.dll_GetLastError
push eax
push ebx
push 0x40ab74
call fcn.004086f0
add esp, 0x10
add esp, 0xfffffffc
push ebx
push 0x40aba7
lea ebx, [ebp - 0x8000]
push ebx
call sub.msvcrt.dll_sprintf
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll__putenv
lea esp, [ebp - 0x8018]
pop ebx
pop edi
leave
ret
Function at 0x40ae38
Capabilities:
Create process on windows
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x400c
call fcn.00417744
push edi
push esi
push ebx
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x40aef5
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
sub eax, edx
sar eax, 2
cmp eax, 1
jbe 0x40aef5
add esp, 0xfffffff8
push 0x40acd4
push dword [edx + 4]
call sub.msvcrt.dll_wcscmp
add esp, 0x10
test eax, eax
je 0x40aec8
add esp, 0xfffffff8
push 0x40acf4
mov eax, dword [ebx]
push dword [eax + 4]
call sub.msvcrt.dll_wcscmp
add esp, 0x10
test eax, eax
je 0x40aec8
add esp, 0xfffffff8
push 0x40ad14
mov eax, dword [ebx]
push dword [eax + 4]
call sub.msvcrt.dll_wcscmp
add esp, 0x10
test eax, eax
je 0x40aec8
add esp, 0xfffffff8
push 0x40ad34
mov eax, dword [ebx]
push dword [eax + 4]
call sub.msvcrt.dll_wcscmp
add esp, 0x10
test eax, eax
jne 0x40aef5
mov eax, dword [ebx]
lea ecx, [eax + 4]
add eax, 8
mov edx, dword [ebx + 4]
cmp eax, edx
je 0x40aeea
add esp, 0xfffffffc
sub edx, eax
and edx, 0xfffffffc
push edx
push eax
push ecx
call sub.msvcrt.dll_memmove
add esp, 0x10
add dword [ebx + 4], 0xfffffffc
mov byte [0x42287e], 1
add esp, 0xfffffff4
push ebx
call fcn.00401c1c
mov eax, dword [ebp + 8]
mov dword [0x430198], eax
call fcn.0040aa38
add esp, 0x10
cmp byte [0x42287d], 0
jne 0x40af80
add esp, 0xfffffffc
push 0x2000
lea ebx, [ebp - 0x2000]
push ebx
push 0x92
call fcn.00401aa8
add esp, 0x10
cmp byte [ebp - 0x2000], 0
je 0x40af70
add esp, 0xfffffffc
add esp, 0xfffffffe
push 1
push ebx
lea ebx, [ebp - 0x4000]
push ebx
call fcn.00404a04
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_SetCurrentDirectoryA
add esp, 0xfffffff4
push ebx
push 0x40ad54
call fcn.004086f0
add esp, 0x30
jmp 0x40af80
add esp, 0xfffffff4
push 0x40ad73
call fcn.004086f0
add esp, 0x10
cmp byte [0x42287e], 0
je 0x40b078
add esp, 0xfffffffc
call fcn.00408668
push eax
push 0x40ad94
lea edi, [ebp - 0x4000]
push edi
call sub.msvcrt.dll_sprintf
push 4
push dword [0x43019c]
push edi
push 0
call sub.USER32.dll_MessageBoxA
add esp, 0x10
cmp eax, 6
jne 0x40b078
add esp, 0xfffffffc
push 0x104
lea esi, [ebp - 0x2000]
push esi
call fcn.00408668
push eax
call sub.KERNEL32.dll_GetShortPathNameA
add esp, 0xfffffffc
push 0x104
lea ebx, [ebp - 0x1ef0]
push ebx
call sub.KERNEL32.dll_GetWindowsDirectoryA
add esp, 0xfffffff8
push esi
push ebx
push 0x40ade9
push edi
call sub.msvcrt.dll_sprintf
add esp, 0x20
add esp, 0xfffffff8
push edi
push 0x40ae04
call fcn.004086f0
add esp, 0xfffffffc
push 0x10
push 0
lea esi, [ebp - 0x1de0]
push esi
call sub.msvcrt.dll_memset
add esp, 0x20
add esp, 0xfffffffc
push 0x44
push 0
lea ebx, [ebp - 0x1dd0]
push ebx
call sub.msvcrt.dll_memset
mov dword [ebp - 0x1dd0], 0x44
add esp, 0xfffffff8
push esi
push ebx
push 0
push 0
push 0x20
push 1
push 0
push 0
push edi
push 0
call sub.KERNEL32.dll_CreateProcessA
add esp, 0x18
test eax, eax
jne 0x40b078
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x40ae14
call fcn.004086f0
lea esp, [ebp - 0x4018]
pop ebx
pop esi
pop edi
leave
ret