joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4ab522
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 0x4ab58d
push 0x3d
push dword [ebp + 8]
call fcn.004abcf9
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
je 0x4ab58d
cmp dword [ebp + 8], esi
je 0x4ab58d
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [ebp - 4], eax
mov eax, dword [0x59c208]
cmp eax, dword [0x59c20c]
jne 0x4ab573
mov edi, eax
call fcn.004ab4c1
mov dword [0x59c208], eax
cmp eax, ebx
jne 0x4ab5cc
cmp dword [ebp + 0xc], ebx
je 0x4ab595
cmp dword [0x59c210], ebx
je 0x4ab595
call fcn.004a6765
test eax, eax
je 0x4ab5cc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
jne 0x4ab6d0
push 4
call fcn.0049ce87
cmp eax, ebx
pop ecx
mov dword [0x59c208], eax
je 0x4ab58d
mov dword [eax], ebx
cmp dword [0x59c210], ebx
jne 0x4ab5cc
push 4
call fcn.0049ce87
cmp eax, ebx
pop ecx
mov dword [0x59c210], eax
je 0x4ab58d
mov dword [eax], ebx
mov ebx, dword [0x59c208]
mov edi, esi
mov esi, dword [ebp + 8]
sub edi, esi
push esi
call fcn.004ab474
mov edi, eax
test edi, edi
pop ecx
jl 0x4ab625
cmp dword [ebx], 0
je 0x4ab625
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.0049ce99
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x4ab60d
mov eax, dword [ebp + 8]
mov dword [esi], eax
jmp 0x4ab65b
mov ecx, dword [esi + 4]
mov dword [esi], ecx
inc edi
add esi, 4
cmp dword [esi], eax
jne 0x4ab604
mov eax, edi
shl eax, 2
push eax
push ebx
call fcn.0049ff9f
test eax, eax
pop ecx
pop ecx
je 0x4ab65b
jmp 0x4ab656
cmp dword [ebp - 4], 0
jne 0x4ab6c9
test edi, edi
jge 0x4ab635
neg edi
lea eax, [edi*4 + 8]
push eax
push ebx
call fcn.0049ff9f
test eax, eax
pop ecx
pop ecx
je 0x4ab58d
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov dword [0x59c208], eax
cmp dword [ebp + 0xc], 0
je 0x4ab6b2
push dword [ebp + 8]
call fcn.0049d180
inc eax
inc eax
push eax
call fcn.0049ce87
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x4ab6b2
push dword [ebp + 8]
push esi
call fcn.0049cfb0
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 0x4ab6ab
or dword [ebp - 8], 0xffffffff
push esi
call fcn.0049ce99
pop ecx
cmp dword [ebp - 4], 0
je 0x4ab6c1
push dword [ebp + 8]
call fcn.0049ce99
pop ecx
mov eax, dword [ebp - 8]
jmp 0x4ab590
push esi
call fcn.0049ce99
pop ecx
xor eax, eax
jmp 0x4ab590
Function at 0x4ab8de
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0xc], ebx
mov byte [ebp - 1], bl
je 0x4ab909
cmp eax, 1
je 0x4ab909
jle 0x4ab911
cmp eax, 3
jle 0x4ab909
cmp eax, 4
jne 0x4ab911
mov byte [ebp - 1], 1
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
jmp 0x4ab93c
call fcn.0049dc15
mov dword [eax], 0x16
call fcn.0049dc1e
mov dword [eax], ebx
or eax, 0xffffffff
jmp 0x4abab5
inc eax
cmp byte [eax], bl
jne 0x4ab92b
lea ecx, [eax + 1]
cmp byte [ecx], bl
je 0x4ab93c
mov byte [eax], 0x20
mov eax, ecx
cmp byte [eax], bl
jne 0x4ab92b
push esi
push edi
push 0x44
pop esi
push esi
lea eax, [ebp - 0x68]
push ebx
push eax
call fcn.0049cf10
mov dword [ebp - 0x68], esi
mov esi, dword [0x5d16a0]
add esp, 0xc
cmp esi, ebx
je 0x4ab983
lea ecx, [esi - 1]
mov edx, ecx
mov eax, ecx
sar edx, 5
mov edx, dword [edx*4 + 0x5d16e0]
and eax, 0x1f
lea eax, [eax + eax*8]
cmp byte [edx + eax*4 + 4], bl
jne 0x4ab983
dec esi
dec ecx
cmp esi, ebx
jne 0x4ab963
lea eax, [esi + esi*4 + 4]
mov word [ebp - 0x36], ax
movzx eax, ax
push 1
push eax
call fcn.004a014c
cmp esi, ebx
mov dword [ebp - 0x34], eax
pop ecx
mov dword [eax], esi
mov eax, dword [ebp - 0x34]
pop ecx
mov dword [ebp - 8], ebx
lea ecx, [eax + 4]
lea edx, [eax + esi + 4]
jle 0x4ab9e9
mov eax, dword [ebp - 8]
mov edi, eax
sar edi, 5
mov edi, dword [edi*4 + 0x5d16e0]
and eax, 0x1f
lea eax, [eax + eax*8]
lea edi, [edi + eax*4]
mov al, byte [edi + 4]
test al, 0x10
jne 0x4ab9d5
mov byte [ecx], al
mov eax, dword [edi]
mov dword [edx], eax
jmp 0x4ab9da
mov byte [ecx], bl
or dword [edx], 0xffffffff
inc dword [ebp - 8]
inc ecx
add edx, 4
cmp dword [ebp - 8], esi
jl 0x4ab9ae
mov eax, dword [ebp - 0x34]
cmp byte [ebp - 1], bl
je 0x4aba1a
lea ecx, [eax + 4]
xor edx, edx
lea eax, [eax + esi + 4]
cmp esi, 3
jge 0x4aba00
mov edi, esi
jmp 0x4aba03
push 3
pop edi
cmp edx, edi
jge 0x4aba13
mov byte [ecx], bl
or dword [eax], 0xffffffff
inc edx
inc ecx
add eax, 4
jmp 0x4ab9f7
mov dword [ebp - 0xc], 8
call fcn.0049dc15
mov dword [eax], ebx
call fcn.0049dc1e
mov dword [eax], ebx
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x68]
push eax
push ebx
push dword [ebp + 0x14]
push dword [ebp - 0xc]
push 1
push ebx
push ebx
push dword [ebp - 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x34]
mov edi, eax
call fcn.0049ce99
cmp esi, ebx
pop ecx
jne 0x4aba6a
push edi
call fcn.0049dc27
pop ecx
or eax, 0xffffffff
jmp 0x4abab3
cmp dword [ebp + 8], 2
jne 0x4aba76
push ebx
call fcn.0049e0af
cmp dword [ebp + 8], ebx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jne 0x4abaa3
push 0xffffffffffffffff
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ebx, dword [ebp - 0x14]
push dword [ebp - 0x24]
call esi
jmp 0x4abaac
cmp dword [ebp + 8], 4
je 0x4aba9c
mov ebx, dword [ebp - 0x24]
push dword [ebp - 0x20]
call esi
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4abcb3
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4abcd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049dc27
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x4abcf6
test byte [esp + 8], 2
je 0x4abcf6
call fcn.0049dc15
mov dword [eax], 0xd
call fcn.0049dc1e
mov dword [eax], 5
jmp 0x4abccf
xor eax, eax
ret

