joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405db9
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x20002
push 8
push dword [0x423538]
call edi
mov ebx, eax
xor eax, eax
cmp ebx, eax
mov dword [ebp - 0x14], ebx
je 0x405f89
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0xffff
push ebx
push eax
push eax
push eax
call esi
test eax, eax
jbe 0x405f82
lea ecx, [eax + 1]
mov eax, ebx
call fcn.0040d65e
test al, al
je 0x405f82
push 0xc0c
push 8
push dword [0x423538]
call edi
mov edi, eax
test edi, edi
mov dword [ebp - 0x10], edi
je 0x405f82
lea eax, [edi + 0x3fc]
mov dword [ebp - 8], eax
add eax, 0x1fe
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x74]
push eax
mov edx, 0x402270
mov dword [ebp - 4], ebx
call fcn.0040779f
pop ecx
lea eax, [ebp - 0x34]
push eax
mov edx, 0x402260
call fcn.0040779f
pop ecx
lea eax, [ebp - 0x24]
push eax
mov edx, 0x402254
call fcn.0040779f
pop ecx
lea eax, [ebp - 0x48]
push eax
mov edx, 0x402240
call fcn.0040779f
pop ecx
lea eax, [ebp - 0x5c]
push eax
mov edx, 0x40222c
call fcn.0040779f
pop ecx
mov ebx, 0xff
lea eax, [ebp - 0x74]
push eax
push dword [ebp - 4]
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x405f62
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 4]
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x405f62
push dword [ebp + 8]
push ebx
push edi
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
call esi
test eax, eax
jbe 0x405f62
push dword [ebp + 8]
lea eax, [edi + 0x1fe]
push ebx
push eax
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 4]
call esi
test eax, eax
jbe 0x405f62
push dword [ebp + 8]
lea eax, [ebp - 0x5c]
push ebx
push dword [ebp - 8]
push 0
push eax
push dword [ebp - 4]
call esi
test eax, eax
jbe 0x405f62
push dword [ebp - 8]
call fcn.00405c46
test eax, eax
pop ecx
jle 0x405f62
lea eax, [ebp - 0x94]
push eax
mov edx, 0x4023c8
call fcn.0040779f
pop ecx
push edi
push dword [ebp - 8]
mov edi, dword [ebp - 0xc]
push dword [ebp - 0x18]
lea eax, [ebp - 0x94]
push eax
mov edx, 0x307
call fcn.0040d5e2
add esp, 0x10
test eax, eax
jle 0x405f5f
push edi
mov edi, dword [ebp + 0xc]
mov ecx, edi
call fcn.0040d1f4
test al, al
pop ecx
je 0x405f5f
inc dword [edi + 4]
mov edi, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
push 1
call fcn.0040d67e
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jne 0x405e97
push edi
call fcn.0040d023
mov ebx, dword [ebp - 0x14]
pop ecx
push ebx
call fcn.0040d023
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405fdf
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.0040d086
lea eax, [ebp - 0x100]
mov ebx, 0x4021e8
push eax
mov edx, ebx
call fcn.0040779f
pop ecx
lea eax, [ebp - 0x6c]
push eax
mov edx, 0x4021cc
call fcn.0040779f
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.0040a654
add esp, 0xc
cmp eax, 0xffffffff
je 0x406078
test eax, eax
jbe 0x406078
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.00405db9
pop ecx
pop ecx
lea eax, [ebp - 0x510]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp dword [ebp - 8], 0
jne 0x4061cd
lea eax, [ebp - 0x40]
push eax
mov edx, 0x40219c
call fcn.0040779f
pop ecx
lea eax, [ebp - 0x9c]
push eax
mov edx, 0x402178
call fcn.0040779f
pop ecx
lea eax, [ebp - 0x54]
push eax
mov edx, 0x402164
call fcn.0040779f
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 0x40614e
cmp edi, 0x24
jne 0x406129
xor edi, edi
push edi
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x308]
push eax
call fcn.00405d72
add esp, 0xc
mov word [ebp - 0x302], di
jmp 0x40612b
xor edi, edi
push edi
push edi
push edi
lea eax, [ebp - 0xc]
push eax
push 0x405f8e
push 2
push 3
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x308]
push eax
call fcn.0040a40d
add esp, 0x24
inc dword [ebp - 4]
cmp dword [ebp - 4], 4
jb 0x4060e7
cmp dword [ebp - 8], 0
jne 0x4061cd
lea eax, [ebp - 0xb8]
push eax
mov edx, ebx
call fcn.0040779f
pop ecx
lea eax, [ebp - 0x40]
push eax
mov edx, 0x4021b4
call fcn.0040779f
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.0040a654
add esp, 0xc
cmp eax, 0xffffffff
je 0x4061c9
test eax, eax
jbe 0x4061c9
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.00405d72
add esp, 0xc
cmp dword [ebp - 8], 0
jbe 0x4061d9
mov esi, dword [ebp - 0xc]
call fcn.00405767
jmp 0x4061e2
push dword [ebp - 0xc]
call fcn.0040d023
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4064b6
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, 0x4020f8
call fcn.0040779f
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.0040d086
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 0x406536
push esi
push esi
push esi
lea eax, [ebp - 8]
push eax
push 0x4061e7
push 2
push 1
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x238]
push eax
call fcn.0040a40d
add esp, 0x24
inc edi
cmp edi, 3
jb 0x4064fb
cmp dword [ebp - 4], esi
jbe 0x40654b
mov esi, dword [ebp - 8]
call fcn.00405767
jmp 0x406554
push dword [ebp - 8]
call fcn.0040d023
pop ecx
pop edi
pop esi
leave
ret

Function at 0x406558
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.0040d05f
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 0x4065ac
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 0x406599
pop esi
and word [edi + eax*2], 0
leave
ret
Function at 0x406841
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.0040d54d
cdq
sub eax, edx
mov esi, eax
sar esi, 1
cmp esi, 0xff
jge 0x4068f3
lea ecx, [ebp - 0x100]
mov eax, edi
call fcn.0040d41c
test al, al
je 0x4068f3
xor eax, eax
test esi, esi
jle 0x40688a
xor byte [ebp + eax - 0x100], 0x5c
inc eax
cmp eax, esi
jl 0x40687d
mov bl, byte [ebp - 0x100]
cmp bl, 0xff
jne 0x4068a3
mov bl, byte [ebp - 0xfe]
lea eax, [ebp - 0xfd]
jmp 0x4068a9
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 0x4068f3
cmp eax, dword [ebp + 8]
jl 0x4068f3
cmp byte [ebp - 0x100], 0xff
jne 0x4068d5
add ecx, dword [ebp + 8]
sub bl, byte [ebp + 8]
movzx eax, bl
xor edx, edx
test eax, eax
jle 0x4068ec
movzx si, byte [edx + ecx]
mov word [edi + edx*2], si
inc edx
cmp edx, eax
jl 0x4068de
and word [edi + eax*2], 0
jmp 0x4068f5
xor eax, eax
pop esi
pop ebx
leave
ret
Function at 0x406e5b
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, 0x401f98
call fcn.0040779f
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.0040d086
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 0x406edb
push esi
push esi
push esi
lea eax, [ebp - 8]
push eax
push 0x406b95
push 2
push 1
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.0040a40d
add esp, 0x24
inc edi
cmp edi, 3
jb 0x406ea0
cmp dword [ebp - 4], esi
jbe 0x406ef0
mov esi, dword [ebp - 8]
call fcn.00405767
jmp 0x406ef9
push dword [ebp - 8]
call fcn.0040d023
pop ecx
pop edi
pop esi
leave
ret
Function at 0x4074ff
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.0040d086
lea eax, [ebp - 0x128]
push eax
mov edx, 0x401ef8
call fcn.0040779f
lea eax, [ebp - 0xb8]
push eax
mov edx, 0x401e70
call fcn.0040779f
lea eax, [ebp - 0x54]
push eax
mov edx, 0x401ecc
call fcn.0040779f
lea eax, [ebp - 0x2c]
push eax
mov edx, 0x401e60
call fcn.0040779f
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.0040a654
add esp, 0xc
cmp eax, 0xffffffff
je 0x4075cc
test eax, eax
jbe 0x4075cc
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.00407244
pop ecx
pop ecx
add esi, 4
dec dword [ebp - 4]
jne 0x407584
cmp dword [ebp - 8], 0
jbe 0x4075e4
mov esi, dword [ebp - 0xc]
call fcn.00405767
jmp 0x4075ed
push dword [ebp - 0xc]
call fcn.0040d023
pop ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x408ce9
Capabilities:
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004
call fcn.0040e800
push ebx
push edi
push 0x400
lea eax, [ebp - 0x1004]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push esi
call fcn.004076eb
pop ecx
xor ebx, ebx
inc eax
xor ecx, ecx
cmp esi, ebx
je 0x408d3c
cmp eax, ebx
jbe 0x408d3c
mov byte [ebp - 0x804], bl
cmp word [esi + ecx*2], bx
mov dl, byte [esi + ecx*2]
mov byte [ebp + ecx - 0x804], dl
je 0x408d3c
inc ecx
cmp ecx, eax
jb 0x408d27
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x408d63
xor eax, eax
jmp 0x408d88
push ebx
lea eax, [ebp - 4]
push eax
push esi
call fcn.004076eb
pop ecx
push eax
lea eax, [ebp - 0x804]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
pop edi
pop ebx
leave
ret
Function at 0x408d8c
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 0x408dbf
xor eax, eax
jmp 0x408df4
push edi
push dword [ebp + 0x14]
call fcn.004076eb
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 0x409193
Capabilities:
Check internet connectivity via wininet
Create http request

Disassembly:
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
je 0x4091a2
xor eax, eax
ret
push 0
push 0
push 0
push 1
push 0x4025fc
call dword [sym.imp.WININET.dll_InternetOpenW]
xor ecx, ecx
test eax, eax
setne cl
mov dword [0x4104d4], eax
mov eax, ecx
ret
Function at 0x4092d9
Capabilities:
Delete file
Download and write a file
Get file size
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, 0x814
push ebx
xor ebx, ebx
cmp dword [ebp + 0x14], ebx
push esi
mov dword [ebp - 4], ebx
je 0x4092f7
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push 0x80
push 4
push ebx
push ebx
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 8], esi
jne 0x409326
mov eax, dword [ebp + 0x10]
or dword [eax], 1
xor eax, eax
jmp 0x409443
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
mov edi, dword [ebp + 0x10]
jne 0x409353
or dword [edi], 2
cmp dword [ebp + 0x14], ebx
je 0x409348
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x409353
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
push ebx
push 0x80000000
push ebx
push ebx
push dword [ebp + 8]
push dword [0x4104d4]
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
cmp esi, ebx
mov dword [ebp + 0x14], esi
jne 0x409384
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [edi], 4
jmp 0x409440
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
cmp dword [ebp - 4], ebx
je 0x4093b6
push ebx
push ebx
push ebx
push dword [ebp - 4]
push esi
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
cmp eax, 0xffffffff
je 0x4093b6
push ebx
push ebx
push dword [ebp - 4]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
push eax
mov edi, 0x800
push edi
lea eax, [ebp - 0x814]
push eax
push esi
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
jmp 0x4093fc
cmp dword [ebp - 0xc], ebx
je 0x409406
push ebx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x814]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 0x814]
push eax
push dword [ebp + 0x14]
call esi
cmp eax, 1
mov dword [ebp - 4], eax
je 0x4093d0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0x14]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 4], 1
jne 0x40943a
cmp dword [ebp + 0x18], ebx
je 0x409435
push dword [ebp + 0x18]
push dword [ebp + 0xc]
call fcn.004096a0
cmp eax, 1
pop ecx
pop ecx
jne 0x40943a
xor eax, eax
inc eax
jmp 0x409442
mov eax, dword [ebp + 0x10]
or dword [eax], 4
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4096a0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
xor esi, esi
push esi
push esi
push 3
push esi
push esi
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4096c8
xor eax, eax
jmp 0x40970f
push edi
push esi
push ebx
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]
push esi
lea ecx, [ebp - 4]
push ecx
push edi
push eax
push ebx
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], edi
je 0x4096fc
xor eax, eax
jmp 0x40970e
mov edx, dword [ebp - 8]
push edi
call fcn.00409643
sub eax, dword [ebp + 0xc]
pop ecx
neg eax
sbb eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x409985
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 0x409ad0
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 0x4099db
push 2
pop eax
jmp 0x409ad3
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 0x409ad0
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 0x409ad0
cmp dword [ebp - 8], edi
jne 0x409ad0
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.00407a90
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 0x409ad3
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x409ad8
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x1000
call fcn.0040e800
push ebx
push ebp
push esi
push edi
mov ebx, 0x400
push ebx
lea eax, [esp + 0x814]
xor edi, edi
push eax
push edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
lea eax, [esp + 0x14]
push eax
push dword [esi*4 + 0x410040]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x814]
push eax
call fcn.00409985
test eax, eax
pop ecx
pop ecx
je 0x409b79
cmp eax, 1
jne 0x409b45
push 4
call ebp
lea eax, [eax + edi + 0xf4240]
push eax
push 4
jmp 0x409b58
cmp eax, 2
jne 0x409b60
push 4
call ebp
lea eax, [eax + edi + 0xf4240]
push eax
push 5
call fcn.0040c2d9
add esp, 0xc
inc esi
add edi, 0xf4240
cmp esi, 2
jl 0x409b05
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1000
ret
lea eax, [esi + 1]
jmp 0x409b6e

Function at 0x409b7e
Capabilities:
Create process on windows
Resume thread

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.0040e780
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push esi
push esi
push 0x24
push esi
push esi
push esi
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
pop esi
jne 0x409bb6
leave
ret
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
xor eax, eax
inc eax
leave
ret

Function at 0x409e95
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2000
call fcn.0040e800
push esi
push edi
mov esi, 0x1000
push esi
lea eax, [ebp - 0x2000]
push eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x409ecb
lea edx, [ebp - 0x2000]
call fcn.00409178
jmp 0x409ed9
lea eax, [ebp - 0x2000]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, 0x402658
lea eax, [ebp - 0x2000]
call fcn.0040777b
cmp dword [ebp + 8], edi
push 4
pop eax
je 0x409ef4
push 3
pop eax
push edi
push 2
push eax
push edi
push edi
push 0xc0000000
lea eax, [ebp - 0x2000]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
pop edi
mov dword [0x4100ac], eax
pop esi
mov eax, ecx
leave
ret
Function at 0x409f1f
Capabilities:
Encode data using xor
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
cmp dword [0x4100ac], 0xffffffff
jne 0x409f43
push 0
call fcn.00409e95
cmp dword [0x4100ac], 0xffffffff
pop ecx
jne 0x409f43
xor eax, eax
leave
ret
push ebx
push esi
push edi
push dword [ebp + 0xc]
call fcn.004076eb
push dword [ebp + 0x10]
mov esi, eax
call fcn.004076eb
mov edx, dword [ebp + 0xc]
mov ebx, eax
lea eax, [ebp - 0x68]
push eax
call fcn.0040779f
add esp, 0xc
push 0xa
pop ecx
cmp esi, ecx
jae 0x409f81
sub ecx, esi
xor eax, eax
shr ecx, 1
lea edi, [ebp + esi*2 - 0x68]
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edx, dword [ebp + 0x10]
lea eax, [ebp - 0x54]
push eax
call fcn.0040779f
pop ecx
push 0x32
lea eax, [ebx + 0xa]
pop ecx
cmp eax, ecx
jae 0x409fa9
sub ecx, eax
lea edi, [ebp + eax*2 - 0x68]
xor eax, eax
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
xor esi, esi
xor eax, eax
xor byte [ebp + eax - 0x68], 0x78
inc eax
cmp eax, 0x64
jb 0x409fad
mov eax, dword [ebp + 8]
imul eax, eax, 0x64
push esi
push esi
push eax
push dword [0x4100ac]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 4]
push eax
push 0x64
lea eax, [ebp - 0x68]
push eax
push dword [0x4100ac]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x409fe9
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
cmp dword [0x4100ac], 0xffffffff
push esi
mov esi, eax
jne 0x40a010
push 1
call fcn.00409e95
cmp dword [0x4100ac], 0xffffffff
pop ecx
jne 0x40a010
xor eax, eax
jmp 0x40a081
push edi
imul esi, esi, 0x64
xor edi, edi
push edi
push edi
push esi
push dword [0x4100ac]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea eax, [ebp - 4]
push eax
push 0x64
lea eax, [ebp - 0x6c]
push eax
push dword [0x4100ac]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a07e
cmp dword [ebp - 4], 0x64
jne 0x40a07e
xor eax, eax
xor byte [ebp + eax - 0x6c], 0x78
inc eax
cmp eax, 0x64
jb 0x40a048
cmp word [ebx], di
mov word [ebp - 8], di
je 0x40a06d
push ebx
lea ecx, [ebp - 0x6c]
call fcn.0040772d
pop ecx
lea ecx, [ebp - 0x6c]
cmp eax, ecx
jne 0x40a07e
push dword [ebp + 8]
lea edx, [ebp - 0x58]
call fcn.0040779f
xor eax, eax
pop ecx
inc eax
jmp 0x40a080
xor eax, eax
pop edi
pop esi
leave
ret