joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41fc9a
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4c83e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
push edi
mov dword [ebp - 0x20], eax
call ebx
mov esi, eax
mov dword [ebp - 0x18], esi
call fcn.0041caf7
mov dword [ebp - 0x14], eax
cmp dword [0x4c9c7c], edi
jne 0x41fd8b
push 0x800
push edi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
test esi, esi
jne 0x41fd18
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x41fe6b
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x41fe6b
push str.MessageBoxW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41fe6b
push eax
call ebx
push str.GetActiveWindow
push esi
mov dword [0x4c9c7c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push esi
mov dword [0x4c9c80], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push esi
mov dword [0x4c9c84], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4c9c8c], eax
test eax, eax
je 0x41fd88
push str.GetProcessWindowStation
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4c9c88], eax
mov esi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x41fdb0
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x41fda3
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], edi
je 0x41fdc5
push 4
pop eax
jmp 0x41fe6d
cmp dword [ebp - 0x14], edi
je 0x41fdc5
push dword [0x4c9c7c]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x41fdaa
mov eax, dword [0x4c9c88]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, esi
je 0x41fe23
cmp dword [0x4c9c8c], esi
je 0x41fe23
push eax
call ebx
push dword [0x4c9c8c]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x41fe23
test eax, eax
je 0x41fe23
call ecx
test eax, eax
je 0x41fe18
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x41fe18
test byte [ebp - 8], 1
jne 0x41fe23
mov esi, dword [ebp + 0x10]
or esi, 0x200000
jmp 0x41fe53
mov eax, dword [0x4c9c80]
cmp eax, esi
je 0x41fe50
push eax
call ebx
test eax, eax
je 0x41fe50
call eax
mov edi, eax
test edi, edi
je 0x41fe50
mov eax, dword [0x4c9c84]
cmp eax, esi
je 0x41fe50
push eax
call ebx
test eax, eax
je 0x41fe50
push edi
call eax
mov edi, eax
mov esi, dword [ebp + 0x10]
push dword [0x4c9c7c]
call ebx
test eax, eax
je 0x41fe6b
push esi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push edi
call eax
jmp 0x41fe6d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00419c09
leave
ret
Function at 0x417ec0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
mov eax, section.sect_0
call 0x417ec0
lcall 0x5de5, 0x8b10c483
jmp loc.007bc7c0
Function at 0x401050
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x42a008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x424bd0
push 0x84
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
lea ecx, [ebp - 8]
mov dword [ebp - 8], esi
call fcn.004022a6
push str.net451
lea ecx, [ebp - 8]
call fcn.00401e95
test eax, eax
jne 0x40109e
inc esi
jmp 0x401148
push str.net452
lea ecx, [ebp - 8]
call fcn.00401e95
test eax, eax
jne 0x4010b6
push 2
jmp 0x401147
push str.net46
lea ecx, [ebp - 8]
call fcn.00401e95
test eax, eax
jne 0x4010cb
push 3
jmp 0x401147
push str.net461
lea ecx, [ebp - 8]
call fcn.00401e95
test eax, eax
jne 0x4010e0
push 4
jmp 0x401147
push str.net462
lea ecx, [ebp - 8]
call fcn.00401e95
test eax, eax
jne 0x4010f5
push 5
jmp 0x401147
push str.net47
lea ecx, [ebp - 8]
call fcn.00401e95
test eax, eax
jne 0x40110a
push 6
jmp 0x401147
push str.net471
lea ecx, [ebp - 8]
call fcn.00401e95
test eax, eax
jne 0x40111f
push 7
jmp 0x401147
push str.net472
lea ecx, [ebp - 8]
call fcn.00401e95
test eax, eax
jne 0x401134
push 8
jmp 0x401147
push str.net48
lea ecx, [ebp - 8]
call fcn.00401e95
test eax, eax
jne 0x401148
push 9
pop esi
lea ecx, [ebp - 8]
call fcn.00401ecc
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0040a3ad
leave
ret
Function at 0x4018d8
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x42a008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0xc]
push eax
push str.SeShutdownPrivilege
push 0x425110
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x401956
lea eax, [ebp - 0x20]
xor esi, esi
push eax
push 0x20
mov dword [ebp - 0x20], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x401956
mov eax, dword [ebp - 0xc]
push esi
push esi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
push 0x10
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
push eax
push esi
push dword [ebp - 0x20]
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x10], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x401965
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040a3ad
leave
ret
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
setne al
jmp 0x401958

Function at 0x401c04
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push esi
mov esi, ecx
test edx, edx
jne 0x401c16
push 0xd
pop eax
jmp 0x401c47
mov ecx, edx
push ebx
push edi
xor ebx, ebx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x401c1f
sub ecx, edi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push ebx
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop ebx
pop esi
pop ebp
ret 0xc