Function at 0x4ac1ec
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4e2fe8]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
je 0x4ac267
push ebx
call fcn.004ac1b5
test eax, eax
pop ecx
jne 0x4ac239
call fcn.0049dc1e
mov dword [eax], 0xf
call fcn.0049dc15
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop ebx
call fcn.004a3651
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 0x4ac279
lea eax, [ebp - 0x10c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x4ac229
inc eax
cmp eax, 0x104
ja 0x4ac229
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x4ac2b1
cmp eax, dword [ebp + 0x10]
jg 0x4ac294
mov eax, dword [ebp + 0x10]
push eax
call fcn.0049ce87
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x4ac2c6
call fcn.0049dc15
mov dword [eax], 0xc
jmp 0x4ac229
cmp eax, dword [ebp + 0x10]
jle 0x4ac2c6
call fcn.0049dc15
mov dword [eax], 0x22
jmp 0x4ac229
lea eax, [ebp - 0x10c]
push eax
push ecx
call fcn.0049cfb0
pop ecx
pop ecx
jmp 0x4ac22b
Function at 0x4ad100
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x4b5620
call fcn.004a29ac
xor edi, edi
xor ebx, ebx
inc ebx
cmp dword [0x59c684], edi
jne 0x4ad144
push edi
push edi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x4ad12f
mov dword [0x59c684], ebx
jmp 0x4ad144
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x4ad144
mov dword [0x59c684], 2
mov eax, dword [0x59c684]
cmp eax, ebx
jne 0x4ad164
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
jmp 0x4ad227
cmp eax, 2
je 0x4ad16d
cmp eax, edi
jne 0x4ad195
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
cmp dword [ebp + 0x18], edi
jne 0x4ad180
mov eax, dword [0x59c630]
mov dword [ebp + 0x18], eax
push edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov dword [ebp - 0x24], eax
cmp eax, edi
jne 0x4ad19c
xor eax, eax
jmp 0x4ad227
mov dword [ebp - 4], edi
add eax, 3
and eax, 0xfffffffc
call fcn.0049f7b0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [ebp - 0x28], esi
or dword [ebp - 4], 0xffffffff
jmp 0x4ad1cf
cmp esi, edi
jne 0x4ad1e5
push dword [ebp - 0x24]
call fcn.0049ce87
pop ecx
mov esi, eax
cmp esi, edi
je 0x4ad195
mov dword [ebp - 0x20], ebx
push dword [ebp - 0x24]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x4ad218
cmp dword [ebp + 0x14], edi
jne 0x4ad202
push edi
push edi
jmp 0x4ad208
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push esi
push ebx
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], edi
je 0x4ad224
push esi
call fcn.0049ce99
pop ecx
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 0x34]
call fcn.004a29e7
ret
Function at 0x4ad230
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x4b5630
call fcn.004a29ac
xor esi, esi
cmp dword [0x59c688], esi
jne 0x4ad274
push esi
push esi
xor edi, edi
inc edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x4ad25f
mov dword [0x59c688], edi
jmp 0x4ad274
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x4ad274
mov dword [0x59c688], 2
mov eax, dword [0x59c688]
cmp eax, 2
je 0x4ad355
cmp eax, esi
je 0x4ad355
cmp eax, 1
jne 0x4ad2b9
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
cmp dword [ebp + 0x18], esi
jne 0x4ad2a2
mov eax, dword [0x59c630]
mov dword [ebp + 0x18], eax
push esi
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, esi
jne 0x4ad2c0
xor eax, eax
jmp 0x4ad367
mov dword [ebp - 4], esi
lea eax, [ebx + ebx]
add eax, 3
and eax, 0xfffffffc
call fcn.0049f7b0
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x28], edi
or dword [ebp - 4], 0xffffffff
jmp 0x4ad2f6
cmp edi, esi
jne 0x4ad311
lea eax, [ebx + ebx]
push eax
call fcn.0049ce87
pop ecx
mov edi, eax
cmp edi, esi
je 0x4ad2b9
mov dword [ebp - 0x20], 1
push ebx
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x4ad344
push esi
push esi
cmp dword [ebp + 0x14], esi
jne 0x4ad32e
push esi
push esi
jmp 0x4ad334
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push edi
push esi
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], esi
je 0x4ad350
push edi
call fcn.0049ce99
pop ecx
mov eax, dword [ebp - 0x1c]
jmp 0x4ad367
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea esp, [ebp - 0x34]
call fcn.004a29e7
ret
Function at 0x401590
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x40ff20]
test eax, eax
je 0x4015db
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 8]
push eax
push 0x40d024
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [0x40ff20]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
add esp, 0xc
push edx
push eax
mov eax, dword [ebp + 8]
push ecx
lea edx, [ebp - 8]
push 0x40fac8
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov esp, ebp
pop ebp
ret
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x4015f0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 5
push edi
call dword [sym.imp.USER32.dll_GetWindow]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov esi, eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x14]
push eax
push str.Dialog_d
push ecx
call ebx
add esp, 0xc
lea edx, [ebp - 0x8c]
lea eax, [ebp - 0x14]
push 0x104
push edx
push 0
push eax
call fcn.00401590
add esp, 0x10
test eax, eax
jne 0x401650
lea ecx, [ebp - 0x8c]
push 0x78
push ecx
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov al, byte [ebp - 0x8c]
test al, al
je 0x4016ac
lea edx, [ebp - 0x8c]
push edx
push edi
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4016ac
mov eax, dword [0x40ff58]
lea ecx, [ebp - 0x8c]
test eax, eax
push ecx
je 0x401697
mov edx, dword [0x40ff54]
push eax
push str._s____s
push edx
call ebx
mov eax, dword [0x40ff54]
add esp, 0x10
push eax
push 0
push 0x46f
push edi
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
test esi, esi
je 0x4016f5
mov edi, dword [sym.imp.USER32.dll_GetWindowLongA]
push 0xfffffffffffffff4
push esi
call edi
mov edx, dword [0x40ff54]
push 0x104
push edx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00401590
add esp, 0x10
test eax, eax
je 0x4016e6
mov ecx, dword [0x40ff54]
push ecx
push esi
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 2
push esi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
jne 0x4016b6
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401890
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x100
push 0x8000
push edi
call fcn.00401250
mov ebx, dword [ebp + 0xc]
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x4018fb
mov cx, word [ebx + 0x1a]
mov dx, word [ebx + 0x18]
lea eax, [ebp - 0x10]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
test eax, eax
je 0x4018f4
lea eax, [ebp - 8]
lea ecx, [ebp - 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x4018f4
lea edx, [ebp - 8]
lea eax, [ebp - 8]
push edx
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov cl, byte [ebx + 0x1c]
and ecx, 0x27
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401d20
Capabilities:
Copy file
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov ecx, dword [0x40ff74]
lea eax, [ebp - 0x104]
push esi
push eax
push 0
push 0x40d090
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0x180
lea edx, [ebp - 0x104]
push 0x8101
push edx
call fcn.00401250
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x401dda
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push edi
push ebx
push eax
push ecx
push esi
call fcn.004012f0
add esp, 0xc
push esi
call fcn.00401310
add esp, 4
lea edx, [ebp - 0x214]
lea eax, [ebp - 0x104]
push 0
push edx
push eax
call sub.LZ32.dll_LZOpenFileA
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x18c]
push 0x1001
push ecx
push edx
mov esi, eax
call sub.LZ32.dll_LZOpenFileA
mov edi, eax
push edi
push esi
call sub.LZ32.dll_LZCopy
push esi
mov ebx, eax
call sub.LZ32.dll_LZClose
push edi
call sub.LZ32.dll_LZClose
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, ebx
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x401e60
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov ecx, dword [0x40ff74]
lea eax, [ebp - 0x104]
push esi
push eax
push 0
push str.welcome
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x104]
push eax
push ecx
call fcn.00401d20
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x401ef8
push edi
push 0x100
lea edx, [ebp - 0x104]
push 0x8000
push edx
call fcn.00401250
add esp, 0xc
mov edi, eax
lea eax, [esi + 1]
push eax
call fcn.004084f0
add esp, 4
mov dword [0x40ff10], eax
push esi
push eax
push edi
call fcn.004012d0
add esp, 0xc
push edi
call fcn.00401310
add esp, 4
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x401f00
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0x104
call fcn.004084f0
add esp, 4
mov dword [0x40ff20], eax
push eax
mov eax, dword [0x40ff74]
push 0
push 0x40d0a4
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov eax, dword [0x40ff20]
push ecx
push edx
push eax
call fcn.00401d20
add esp, 0xc
test eax, eax
jne 0x401f5c
mov ecx, dword [0x40ff20]
push ecx
call fcn.004085a0
add esp, 4
mov dword [0x40ff20], 0
xor eax, eax
pop ebp
ret

Function at 0x405ce0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov eax, dword [esp + 0x10]
mov ebp, esp
push esi
push edi
mov esi, dword [ebp + 0xc]
shr esi, 2
mov edx, dword [ebp + 8]
mov ecx, esi
dec esi
test ecx, ecx
jle 0x405d21
movzx edi, byte [edx]
inc edx
movzx ecx, byte [edx]
shl ecx, 8
inc edx
or edi, ecx
movzx ecx, byte [edx]
shl ecx, 0x10
inc edx
or edi, ecx
movzx ecx, byte [edx]
shl ecx, 0x18
inc edx
or edi, ecx
mov ecx, esi
xor eax, edi
dec esi
test ecx, ecx
jg 0x405cf9
xor esi, esi
mov ecx, dword [ebp + 0xc]
and ecx, 3
cmp ecx, 1
je 0x405d48
cmp ecx, 2
je 0x405d3f
cmp ecx, 3
jne 0x405d4d
movzx esi, byte [edx]
shl esi, 0x10
inc edx
movzx ecx, byte [edx]
shl ecx, 8
inc edx
or esi, ecx
movzx ecx, byte [edx]
or esi, ecx
xor eax, esi
pop edi
pop esi
pop ebp
ret 0xc
Function at 0x408c50
Capabilities:
Terminate process

Disassembly:
cmp dword [0x40fb38], 1
jne 0x408c5e
call fcn.0040a710
mov eax, dword [esp + 4]
push eax
call fcn.0040a750
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x4095b0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x40fb98]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x4095cf
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x40fb94], 1
mov byte [0x40fb90], bl
jne 0x409629
mov ecx, dword [0x4114e8]
test ecx, ecx
je 0x409617
mov esi, dword [0x4114e4]
sub esi, 4
cmp esi, ecx
jb 0x409617
mov eax, dword [esi]
test eax, eax
je 0x409610
call eax
mov ecx, dword [0x4114e8]
sub esi, 4
cmp esi, ecx
jae 0x409602
push 0x40d014
push 0x40d010
call fcn.00409660
add esp, 8
push 0x40d01c
push 0x40d018
call fcn.00409660
add esp, 8
test ebx, ebx
jne 0x409650
push ebp
mov dword [0x40fb98], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x409d10
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x40fca8]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x409d52
call edi
mov esi, eax
test esi, esi
je 0x409d3c
mov eax, 1
jmp 0x409d4d
call ebp
mov ebx, eax
test ebx, ebx
je 0x409e5f
mov eax, 2
mov dword [0x40fca8], eax
cmp eax, 1
jne 0x409df2
test esi, esi
jne 0x409d6b
call edi
mov esi, eax
test esi, esi
je 0x409e5f
cmp word [esi], 0
mov eax, esi
je 0x409d85
add eax, 2
cmp word [eax], 0
jne 0x409d73
add eax, 2
cmp word [eax], 0
jne 0x409d73
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x409de4
push edi
call fcn.004084f0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x409de4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x409dd6
push ebx
call fcn.004085a0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x409e5f
test ebx, ebx
jne 0x409e03
call ebp
mov ebx, eax
test ebx, ebx
je 0x409e5f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x409e1b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409e0b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409e0b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004084f0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x409e3d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x40a750
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40f900
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40a774
add eax, 8
inc ebp
cmp eax, 0x40f990
jb 0x40a765
cmp ecx, dword [ebp*8 + 0x40f900]
jne 0x40a91b
mov eax, dword [0x40fb38]
cmp eax, 1
je 0x40a8dd
test eax, eax
jne 0x40a7a0
cmp dword [0x40d734], 1
je 0x40a8dd
cmp ecx, 0xfc
je 0x40a91b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40a7db
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40a824
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x40c2e8
add ebx, ecx
push ebx
call fcn.0040b000
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40c2c8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x40f904]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.0040af70
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x4113e0]
test eax, eax
je 0x40a8ee
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40a8f8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40f904]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret