joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405909
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push ebx
lea eax, [ebp - 0x11c]
push esi
push edi
mov esi, dword [ebp + 8]
push eax
push dword [esi + 8]
push 0x148
push dword [esi + 0x14]
call dword [sym.imp.USER32.dll_SendMessageA]
lea edi, [esi + 0x18]
push dword [0x415a58]
push dword [edi]
call dword [sym.imp.GDI32.dll_SelectObject]
test byte [esi + 0x10], 1
mov dword [ebp - 0x10], eax
je 0x40595f
push 0xd
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov ebx, eax
push 0xe
jmp 0x405972
push 5
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov ebx, eax
push 8
call dword [sym.imp.USER32.dll_GetSysColor]
push ebx
mov dword [ebp - 8], eax
lea eax, [esi + 0x1c]
push eax
push dword [edi]
call dword [sym.imp.USER32.dll_FillRect]
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [edi]
cmp dword [esi + 0x1c], 1
sbb eax, eax
and al, 0xfe
add eax, 5
mov dword [ebp - 4], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebx, eax
push 0
push dword [esi + 8]
push 0x150
push dword [esi + 0x14]
call dword [sym.imp.USER32.dll_SendMessageA]
push 0
mov dword [ebp - 0xc], eax
push dword [edi]
call dword [sym.imp.GDI32.dll_SetTextColor]
push 0xffffff
mov dword [ebp - 0x18], eax
push dword [edi]
call dword [sym.imp.GDI32.dll_SetBkColor]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
shr eax, 0x10
add esi, 0x20
movzx ecx, ax
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push 0x8800c6
mov dword [ebp - 0x1c], eax
push 0
mov eax, dword [esi]
push 0
inc eax
push ebx
push 0xd
push 0x10
push eax
push dword [ebp - 4]
push dword [edi]
call dword [sym.imp.GDI32.dll_BitBlt]
movzx ecx, word [ebp - 0xc]
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push 0xee0086
push 0
push 0
push ebx
push 0xd
push 0x10
mov eax, dword [esi]
inc eax
push eax
push dword [ebp - 4]
push dword [edi]
call dword [sym.imp.GDI32.dll_BitBlt]
push dword [ebp - 0x1c]
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
push dword [ebp - 8]
push dword [edi]
call dword [sym.imp.GDI32.dll_SetTextColor]
push 1
push dword [edi]
call dword [sym.imp.GDI32.dll_SetBkMode]
mov ebx, eax
lea ecx, [ebp - 0x11c]
push ecx
call fcn.0040e930
add esp, 4
lea ecx, [ebp - 0x11c]
push eax
push ecx
push dword [esi]
mov eax, dword [ebp - 4]
add eax, 0x16
push eax
push dword [edi]
call dword [sym.imp.GDI32.dll_TextOutA]
push dword [ebp - 0x18]
push dword [edi]
call dword [sym.imp.GDI32.dll_SetTextColor]
push dword [ebp - 0x14]
push dword [edi]
call dword [sym.imp.GDI32.dll_SetBkColor]
push ebx
push dword [edi]
call dword [sym.imp.GDI32.dll_SetBkMode]
push dword [ebp - 0x10]
push dword [edi]
call dword [sym.imp.GDI32.dll_SelectObject]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406042
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov eax, dword [0x41583c]
mov ebp, esp
sub esp, 0xc
push esi
push edi
push eax
call fcn.00406189
add esp, 4
lea ecx, [ebp - 0xc]
xor edi, edi
push 0xc
push dword [ebp + 8]
push ecx
call fcn.0040ec10
add esp, 0xc
lea esi, [ebp + edi - 0xc]
call fcn.00406170
inc edi
xor byte [esi], al
movzx eax, byte [esi]
push eax
call fcn.00406108
add esp, 4
cmp edi, 0xc
jl 0x40606b
mov eax, dword [0x4159c8]
movzx cx, byte [ebp - 1]
test byte [eax + 0x28], 2
je 0x4060a4
mov ax, word [0x417ad6]
shr ax, 8
jmp 0x4060ac
mov eax, dword [0x417adc]
shr eax, 0x18
movzx eax, ax
movzx ecx, cx
cmp ecx, eax
je 0x4060bd
mov eax, 0xffffffff
jmp 0x406102
mov eax, dword [0x41fcb4]
cmp dword [0x417b84], eax
jge 0x4060d2
mov esi, dword [0x417b84]
jmp 0x4060d8
mov esi, dword [0x41fcb4]
mov edi, dword [0x41fd24]
mov eax, esi
dec esi
test eax, eax
je 0x406100
call fcn.00406170
xor byte [edi], al
movzx eax, byte [edi]
push eax
inc edi
call fcn.00406108
add esp, 4
mov eax, esi
dec esi
test eax, eax
jne 0x4060e5
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x406108
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [esp + 4]
mov edx, 0xff
xor eax, dword [0x417978]
mov ecx, dword [0x417978]
shr ecx, 8
and eax, edx
mov eax, dword [eax*4 + 0x415090]
xor eax, ecx
mov dword [0x417978], eax
and eax, edx
add dword [0x41797c], eax
mov eax, dword [0x41797c]
imul eax, eax, 0x8088405
inc eax
mov ecx, dword [0x417980]
shr ecx, 8
mov dword [0x41797c], eax
shr eax, 0x18
xor eax, dword [0x417980]
and eax, edx
mov eax, dword [eax*4 + 0x415090]
xor eax, ecx
mov dword [0x417980], eax
mov eax, dword [esp + 4]
ret
Function at 0x408ad2
Capabilities:
Get common file path
Get disk information
Get disk size
Get system information on windows

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
sub esp, 0x13c
push ebx
mov dword [ebp - 0x10], eax
mov ecx, dword [0x4305f0]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0xbc614e
cmp word [ecx + 0x77f0], ax
je 0x408b0a
mov eax, 1
jmp 0x408bc4
xor ebx, ebx
lea eax, [ebp - 0x38]
mov word [ebp - 0x18], bx
push eax
mov word [ebp - 0x16], bx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push 0x104
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x408b8e
mov byte [ebp - 0x13a], 0x5c
cmp byte [ebp - 0x13b], 0x3a
mov byte [ebp - 0x139], bl
je 0x408b58
mov byte [ebp - 0x13c], 0x43
mov byte [ebp - 0x13b], 0x3a
xor eax, eax
lea ecx, [ebp - 4]
push eax
push eax
push eax
lea edx, [ebp - 0x13c]
push eax
push ecx
push eax
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
lea ecx, [ebp - 0xc]
lea edx, [ebp - 0x14]
push ecx
lea eax, [ebp - 8]
push edx
lea ecx, [ebp - 0x10]
push eax
lea edx, [ebp - 0x13c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
movzx ecx, word [ebp - 0x18]
movzx eax, word [ebp - 0x16]
add ecx, eax
mov eax, dword [ebp - 0x10]
imul ecx, ecx, 0x10001
add eax, dword [ebp - 0xc]
add eax, dword [ebp - 8]
xor ecx, eax
mov eax, dword [0x4305f0]
xor ecx, dword [ebp - 4]
xor ecx, 0x52d2c330
sub ecx, dword [eax + 0x77e8]
cmp ecx, 1
sbb eax, eax
neg eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a034
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, 0x417b90
push esi
call fcn.004056e5
add esp, 4
push esi
call fcn.0040e930
add esp, 4
cmp byte [eax + 0x417b8f], 0x5c
jne 0x40a065
mov eax, 2
jmp 0x40a0fd
push 0x417b50
mov esi, 0x417b90
push esi
call fcn.0040f9f0
add esp, 8
test eax, eax
jne 0x40a093
test byte [0x417b56], 0x80
jne 0x40a093
push 0x180
push esi
call fcn.00413380
add esp, 8
mov esi, 0x417b90
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 2
je 0x40a0b4
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor al, 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
mov esi, 1
push eax
lea ecx, [ebp - 0xc]
push pe_nt_image_headers32
mov dword [ebp - 8], eax
push 2
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], 0xc
push ecx
push eax
push 0x40000000
push 0x417b90
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x417b20], eax
cmp eax, 0xffffffff
mov eax, esi
je 0x40a0fd
mov dword [0x417aec], 1
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40a181
Capabilities:
Encode data using xor