Function at 0x4023b7
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4023d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4023d3
cmp eax, 3
jne 0x4023d6
xor al, al
ret
mov al, 1
ret
Function at 0x4023d9
Capabilities:
Get common file path
Get session user name

Disassembly:
push 0x820
mov eax, 0x41de70
call fcn.0041d66e
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x104
lea ecx, [ebp - 0x420]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x420]
mov dword [ebp - 0x828], ebx
push eax
lea ecx, [ebp - 0x828]
call fcn.004022a6
mov dword [ebp - 4], ebx
push 0x5c
push dword [ebp - 0x828]
mov dword [ebp - 0x824], ebx
call fcn.0040b763
pop ecx
pop ecx
test eax, eax
jne 0x40243d
or eax, 0xffffffff
jmp 0x402445
sub eax, dword [ebp - 0x828]
sar eax, 1
lea ecx, [ebp - 0x420]
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x824]
call fcn.004022a6
push ecx
push ecx
lea ecx, [ebp - 0x824]
mov byte [ebp - 4], 1
call fcn.00402641
lea eax, [ebp - 0x218]
push eax
push ebx
push ebx
push 0x1c
push ebx
mov ebx, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
call ebx
lea edi, [ebp - 0x218]
sub edi, 2
xor ecx, ecx
mov ax, word [edi + 2]
lea edi, [edi + 2]
cmp ax, cx
jne 0x40248a
mov eax, dword [0x42694c]
mov edx, dword [ebp - 0x824]
mov esi, edx
mov dword [edi], eax
mov ax, word [edx]
add edx, 2
cmp ax, cx
jne 0x4024a5
lea edi, [ebp - 0x218]
sub edx, esi
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, cx
jne 0x4024bb
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x218]
call fcn.004023b7
test al, al
jne 0x4025d0
lea eax, [ebp - 0x218]
mov dword [ebp - 0x82c], 0x200
push eax
xor eax, eax
push eax
push eax
push 0x23
push eax
call ebx
lea eax, [ebp - 0x82c]
push eax
lea eax, [ebp - 0x820]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea edi, [ebp - 0x218]
sub edi, 2
xor ebx, ebx
mov ax, word [edi + 2]
lea edi, [edi + 2]
cmp ax, bx
jne 0x402521
mov edx, dword [0x42694c]
mov eax, dword [ebp - 0x824]
mov esi, eax
mov dword [edi], edx
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40253d
lea edi, [ebp - 0x218]
sub eax, esi
sub edi, 2
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x402553
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x218]
sub edi, 2
mov ax, word [edi + 2]
lea edi, [edi + 2]
cmp ax, bx
jne 0x402576
mov dword [edi], edx
lea edx, [ebp - 0x820]
mov esi, edx
mov ax, word [edx]
add edx, 2
cmp ax, bx
jne 0x40258c
lea edi, [ebp - 0x218]
sub edx, esi
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x4025a2
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x218]
call fcn.004023b7
test al, al
jne 0x4025d2
xor ebx, ebx
inc ebx
jmp 0x4025d2
xor ebx, ebx
lea ecx, [ebp - 0x824]
call fcn.00401ecc
lea ecx, [ebp - 0x828]
call fcn.00401ecc
mov al, bl
call fcn.0041d618
ret
Function at 0x4042c9
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test edx, edx
jne 0x4042d4
xor eax, eax
pop ebp
ret
push esi
mov esi, dword [ebp + 8]
not ecx
cmp esi, 8
jb 0x404390
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4251a0]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4251a0]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4251a0]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4251a0]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4251a0]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4251a0]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4251a0]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4251a0]
sub edi, 1
jne 0x4042e9
pop edi
test esi, esi
je 0x4043ac
movzx eax, byte [edx]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4251a0]
inc edx
sub esi, 1
jne 0x404394
not ecx
mov eax, ecx
pop esi
pop ebp
ret

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

Disassembly:
push esi
push edi
mov edi, ecx
movsx eax, dl
mov esi, dword [edi]
xor eax, esi
mov ecx, dword [edi + 8]
movzx eax, al
shr esi, 8
mov eax, dword [eax*4 + 0x4251a0]
xor eax, esi
mov dword [edi], eax
movzx eax, al
add eax, dword [edi + 4]
imul eax, eax, 0x8088405
inc eax
mov dword [edi + 4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4251a0]
mov dword [edi + 8], ecx
pop edi
pop esi
ret

Function at 0x404a37
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x42a008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, dword [ebp + 0xc]
mov eax, ecx
mov ebx, edx
mov dword [ebp - 8], eax
mov ecx, ebx
imul ecx, dword [ebp + 8]
cmp byte [edi], 0
je 0x404a7b
push 0
lea edx, [ebp - 8]
push edx
push ecx
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404a76
mov byte [edi + 8], 1
mov eax, dword [ebp - 8]
jmp 0x404aa5
mov edx, dword [edi + 0x1c]
push esi
mov esi, dword [edi + 0x18]
sub esi, edx
lea eax, [edx + ecx]
cmp eax, dword [edi + 0x18]
cmovbe esi, ecx
mov ecx, dword [edi + 0x14]
push esi
add ecx, edx
push ecx
push dword [ebp - 8]
call fcn.0040d960
add esp, 0xc
mov eax, esi
add dword [edi + 0x1c], esi
pop esi
mov ecx, dword [ebp - 4]
xor edx, edx
div ebx
pop edi
xor ecx, ebp
pop ebx
call fcn.0040a3ad
leave
ret
Function at 0x40564c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi], ebx
jne 0x4056ef
cmp dword [esi + 4], 0xffffffff
jne 0x4056ef
push edi
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40567f
sub ecx, edx
sar ecx, 1
movzx eax, word [esi + ecx*2 + 0x242]
cmp eax, 0x5c
je 0x4056b3
cmp eax, 0x2f
je 0x4056b3
push 0x42694c
push 0x104
push edi
call fcn.0040e1d3
add esp, 0xc
push 0x20
call fcn.0040a648
pop ecx
mov ecx, dword [ebp + 8]
mov dword [eax + 0x14], ecx
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0x18], ecx
mov ecx, eax
mov word [eax], 0x100
mov byte [eax + 0x10], bl
mov dword [eax + 0x1c], ebx
mov dword [eax + 0xc], ebx
call fcn.00404ced
xor ecx, ecx
mov dword [esi], eax
test eax, eax
mov edx, 0x200
pop edi
cmove ecx, edx
mov eax, ecx
jmp 0x4056f4
mov eax, 0x1000000
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x405cdd
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x42a008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
mov ebx, edx
test edi, edi
je 0x405d0f
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x405d0f
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx eax, word [ebx]
test ax, ax
je 0x405dcc
push esi
mov esi, ebx
mov ecx, ebx
mov edx, eax
cmp dx, 0x2f
je 0x405d2e
cmp dx, 0x5c
jne 0x405d30
mov esi, ecx
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x405d22
cmp esi, ebx
je 0x405d76
sub esi, ebx
lea eax, [ebp - 0x414]
and esi, 0xfffffffe
push esi
push ebx
push eax
call fcn.0040d960
add esp, 0xc
cmp esi, 0x208
jae 0x405dda
xor eax, eax
lea edx, [ebp - 0x414]
mov ecx, edi
mov word [ebp + esi - 0x414], ax
call fcn.00405cdd
xor eax, eax
mov esi, 0x104
mov word [ebp - 0x20c], ax
test edi, edi
je 0x405d99
push edi
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0040e16f
add esp, 0xc
push ebx
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0040e1d3
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
pop esi
cmp eax, 0xffffffff
jne 0x405dcc
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.0040a3ad
leave
ret
call fcn.0040a510
int3
Function at 0x406221
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x42a008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x64
xor ebx, ebx
lea eax, [ebp - 0x7c]
push ebx
push eax
mov esi, edx
mov edi, ecx
call fcn.0040c010
pop ecx
pop ecx
lea ecx, [ebp - 0x7c]
call fcn.00401c8d
xor ecx, ecx
mov dword [ebp - 0x10], str.Open_Setup_Log
inc ecx
mov dword [ebp - 8], str.Close
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x50], ecx
push 2
pop edx
mov dword [ebp - 0xc], edx
test esi, esi
jne 0x406279
lea eax, [ebp - 0xc]
mov dword [ebp - 0x58], ecx
jmp 0x40627f
lea eax, [ebp - 0x14]
mov dword [ebp - 0x58], edx
and dword [ebp - 0x70], 0xfffffffd
mov dword [ebp - 0x54], eax
mov eax, dword [edi]
push ecx
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x18]
push ecx
push eax
mov dword [ebp - 0x60], str.Installation_has_failed
mov dword [ebp - 0x64], 0xfffe
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
lea ecx, [ebp - 0x7c]
call fcn.00401a3f
test eax, eax
js 0x4062c9
cmp dword [ebp - 0x18], 1
jne 0x4062c9
test esi, esi
je 0x4062c9
push 5
push ebx
push ebx
push esi
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a3ad
leave
ret
Function at 0x4071ef
Capabilities:
Get common file path

Disassembly:
push 0x29c
mov eax, 0x41e0cc
call fcn.0041d66e
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x278]
call fcn.00407615
and dword [ebp - 4], 0
lea ecx, [ebp - 0x260]
push str._version.dll
mov edx, eax
call fcn.00407688
pop ecx
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 2
call fcn.004075ea
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x290]
call fcn.00407615
push str.logoncli.dll
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x248]
call fcn.00407688
pop ecx
lea ecx, [ebp - 0x290]
mov byte [ebp - 4], 5
call fcn.004075ea
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x2a8]
call fcn.00407615
push str._sspicli.dll
mov edx, eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x230]
call fcn.00407688
pop ecx
lea ecx, [ebp - 0x2a8]
call fcn.004075ea
cmp dword [ebp - 0x24c], 8
lea eax, [ebp - 0x260]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmovae eax, dword [ebp - 0x260]
push eax
call esi
cmp dword [ebp - 0x234], 8
lea eax, [ebp - 0x248]
cmovae eax, dword [ebp - 0x248]
push eax
call esi
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call esi
lea ecx, [ebp - 0x230]
call fcn.004075ea
lea ecx, [ebp - 0x248]
call fcn.004075ea
lea ecx, [ebp - 0x260]
call fcn.004075ea
call fcn.0041d618
ret
Function at 0x409568
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0x424
mov eax, 0x41e23f
call fcn.0041d6dc
mov eax, dword [ebp + 0xc]
xor esi, esi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x20], esi
push 0x404
lea eax, [ebp - 0x424]
mov dword [ebp - 4], esi
push esi
push eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], esi
call fcn.0040c010
add esp, 0xc
mov dword [ebp - 0x424], esi
push 0x60
push esi
push ebx
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
mov dword [ebp - 0x430], edi
test edi, edi
jne 0x4095f1
push 2
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
mov dword [ebp - 0x430], eax
test edi, edi
jne 0x4095f1
call fcn.00401c76
mov esi, eax
jmp 0x4096f4
push dword [ebp - 0x428]
push dword [ebp - 0x42c]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
jne 0x409614
call fcn.00401c76
jmp 0x4096e7
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x428], eax
test eax, eax
je 0x40960a
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
mov dword [ebp - 0x42c], ebx
lea eax, [ebx + 1]
cmp eax, ebx
jae 0x409647
mov esi, 0x8007000e
jmp 0x4096e9
push 2
pop ecx
mul ecx
mov byte [ebp - 4], cl
cmp edx, esi
ja 0x409717
jb 0x409662
cmp eax, 0xffffffff
ja 0x409717
cmp eax, 0x400
jbe 0x409677
push eax
lea ecx, [ebp - 0x424]
call fcn.00407f38
jmp 0x409699
lea eax, [ebp - 0x420]
mov dword [ebp - 0x424], eax
jmp 0x409699
mov dword [ebp - 4], 1
cmp dword [ebp - 0x424], 0
je 0x40963d
push ebx
push dword [ebp - 0x424]
push ebx
push dword [ebp - 0x428]
push esi
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
test ecx, ecx
je 0x40960a
mov eax, dword [ebp - 0x424]
xor edx, edx
push dword [ebp + 0x14]
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x1c]
push dword [ebp - 0x424]
call fcn.00409413
mov esi, eax
test edi, edi
je 0x4096f4
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x420]
cmp dword [ebp - 0x424], eax
je 0x40970d
lea ecx, [ebp - 0x424]
call fcn.00407f23
mov eax, esi
call fcn.0041d629
ret 0x10
push 0x80070216
call fcn.004021d4
int3

Function at 0x416575
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004161ee
Function at 0x402694
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x4026d1
xor eax, eax
mov al, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
push esp
call sub.kernel32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
test bl, bl
je 0x4026f1
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.004042c4
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x402870
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404080
test esi, esi
jne 0x4028a6
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00404170
jmp 0x4028c4
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402784
mov edi, eax
test esi, esi
je 0x4028c4
cmp dword [ebx], 0
je 0x4028c4
dec esi
jmp 0x4028ad
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x402e68
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x40e008], 0x8088405
inc edx
mov dword [ebx + 0x40e008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x4035a0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x40e010]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403638
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403618
xor eax, eax
push ebp
push 0x403611
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403654
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403618
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x40e010]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x40e010], ax
mov esp, ebp
pop ebp
ret

Function at 0x403f04
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x40f044], 0
je 0x403f65
cmp word [0x40f218], 0xd7b2
jne 0x403f2d
cmp dword [0x40f220], 0
jbe 0x403f2d
mov eax, 0x40f214
call dword [0x40f230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x40e074
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x403f8c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x40e01c], 0
jne 0x403f81
push 0
push 0x40e094
push 0x40e074
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret