joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406df0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
sub esp, 0xcc
mov edx, 0x32
push edi
mov ecx, edx
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
mov ecx, 0x30
mov word [esp + 0x20], dx
mov word [esp + 0x22], cx
mov word [esp + 0x24], cx
mov word [esp + 0x2c], cx
mov ecx, 0x77
mov word [esp + 0x26], dx
mov word [esp + 0x2a], dx
mov word [esp + 0x34], cx
mov word [esp + 0x36], cx
mov word [esp + 0x38], cx
mov edi, 0x79
mov eax, 0x20
mov ecx, 0x2e
mov edx, 0x63
mov word [esp + 8], 0x43
mov word [esp + 0xa], 0x6f
mov word [esp + 0xc], 0x70
mov word [esp + 0xe], di
mov word [esp + 0x10], 0x72
mov word [esp + 0x12], 0x69
mov word [esp + 0x14], 0x67
mov word [esp + 0x16], 0x68
mov word [esp + 0x18], 0x74
mov word [esp + 0x1a], ax
mov word [esp + 0x1c], 0x40
mov word [esp + 0x1e], ax
mov word [esp + 0x28], 0x2d
mov word [esp + 0x2e], 0x31
mov word [esp + 0x30], 0x39
mov word [esp + 0x32], ax
mov word [esp + 0x3a], cx
mov word [esp + 0x3c], 0x76
mov word [esp + 0x3e], 0x65
mov word [esp + 0x40], 0x72
mov word [esp + 0x42], di
mov word [esp + 0x44], 0x70
mov word [esp + 0x46], 0x64
mov word [esp + 0x48], 0x66
mov word [esp + 0x4a], cx
mov word [esp + 0x4c], dx
mov word [esp + 0x4e], 0x6f
mov word [esp + 0x50], 0x6d
mov word [esp + 0x52], ax
mov word [esp + 0x54], 0x49
mov word [esp + 0x56], 0x6e
mov word [esp + 0x58], dx
mov word [esp + 0x5a], cx
call dword [sym.imp.MSVCRT.dll__tzset]
lea eax, [esp + 4]
push eax
call dword [sym.imp.MSVCRT.dll_time]
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.MSVCRT.dll_localtime]
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0xc]
add esp, 8
add ecx, 0x76c
inc edx
cmp ecx, 0x7d1
pop edi
jne 0x406f88
cmp edx, 1
jne 0x407000
cmp eax, edx
jne 0x407053
push 0x40
lea edx, [esp + 8]
push 0
push edx
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
add esp, 0xcc
ret
cmp ecx, 0x7d2
jne 0x406fa7
cmp edx, 5
jne 0x40706e
cmp eax, 1
jne 0x40706e
jmp 0x407058
cmp ecx, 0x7d4
jne 0x406fde
cmp edx, 0xc
jne 0x40706e
cmp eax, 1
jne 0x40706e
push 0x40
lea ecx, [esp + 8]
push 0
push ecx
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
add esp, 0xcc
ret
cmp ecx, 0x7d5
jne 0x40706e
cmp edx, 3
jne 0x406ff4
cmp eax, 1
jmp 0x40702f
cmp edx, 0xa
jne 0x40706e
cmp eax, 1
jne 0x40706e
jmp 0x407058
cmp edx, 8
jne 0x407027
cmp eax, 1
jne 0x40706e
push 0x40
lea ecx, [esp + 8]
push 0
push ecx
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
add esp, 0xcc
ret
cmp edx, 7
jne 0x40704e
cmp eax, 0x13
jne 0x40706e
push 0x40
lea edx, [esp + 8]
push 0
push edx
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
add esp, 0xcc
ret
cmp edx, 1
jne 0x40706e
cmp eax, 0xd
jne 0x40706e
push 0x40
lea eax, [esp + 8]
push 0
push eax
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
add esp, 0xcc
ret
Function at 0x4073a0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x64
mov ecx, 0x19
xor eax, eax
push ebx
push esi
push edi
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov eax, 0x11b32f8
mov dl, byte [eax]
add eax, 4
mov byte [esp + ecx + 0xc], dl
inc ecx
cmp eax, 0x11b3334
jl 0x4073ba
mov eax, dword [esp + 0x74]
push 0x11b31b0
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4073eb
pop edi
pop esi
pop ebx
add esp, 0x64
ret
push ebx
call dword [sym.imp.MSVCRT.dll__fileno]
push eax
call dword [sym.imp.MSVCRT.dll__filelength]
mov esi, eax
add esp, 8
test esi, esi
jg 0x407415
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x64
ret
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
push ebx
mov edi, eax
push esi
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x18
test edi, edi
jne 0x40743f
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x64
ret
lea ecx, [esp + 0xc]
push ecx
push esi
push edi
call fcn.00407360
mov esi, eax
push edi
neg esi
sbb esi, esi
neg esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x64
ret
Function at 0x4074a0
Capabilities:
Delete file
Move file

Disassembly:
push 0xffffffffffffffff
push 0x41afbb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x41c
mov al, byte [esp + 3]
push ebx
push ebp
xor ebx, ebx
push esi
push edi
mov byte [esp + 0x14], al
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov ebp, dword [esp + 0x43c]
mov dword [esp + 0x434], ebx
cmp ebp, ebx
je 0x407634
cmp byte [ebp], bl
je 0x407634
lea ecx, [esp + 0x228]
lea edx, [esp + 0x28]
push ecx
lea eax, [esp + 0x12c]
push edx
lea ecx, [esp + 0x2c]
push eax
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll__splitpath]
lea edx, [esp + 0x3c]
push 0x11b3ec8
push edx
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 0x1c
cmp eax, ebx
je 0x40752e
mov byte [eax], bl
mov edi, 0x11b3ec4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x228]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x12c]
push ecx
lea eax, [esp + 0x2c]
push edx
lea ecx, [esp + 0x334]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__makepath]
lea edx, [esp + 0x28]
lea eax, [esp + 0x33c]
push edx
push eax
call fcn.00406850
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
add esp, 0x1c
cmp esi, ebx
je 0x4075ae
mov ecx, eax
sub ecx, esi
sar ecx, 5
jne 0x4075c9
cmp esi, eax
mov edi, eax
je 0x4075c6
mov ecx, esi
call fcn.00406a90
add esi, 0x20
cmp esi, edi
jne 0x4075b4
mov esi, dword [esp + 0x18]
push esi
jmp 0x407635
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 4]
cmp eax, ebx
jne 0x4075e0
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ebp
push eax
call dword [sym.imp.MSVCRT.dll_rename]
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
add esp, 8
cmp esi, eax
mov dword [esp + 0x434], 0xffffffff
mov edi, eax
je 0x407624
push 1
lea ecx, [esi + 0x10]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
add esi, 0x20
cmp esi, edi
jne 0x407604
mov esi, dword [esp + 0x18]
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, 1
jmp 0x40763f
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x42c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x428
ret
Function at 0x40b570
Capabilities:
Parse pe header

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
test ebp, ebp
push edi
je 0x40b5f2
mov edi, dword [esp + 0x14]
test edi, edi
je 0x40b5f2
mov ebx, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
push 0x40
push edi
call ebx
test eax, eax
jne 0x40b5f2
cmp word [edi], 0x5a4d
jne 0x40b5f2
mov esi, dword [edi + 0x3c]
push pe_nt_image_headers32
add esi, edi
push esi
call ebx
test eax, eax
jne 0x40b5f2
cmp dword [esi], 0x4550
jne 0x40b5f2
mov esi, dword [esi + 0x80]
test esi, esi
je 0x40b5fc
mov eax, dword [esi + edi + 0xc]
add esi, edi
test eax, eax
je 0x40b5e4
mov ebx, dword [sym.imp.MSVCRT.dll__stricmp]
add eax, edi
push ebp
push eax
call ebx
add esp, 8
test eax, eax
je 0x40b5e4
mov eax, dword [esi + 0x20]
add esi, 0x14
test eax, eax
jne 0x40b5cd
mov eax, dword [esi + 0xc]
pop edi
neg eax
sbb eax, eax
and eax, esi
pop esi
pop ebp
pop ebx
ret
push 1
push 0x57
call dword [sym.imp.USER32.dll_SetLastErrorEx]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x40b670
Capabilities:
Parse pe header

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
push 0x12a
push 0x11b5d68
push 0x11b334c
call fcn.0040d510
mov eax, dword [esp + 0x28]
add esp, 0xc
cmp word [eax], 0x5a4d
je 0x40b6a3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov esi, dword [eax + 0x3c]
add esi, eax
mov dword [esp + 0x14], esi
cmp dword [esi], 0x4550
je 0x40b6be
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x34]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x2000
push eax
push ecx
call edi
mov ebp, eax
test ebp, ebp
jne 0x40b6f7
mov edx, dword [esi + 0x50]
push 4
push 0x2000
push edx
push eax
call edi
mov ebp, eax
test ebp, ebp
jne 0x40b6f7
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push 0x14
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
xor eax, eax
push 4
push 0x1000
mov dword [ebx + 4], ebp
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], eax
mov eax, dword [esi + 0x50]
push eax
push ebp
call edi
mov ecx, dword [esi + 0x54]
push 4
push 0x1000
push ecx
push ebp
call edi
push 0x165
mov edi, eax
push 0x11b5d68
push 0x11b334c
mov dword [esp + 0x1c], edi
call fcn.0040d510
mov eax, dword [esp + 0x28]
mov edx, dword [esi + 0x54]
mov esi, eax
push ebx
mov ecx, dword [eax + 0x3c]
add ecx, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x20]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x24]
mov ecx, eax
push esi
push ecx
mov eax, dword [ecx + 0x3c]
add eax, edx
mov dword [ebx], eax
mov dword [eax + 0x34], ebp
call fcn.0040b850
mov ecx, dword [esi + 0x34]
mov eax, ebp
add esp, 0x18
sub eax, ecx
je 0x40b79c
push eax
push ebx
call fcn.0040b9e0
add esp, 8
push 0x175
push 0x11b5d68
push 0x11b334c
call fcn.0040d510
push ebx
call fcn.0040ba60
add esp, 0x10
test eax, eax
je 0x40b825
push 0x17a
push 0x11b5d68
push 0x11b334c
call fcn.0040d510
push ebx
call fcn.0040b920
push 0x17f
push 0x11b5d68
push 0x11b334c
call fcn.0040d510
mov eax, dword [ebx]
add esp, 0x1c
mov eax, dword [eax + 0x28]
test eax, eax
je 0x40b83f
lea esi, [eax + ebp]
test esi, esi
je 0x40b825
push 0x11b5d54
call fcn.0040d510
add esp, 4
push 0
push 1
push ebp
call esi
push 0x11b5d40
mov esi, eax
call fcn.0040d510
add esp, 4
test esi, esi
jne 0x40b838
push ebx
call fcn.0040bd90
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov dword [ebx + 0x10], 1
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 8
ret
Function at 0x40b850
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
mov eax, dword [esp + 0x10]
push ebx
push ebp
xor ecx, ecx
mov ebp, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 8], 0
mov cx, word [eax + 0x14]
cmp word [eax + 6], 0
lea ebx, [ecx + eax + 0x18]
jbe 0x40b911
push esi
push edi
add ebx, 0x10
cmp dword [ebx], 0
jne 0x40b8bb
mov edx, dword [esp + 0x1c]
mov esi, dword [edx + 0x38]
test esi, esi
jle 0x40b8ef
mov eax, dword [ebx - 4]
push 4
push 0x1000
add eax, ebp
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, esi
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [ebx - 8], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x40b8ef
mov ecx, dword [ebx - 4]
mov eax, dword [ebx]
push 4
push 0x1000
add ecx, ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebx]
mov esi, dword [ebx + 4]
mov edi, dword [esp + 0x18]
mov edx, ecx
add esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx - 8], eax
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
inc eax
add ebx, 0x28
mov edx, dword [ecx]
xor ecx, ecx
mov dword [esp + 0x10], eax
mov cx, word [edx + 6]
cmp eax, ecx
jl 0x40b87e
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x40b920
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
xor ecx, ecx
push ebp
mov ebx, dword [eax]
xor ebp, ebp
mov cx, word [ebx + 0x14]
cmp word [ebx + 6], bp
lea eax, [ecx + ebx + 0x18]
jbe 0x40b9d9
push esi
push edi
lea edi, [eax + 0x24]
mov eax, dword [edi]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x40b977
mov edx, dword [edi - 0x14]
mov eax, dword [edi - 0x1c]
push 0x4000
push edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x40b9bf
lea ecx, [edx + ecx*2]
test eax, 0x4000000
lea edx, [esi + ecx*2]
mov esi, dword [edx*4 + 0x11b5d20]
je 0x40b991
or esi, 0x200
mov edx, dword [edi - 0x14]
mov ecx, edx
test ecx, ecx
jne 0x40b9ac
test al, 0x40
je 0x40b9a3
mov ecx, dword [ebx + 0x20]
jmp 0x40b9aa
test al, 0x80
je 0x40b9bf
mov ecx, dword [ebx + 0x24]
test ecx, ecx
jbe 0x40b9bf
mov ecx, dword [edi - 0x1c]
lea eax, [esp + 0x10]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [esp + 0x18]
xor eax, eax
inc ebp
add edi, 0x28
mov ebx, dword [edx]
mov ax, word [ebx + 6]
cmp ebp, eax
jl 0x40b944
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x40d0c0
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x10c
lea eax, [esp]
push esi
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x40d122
mov edx, dword [esp + 4]
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
push esi
push edx
mov dword [esp + 0x18], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 0x11c]
lea eax, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10c
ret

Function at 0x40d130
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x208
push ebp
mov ebp, dword [esp + 0x214]
push esi
push edi
push ebp
push 0
push 0
push eax
push 0x11b38f4
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov esi, eax
cmp esi, 0x20
ja 0x40d21f
lea ecx, [esp + 0xc]
push ecx
push 0x12b53d0
push SysReAllocString
call fcn.0040d0c0
add esp, 0xc
test eax, eax
jne 0x40d21f
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0xc]
push 0x12b53bc
push edx
call edi
lea eax, [esp + 0xc]
lea ecx, [esp + 0xc]
push eax
push ecx
push SysReAllocString
call fcn.0040d0c0
add esp, 0xc
test eax, eax
jne 0x40d21f
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_strstr]
lea edx, [esp + 0x10]
push 0x12b53b4
push edx
call ebx
mov esi, eax
add esp, 8
test esi, esi
jne 0x40d1f0
lea eax, [esp + 0x10]
push 0x12b53b0
push eax
call ebx
mov esi, eax
add esp, 8
test esi, esi
jne 0x40d1f0
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esp + eax + 0xf]
jmp 0x40d1f3
mov byte [esi], 0
push 0x11b5de0
push esi
call edi
mov edx, dword [esp + 0x21c]
push edx
push esi
call edi
lea eax, [esp + 0x10]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x208
ret 8
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 0x208
ret 8

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

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x104
test eax, eax
ja 0x40d247
xor eax, eax
add esp, 0x104
ret
push ebx
lea eax, [esp + 4]
push edi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ebx, dword [esp + 0x114]
lea ecx, [esp + 8]
push ebx
push 0
push 0x12b53d8
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edi, dword [esp + 0x118]
test edi, edi
je 0x40d2ac
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push esi
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
mov eax, ecx
pop ebx
add esp, 0x104
ret
Function at 0x40d350
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x88
push ebx
push ebp
mov ebp, dword [esp + 0x94]
push esi
test ebp, ebp
je 0x40d4f9
cmp byte [ebp], 0
je 0x40d4f9
mov eax, dword [esp + 0x9c]
test eax, eax
je 0x40d4f9
cmp byte [eax], 0
je 0x40d4f9
push 0x11b31b0
push ebp
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x40d4f9
push esi
push 0x6c
lea eax, [esp + 0x20]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x2c]
add esp, 0x14
cmp eax, 1
jne 0x40d4f9
cmp dword [esp + 0x40], 0x464d4520
jne 0x40d4f9
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov ebx, eax
push ebx
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
test esi, esi
je 0x40d4f9
push edi
mov edi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 4
push esi
call edi
mov dword [esp + 0x18], eax
push 8
fild dword [esp + 0x1c]
push esi
fmul dword [0x41c3bc]
fstp dword [esp + 0x18]
call edi
mov dword [esp + 0x18], eax
push 6
fild dword [esp + 0x1c]
push esi
fdivr dword [esp + 0x18]
fstp dword [esp + 0x1c]
call edi
mov dword [esp + 0x10], eax
push 0xa
fild dword [esp + 0x14]
push esi
fmul dword [0x41c3bc]
fstp dword [esp + 0x20]
call edi
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x10], eax
sub ecx, edx
fild dword [esp + 0x10]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
push esi
fdivr dword [esp + 0x1c]
sub edx, eax
push ebx
fild dword [esp + 0x18]
fdiv dword [esp + 0x1c]
mov dword [esp + 0x1c], edx
fadd dword [0x41c3b8]
fstp dword [esp + 0x18]
fild dword [esp + 0x1c]
fdiv st(1)
fadd dword [0x41c3b8]
fstp dword [esp + 0x1c]
fstp st(0)
call dword [sym.imp.USER32.dll_ReleaseDC]
fld dword [esp + 0x10]
call sub.MSVCRT.dll__ftol
fld dword [esp + 0x14]
mov esi, eax
call sub.MSVCRT.dll__ftol
test esi, esi
pop edi
jle 0x40d4f9
test eax, eax
jle 0x40d4f9
push eax
push esi
push 0
lea eax, [esp + 0x90]
push 0
push eax
call dword [sym.imp.USER32.dll_SetRect]
push ebp
call dword [sym.imp.GDI32.dll_GetEnhMetaFileA]
mov esi, eax
test esi, esi
je 0x40d4f9
mov ecx, dword [esp + 0x9c]
push ecx
push esi
call fcn.0040d2d0
add esp, 8
push esi
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x88
ret
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x88
ret
Function at 0x40d7e0
Capabilities:
Check if file exists
Get file attributes
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x41b22c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc20
push ebx
push esi
push edi
xor ebx, ebx
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x42d]
mov byte [esp + 0x42c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x24]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x32c]
lea edx, [esp + 0x228]
push ecx
lea eax, [esp + 0x12c]
push edx
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x30]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__splitpath]
push 0x11b3e38
lea eax, [esp + 0x140]
push 0x12b5480
lea ecx, [esp + 0x2c]
push eax
lea edx, [esp + 0x44]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__makepath]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0x28
lea eax, [esp + 0x24]
push eax
call esi
cmp eax, 0xffffffff
jne 0x40d891
or eax, eax
jmp 0x40d988
mov edi, dword [esp + 0xc3c]
push edi
call esi
cmp eax, 0xffffffff
jne 0x40d8aa
mov eax, 0xfffffffe
jmp 0x40d988
mov eax, dword [esp + 0xc44]
mov ecx, dword [esp + 0xc48]
cmp eax, ebx
jne 0x40d8ee
cmp ecx, ebx
jne 0x40d8ee
mov ecx, dword [esp + 0xc40]
mov edx, dword [esp + 0xc4c]
push ecx
push edi
lea eax, [esp + 0x2c]
push edx
push eax
lea ecx, [esp + 0x43c]
push 0x12b5468
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x18
jmp 0x40d91c
mov edx, dword [esp + 0xc40]
push edx
push edi
push ecx
push eax
mov eax, dword [esp + 0xc5c]
lea ecx, [esp + 0x34]
push eax
push ecx
lea edx, [esp + 0x444]
push 0x12b5448
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x20
push 0x12b5410
push 0x12b5404
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov al, byte [esp + 0xf]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x14], al
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
lea ecx, [esp + 0x14]
lea edx, [esp + 0x42c]
push ecx
push edx
mov dword [esp + 0xc3c], 1
call fcn.0040d520
mov ecx, dword [esp + 0x20]
add esp, 8
cmp ecx, ebx
mov esi, eax
je 0x40d986
mov al, byte [ecx - 1]
cmp al, bl
je 0x40d97c
cmp al, 0xff
je 0x40d97c
dec al
mov byte [ecx - 1], al
jmp 0x40d986
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0xc2c]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0xc2c
ret
Function at 0x40dfc0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push esi
mov esi, dword [esp + 0x5c]
test esi, esi
jne 0x40dfd4
or eax, 0xffffffff
pop esi
add esp, 0x54
ret
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
lea edx, [esp + 4]
lea eax, [esp + 0x14]
mov cx, word [esp + 0x60]
push edx
push eax
push 0
push 0
push 0x20
push 0
push 0
push 0
push esi
push 0
mov dword [esp + 0x68], 1
mov word [esp + 0x6c], cx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40e01c
or eax, 0xffffffff
pop esi
add esp, 0x54
ret
mov ecx, dword [esp + 4]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40e061
mov eax, dword [esp + 4]
lea edx, [esp + 0x5c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x40e049
or eax, 0xffffffff
pop esi
add esp, 0x54
ret
mov ecx, dword [esp + 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 8]
push edx
call esi
mov eax, dword [esp + 0x5c]
pop esi
add esp, 0x54
ret

Function at 0x40e070
Capabilities:
Get common file path

Disassembly:
sub esp, 0x904
push ebx
mov ebx, dword [esp + 0x90c]
push ebp
push esi
push edi
push ebx
push 0x12b5630
call fcn.0040d510
xor dl, dl
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x11d]
mov byte [esp + 0x11c], dl
mov byte [esp + 0x18], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x19]
add esp, 8
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0xf], 0x5c
je 0x40e112
mov edi, 0x11b3d54
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x12b5620
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push ebx
lea ecx, [esp + 0x11c]
push 0x12b55bc
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edx, [esp + 0x124]
push 1
push edx
call fcn.0040dfc0
push ebx
call fcn.0040def0
add esp, 0x1c
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0x904
ret