Disassembly:
cmp dword [0x4159fc], 0
push esi
push edi
jne 0x40a219
push 1
mov eax, dword [0x41fcb0]
push 0x2000
push eax
call fcn.0040b0a9
add esp, 0xc
mov dword [0x41fcb4], eax
cmp eax, 0xffffffff
je 0x40a219
mov eax, dword [0x41fcb0]
mov ecx, dword [0x4159c8]
mov dword [0x41fd24], eax
test byte [ecx + 0x28], 1
je 0x40a202
mov edi, dword [0x417b84]
inc edi
cmp edi, dword [0x41fcb4]
jl 0x40a1da
mov edi, dword [0x41fcb4]
mov esi, dword [0x41fcb0]
mov eax, edi
dec edi
test eax, eax
je 0x40a202
call fcn.00406170
xor byte [esi], al
movzx eax, byte [esi]
push eax
inc esi
call fcn.00406108
add esp, 4
mov eax, edi
dec edi
test eax, eax
jne 0x40a1e7
mov ecx, dword [0x41fd24]
dec dword [0x41fcb4]
inc dword [0x41fd24]
movzx eax, byte [ecx]
jmp 0x40a21e
mov eax, 0xffffffff
pop edi
pop esi
ret
Function at 0x40a221
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
sub esp, 8
mov ecx, dword [0x417af0]
cmp byte [0x41fd34], 0
push ebx
push esi
push edi
push ebp
je 0x40a241
mov eax, 0xbe
jmp 0x40a486
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
test ebp, ebp
lea edx, [ebp - 1]
je 0x40a26d
mov al, byte [esi]
inc esi
xor al, cl
movzx ebx, al
shr ecx, 8
mov eax, dword [ebx*4 + 0x415090]
xor eax, ecx
mov ecx, eax
mov eax, edx
dec edx
test eax, eax
jne 0x40a250
mov bl, 0x64
mov dword [0x417af0], ecx
add dword [0x43082c], ebp
mov eax, dword [0x43082c]
push eax
push dword [0x430824]
call fcn.00405636
add esp, 8
sub bl, al
mov ecx, dword [0x43082c]
mov byte [0x43083d], bl
cmp dword [0x430824], ecx
jne 0x40a2cb
mov eax, dword [0x417b00]
inc dword [0x417b08]
mov byte [0x43083d], 0x64
push eax
push dword [0x417b08]
call fcn.00405600
add esp, 8
mov byte [0x417b10], al
push 0x430820
push 0x406
call fcn.00408bc9
add esp, 8
cmp byte [0x41fd34], 0
je 0x40a2f0
mov eax, 0xbe
jmp 0x40a486
mov eax, dword [0x417b04]
add dword [0x417b0c], ebp
push eax
push dword [0x417b0c]
call fcn.00405600
add esp, 8
mov byte [0x417b11], al
push 0x417b00
push 0x96
call fcn.00408bc9
add esp, 8
cmp byte [0x41fd34], 0
je 0x40a334
mov eax, 0xbe
jmp 0x40a486
cmp dword [0x41fd50], 0
jne 0x40a484
test ebp, ebp
je 0x40a484
cmp dword [0x41fd10], 0
je 0x40a35c
mov eax, 0x32
jmp 0x40a486
mov eax, dword [0x4159c8]
test byte [eax + 0x28], 8
jne 0x40a38a
push ebp
push dword [esp + 0x20]
push dword [0x417b20]
call dword [sym.imp.KERNEL32.dll__lwrite]
cmp eax, ebp
je 0x40a484
call fcn.0040a48e
jmp 0x40a486
cmp dword [esp + 0x24], 0
je 0x40a3a1
mov dword [esp + 0x10], 0x1040
mov ebx, dword [0x417ac0]
jmp 0x40a3af
mov dword [esp + 0x10], 0x2000
mov ebx, dword [0x41fd3c]
xor eax, eax
cmp dword [0x4305f4], eax
je 0x40a3c3
mov dword [0x415a20], eax
mov dword [0x4305f4], eax
mov esi, dword [esp + 0x1c]
mov eax, esi
cmp byte [esi], 0xa
jne 0x40a3d8
cmp dword [0x415a20], 0
je 0x40a3d8
inc esi
mov edi, ebx
mov eax, dword [esp + 0x1c]
mov dword [0x415a20], 0
add eax, ebp
mov dword [esp + 0x14], eax
cmp esi, eax
jae 0x40a45e
mov al, byte [esi]
cmp al, 0xd
jne 0x40a425
mov eax, ebp
mov byte [edi], 0xd
inc edi
sub eax, esi
add eax, dword [esp + 0x1c]
mov byte [edi], 0xa
inc edi
cmp eax, 1
jne 0x40a419
mov dword [0x415a20], 1
jmp 0x40a435
lea eax, [esi + 1]
cmp byte [eax], 0xa
jne 0x40a435
mov esi, eax
jmp 0x40a435
cmp al, 0xa
jne 0x40a432
mov byte [edi], 0xd
inc edi
mov byte [edi], 0xa
jmp 0x40a434
mov byte [edi], al
inc edi
mov eax, dword [esp + 0x10]
lea ecx, [ebx + eax - 2]
cmp edi, ecx
jbe 0x40a457
sub edi, ebx
mov eax, dword [0x417b20]
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lwrite]
cmp eax, edi
jne 0x40a47d
mov edi, ebx
inc esi
cmp esi, dword [esp + 0x14]
jb 0x40a3f2
cmp ebx, edi
jae 0x40a484
sub edi, ebx
mov eax, dword [0x417b20]
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lwrite]
cmp eax, edi
je 0x40a484
call fcn.0040a48e
jmp 0x40a486
call fcn.0040a48e
jmp 0x40a486
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 8
ret
Function at 0x40b53e
Capabilities:
Set file attributes

Disassembly:
sub esp, 8
push ebx
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40b55d
lea eax, [esp + 0xc]
push eax
call fcn.0040b4ee
add esp, 4
mov esi, eax
jmp 0x40b561
mov esi, dword [esp + 0xc]
mov eax, dword [0x417b20]
xor ebx, ebx
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x417aec], ebx
test edi, edi
je 0x40b5ca
push ebx
push pe_nt_image_headers32
push 3
push ebx
push ebx
push 0x40000000
push 0x417b90
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov edi, eax
je 0x40b5b3
test esi, esi
je 0x40b5b3
lea eax, [esp + 0xc]
push eax
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4159c8]
mov eax, dword [eax + 0x24]
and eax, 0x7f
push eax
push 0x417b90
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
pop esi
pop ebx
add esp, 8
ret
Function at 0x40bef1
Capabilities:
Get disk information

Disassembly:
push ebp
mov eax, dword [esp + 8]
mov ebp, esp
add al, 0x40
sub esp, 4
mov byte [ebp - 4], al
mov byte [ebp - 3], 0x3a
mov byte [ebp - 2], 0x2f
mov byte [ebp - 1], 0
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
sub eax, 2
mov esp, ebp
cmp eax, 1
pop ebp
sbb eax, eax
neg eax
ret
Function at 0x40c787
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov eax, dword [0x4305f0]
mov ebp, esp
sub esp, 0x10
mov eax, dword [eax + 0x675c]
push esi
push edi
mov esi, 0xc80000
imul ax, ax, 0x56
movzx edi, ax
push 1
lea eax, [ebp - 0x10]
push esi
push eax
push 0x78
push edi
call fcn.00405aca
add esp, 0x14
mov eax, dword [0x4305e4]
push edi
push eax
push 0
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x10]
push eax
mov eax, dword [0x4305f0]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push esi
add eax, 0x14cc
push eax
push dword [0x415b18]
push 1
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov ecx, dword [0x4305f0]
push 5
mov dword [ecx], eax
mov ecx, dword [0x4305f0]
push dword [ecx]
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [0x4305f0]
push dword [ecx]
call dword [sym.imp.USER32.dll_UpdateWindow]
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40c8bb
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov eax, dword [0x4305f0]
mov ebp, esp
sub esp, 0x10
mov eax, dword [eax + 0x675c]
push esi
push edi
mov esi, 0xc80000
imul ax, ax, 0x3c
add ax, 0x50
push 1
movzx edi, ax
push esi
lea eax, [ebp - 0x10]
push eax
push 0x7f
push edi
call fcn.00405aca
add esp, 0x14
mov eax, dword [0x4305e4]
push edi
push eax
push 0
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x10]
push eax
mov eax, dword [0x4305f0]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push esi
add eax, 0x14cc
push eax
push dword [0x415b10]
push 1
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov esi, eax
push 5
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
push 1
push esi
call fcn.0040c524
add esp, 8
mov edi, eax
push esi
call dword [sym.imp.USER32.dll_DestroyWindow]
test edi, edi
jne 0x40c99b
mov eax, dword [0x4305f0]
add eax, 0x1f2
push eax
call fcn.0040e930
add esp, 4
test eax, eax
jle 0x40c997
mov ecx, dword [0x4305f0]
lea ecx, [ecx + eax + 0x1f1]
cmp byte [ecx], 0x5c
jne 0x40c997
cmp eax, 3
jne 0x40c994
mov eax, dword [0x4305f0]
cmp byte [eax + 0x1f3], 0x3a
je 0x40c997
mov byte [ecx], 0
xor eax, eax
jmp 0x40c9a0
mov eax, 0xbe
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40e8a8
Capabilities:
Enumerate gui resources

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
push edi
call fcn.004133e0
add esp, 4
lea eax, [edi + 0x64]
xor esi, esi
push eax
call fcn.004133e0
add esp, 4
push edi
mov dword [0x415b24], esi
push 0x40e844
call dword [sym.imp.USER32.dll_EnumWindows]
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x415b24], esi
jne 0x40e8c5
pop edi
pop esi
ret
Function at 0x40eaa0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
xor esi, esi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40ead6
cmp byte [esp + 5], 0x3a
jne 0x40ead6
xor eax, eax
mov al, byte [esp + 4]
push eax
call fcn.0040ee60
add esp, 4
lea esi, [eax - 0x40]
mov eax, esi
pop esi
add esp, 0x104
ret

Function at 0x40f450
Capabilities:
Terminate process

Disassembly:
mov dword [0x415f74], 1
cmp dword [esp + 8], 0
push ebx
push esi
mov ebx, dword [esp + 0x14]
mov byte [0x415f70], bl
jne 0x40f4ac
cmp dword [0x431a78], 0
je 0x40f49a
mov esi, dword [0x431a70]
sub esi, 4
cmp esi, dword [0x431a78]
jb 0x40f49a
mov eax, dword [esi]
test eax, eax
je 0x40f48f
call eax
sub esi, 4
cmp esi, dword [0x431a78]
jae 0x40f487
push 0x41501c
push 0x415014
call fcn.0040f4d0
add esp, 8
push 0x415024
push 0x415020
call fcn.0040f4d0
add esp, 8
test ebx, ebx
jne 0x40f4cd
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebx
ret

Function at 0x40f7f0
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
mov eax, 0
jne 0x40f80a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40f81d
push eax
call fcn.004101c0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x410ac0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
push esi
mov ebx, dword [esp + 0x118]
push edi
test ebx, ebx
je 0x410b33
push ebx
call fcn.00410bf0
add esp, 4
test eax, eax
jne 0x410b01
xor eax, eax
pop edi
mov dword [0x415f34], 0xf
mov dword [0x415f30], 0xd
pop esi
pop ebx
add esp, 0x10c
ret
add bl, 0x40
lea eax, [esp + 0x10]
mov byte [esp + 0xc], bl
push eax
lea ecx, [esp + 0x18]
lea ebx, [esp + 0x10]
mov byte [esp + 0x11], 0x3a
mov byte [esp + 0x12], 0x2e
mov byte [esp + 0x13], 0
push ecx
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x410b43
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x410be2
inc eax
cmp eax, 0x104
ja 0x410be2
mov edx, dword [esp + 0x120]
test edx, edx
jne 0x410b94
mov ecx, dword [esp + 0x124]
cmp eax, ecx
jg 0x410b6f
mov eax, ecx
push eax
call fcn.0040eb30
add esp, 4
mov edx, eax
test edx, edx
jne 0x410bb3
xor eax, eax
pop edi
mov dword [0x415f30], 0xc
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, dword [esp + 0x124]
jle 0x410bb3
xor eax, eax
pop edi
mov dword [0x415f30], 0x22
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, edx
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret

Function at 0x410bf0
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
sub esp, 4
test eax, eax
jne 0x410c04
mov eax, 1
add esp, 4
ret
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0x5c
mov byte [esp + 3], 0
add al, 0x40
mov byte [esp], al
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x410c36
cmp eax, 1
je 0x410c36
mov eax, 1
add esp, 4
ret
xor eax, eax
add esp, 4
ret
Function at 0x411060
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp dword [0x430950], edx
push ebx
push esi
push edi
push ebp
jbe 0x411267
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x430960
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ecx, dword [esp + 0x18]
shl eax, 3
mov ebx, dword [ecx]
mov ebp, eax
mov dword [esp + 0x1c], eax
mov al, byte [ebx + ebp + 4]
test al, 1
je 0x411267
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x4110c9
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x4110da
push 2
push 0
push edx
call fcn.00412cc0
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x411176
mov dword [esp + 0x10], 0
mov edi, dword [esp + 0x430]
mov eax, edi
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x4111af
lea ebx, [esp + 0x24]
mov eax, edi
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x41113d
mov al, byte [edi]
inc edi
cmp al, 0xa
jne 0x41112b
mov byte [ebx], 0xd
inc esi
inc ebx
mov byte [ebx], al
inc ebx
mov eax, ebx
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x411112
lea eax, [esp + 0x24]
push 0
sub ebx, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push ebx
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4111a5
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, ebx
jge 0x4110fd
jmp 0x4111af
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4111a5
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x4111af
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x411256
cmp dword [esp + 0x10], 0
je 0x411208
cmp dword [esp + 0x10], 5
jne 0x4111eb
mov dword [0x415f30], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x415f34], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.004101c0
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x411232
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x411232
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x415f30], 0x1c
mov dword [0x415f34], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, esi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x415f30], 9
mov dword [0x415f34], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x411b90
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
cmp dword [0x4166a0], 0
push ebx
push esi
push edi
push ebp
jne 0x411be0
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
call esi
mov edi, eax
test edi, edi
je 0x411bbe
mov dword [0x4166a0], 1
mov ebx, dword [esp + 0x10]
jmp 0x411bee
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x411bd6
mov dword [0x4166a0], 2
jmp 0x411bee
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x4166a0], 1
jne 0x411c9d
test edi, edi
jne 0x411c11
call esi
mov edi, eax
test edi, edi
jne 0x411c11
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x411c2b
add esi, 2
cmp word [esi], 0
jne 0x411c19
add esi, 2
cmp word [esi], 0
jne 0x411c19
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x411c8c
push ebp
call fcn.0040eb30
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x411c8c
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x411c7b
push ebx
call fcn.0040eb10
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x4166a0], 2
jne 0x411d21
test ebx, ebx
jne 0x411cc0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x411cc0
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x411cd5
inc ebp
cmp byte [ebp], 0
jne 0x411cc7
inc ebp
cmp byte [ebp], 0
jne 0x411cc7
sub ebp, ebx
inc ebp
push ebp
call fcn.0040eb30
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x411cfa
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret