joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403780
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x42a130]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
call ebx
mov ecx, dword [0x42b34c]
mov dword [ebp - 0x24], eax
test ecx, ecx
je 0x4037b5
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xf01ff
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [0x42b34c], eax
test eax, eax
jne 0x4037dc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004077dc
mov esp, ebp
pop ebp
ret
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x4037f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x403844
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x20]
push eax
push dword [0x42b34c]
mov edi, 1
call esi
test eax, eax
je 0x403844
mov eax, dword [ebp - 0x1c]
cmp eax, 4
je 0x403846
cmp eax, 1
je 0x403844
call ebx
sub eax, dword [ebp - 0x24]
cmp eax, 0xea60
ja 0x403880
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push dword [0x42b34c]
call esi
test eax, eax
jne 0x403813
xor edi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x42b34c]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
mov dword [0x42b34c], 0
call ebx
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004077dc
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x41d
call ebx
xor edi, edi
jmp 0x40384c

Function at 0x4038a0
Capabilities:
Check for time delay via gettickcount
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x42a130]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0xf01ff
push esi
push edi
mov dword [ebp - 0x24], eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x4038e4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004077dc
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov edi, eax
test edi, edi
je 0x403941
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x20]
push eax
push esi
call ebx
test eax, eax
je 0x40393e
lea esp, [esp]
cmp dword [ebp - 0x1c], 1
je 0x403940
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x24]
cmp eax, 0xea60
ja 0x403933
lea eax, [ebp - 0x20]
push eax
push esi
call ebx
test eax, eax
jne 0x403910
jmp 0x40393e
push 0x41d
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor edi, edi
pop ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.004077dc
mov esp, ebp
pop ebp
ret
Function at 0x403960
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push 0xf003f
push 0
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [ebp + 0xc]
mov ebx, eax
push esi
push ebx
call fcn.004038a0
add esp, 8
push 0xf01ff
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x4039a5
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
mov eax, 1
pop ebx
pop ebp
ret

Function at 0x4039e0
Capabilities:
Encrypt data using aes via winapi
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push 0x421094
call fcn.00402eb0
mov ebx, dword [ebp + 0xc]
push ebx
call fcn.00403be0
add esp, 8
test eax, eax
je 0x403a9c
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi]
lea eax, [esi + 0x13]
push eax
mov dword [ebp - 0xc], eax
call fcn.00407316
push esi
push dword [edi + 8]
mov dword [ebp - 8], eax
push eax
call fcn.004077f0
mov ecx, dword [edi]
add esp, 0x10
mov esi, dword [ebp - 8]
movdqu xmm0, xmmword [0x4210bc]
movdqu xmmword [ecx + esi], xmm0
mov ax, word [0x4210cc]
mov word [ecx + esi + 0x10], ax
mov al, byte [0x4210ce]
mov byte [ecx + esi + 0x12], al
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0x8004
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
pop edi
test eax, eax
je 0x403a9c
push 0
push dword [ebp - 0xc]
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x403a9c
push dword [ebp + 0x10]
push 0
push dword [ebp - 4]
push 0x6610
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x403a9c
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x403be0
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
cmp dword [esi], 0
jne 0x403c81
mov edi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
push 0
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x403c81
push 0x420e68
push 0x420ef4
call fcn.00402eb0
add esp, 8
push 8
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x403c81
push 0x420f00
push 0x420ef4
call fcn.00402eb0
add esp, 8
push 0x20
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x403c81
push 0x420f78
push 0x420ef4
call fcn.00402eb0
add esp, 8
push 0x28
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x403c81
push 0x421008
push 0x420ef4
call fcn.00402eb0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
ret
pop edi
mov eax, 1
pop esi
pop ebp
ret
Function at 0x403c90
Capabilities:
Encrypt or decrypt via wincrypt
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 8], 0
push ebx
push esi
push edi
push 0
jne 0x403cba
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
pop edi
mov esi, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x18]
lea eax, [ebp - 4]
push ebx
push 4
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403cee
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x421058
call fcn.00402eb0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 4]
push esi
call fcn.00407316
add esp, 4
mov edi, eax
push 0
push ebx
push esi
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403d31
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42106c
call fcn.00402eb0
push edi
call fcn.004072de
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
push ebx
push edi
push 0
push 1
push 0
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov esi, eax
test esi, esi
je 0x403d6a
push dword [ebx]
push edi
push dword [ebp + 0x10]
call fcn.004077f0
add esp, 0xc
push edi
call fcn.004072de
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x421080
call fcn.00402eb0
add esp, 8
push edi
call fcn.004072de
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x403d90
Capabilities:
Encrypt or decrypt via wincrypt
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0xc
push ebx
push esi
push edi
push 0
test eax, eax
jne 0x403dbe
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0x14]
lea ecx, [ebp - 4]
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
push ecx
push 0
push 0
push 1
push 0
push dword [eax]
mov dword [ebp - 4], edi
call ebx
mov esi, dword [ebp - 4]
push esi
call fcn.00407316
push esi
push dword [ebp + 0x10]
mov esi, eax
push esi
call fcn.004077f0
add esp, 0x10
mov dword [ebp - 8], edi
lea eax, [ebp - 8]
push dword [ebp - 4]
push eax
mov eax, dword [ebp + 8]
push esi
push 0
push 1
push 0
push dword [eax]
call ebx
test eax, eax
jne 0x403e20
push esi
call fcn.004072de
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 8]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push eax
push 4
lea eax, [ebp - 4]
push eax
push edi
call ebx
test eax, eax
je 0x403e0e
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push esi
push edi
call ebx
push esi
mov edi, eax
call fcn.004072de
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403e70
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x89c
mov eax, dword [0x42a130]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x804]
mov dword [ebp - 0x874], ecx
push str.DeviceLanmanRedirector_sipc_
push eax
call fcn.00407531
mov eax, dword [0x42b36c]
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x403ed0
push 0x4210fc
push 0x4210e8
call edi
push eax
call esi
mov dword [0x42b36c], eax
lea ecx, [ebp - 0x804]
push ecx
lea ecx, [ebp - 0x89c]
push ecx
call eax
lea eax, [ebp - 0x89c]
mov dword [ebp - 0x894], 0x18
mov dword [ebp - 0x88c], eax
mov eax, dword [0x42b370]
mov dword [ebp - 0x890], 0
mov dword [ebp - 0x888], 0x40
mov dword [ebp - 0x884], 0
mov dword [ebp - 0x880], 0
test eax, eax
jne 0x403f3b
push 0x421114
push 0x4210e8
call edi
push eax
call esi
mov dword [0x42b370], eax
push 0x90
push 1
lea ecx, [ebp - 0x87c]
push ecx
lea ecx, [ebp - 0x894]
push ecx
push 0x100001
lea ecx, [ebp - 0x870]
push ecx
call eax
mov ebx, eax
test ebx, ebx
jne 0x404057
mov eax, dword [0x42b374]
mov ebx, dword [ebp - 0x870]
mov dword [ebp - 0x824], 6
mov dword [ebp - 0x820], 2
test eax, eax
jne 0x403f9f
push 0x421120
push 0x4210e8
call edi
push eax
call esi
mov dword [0x42b374], eax
push 0x44
lea ecx, [ebp - 0x86c]
push ecx
push 0x24
lea ecx, [ebp - 0x828]
push ecx
push 0x1401a3
lea ecx, [ebp - 0x87c]
push ecx
push 0
push 0
push 0
push ebx
call eax
mov ebx, eax
test ebx, ebx
jne 0x403fde
mov eax, dword [ebp - 0x874]
movdqu xmm0, xmmword [ebp - 0x840]
movdqu xmmword [eax], xmm0
mov eax, dword [ebp - 0x870]
mov dword [ebp - 0x874], eax
mov eax, dword [0x42b374]
mov dword [ebp - 0x824], 6
mov dword [ebp - 0x820], 1
test eax, eax
jne 0x40401b
push 0x421120
push 0x4210e8
call edi
push eax
call esi
mov dword [0x42b374], eax
push 0
push 0
push 0x24
lea ecx, [ebp - 0x828]
push ecx
push 0x1401ac
lea ecx, [ebp - 0x87c]
push ecx
push 0
push 0
push 0
push dword [ebp - 0x874]
call eax
cmp eax, 0x103
jne 0x404057
push 0xffffffffffffffff
push dword [ebp - 0x870]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x870]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x42b368]
test eax, eax
jne 0x404080
push 0x4210d0
push 0x4210e8
call edi
push eax
call esi
mov dword [0x42b368], eax
push ebx
call eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004077dc
mov esp, ebp
pop ebp
ret
Function at 0x404190
Capabilities:
Copy file
Get file version info
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
mov ebx, dword [ebp + 0x14]
xor eax, eax
xorps xmm0, xmm0
mov dword [ebp - 4], eax
push esi
push edi
movlpd qword [ebp - 0x20], xmm0
movlpd qword [ebp - 0x18], xmm0
mov byte [ebx], al
call fcn.00402940
mov esi, dword [ebp + 8]
push esi
push 0x451680
push 0x4211b4
call fcn.00407f6a
add eax, 0x40
push eax
call fcn.004082af
push 0x5c
push 0x451680
call fcn.004089d2
mov ecx, dword [ebp + 0xc]
add esp, 0x18
mov dword [ecx], eax
test eax, eax
jne 0x4041f1
mov dword [ecx], 0x451680
jmp 0x4041f6
add eax, 2
mov dword [ecx], eax
push dword [ecx]
mov edi, dword [ebp + 0x10]
push esi
push str._sADMIN__s
push edi
call fcn.00407531
add esp, 0x10
cmp byte [0x430794], 0
je 0x404314
lea eax, [ebp - 0xc]
mov byte [0x42b37f], 1
push eax
push edi
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
push esi
call fcn.00407316
add esp, 4
mov ebx, eax
mov dword [ebp - 0x10], ebx
push ebx
push esi
push 0
push edi
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x404291
mov ecx, dword [ebx + 0x30]
xor eax, eax
or eax, dword [ebx + 0x34]
mov dword [ebp + 0xc], eax
lea eax, [ebp - 0xc]
push eax
push 0x451680
mov dword [ebp - 8], ecx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
push esi
call fcn.00407316
add esp, 4
mov ebx, eax
mov dword [ebp - 4], ebx
push ebx
push esi
push 0
push 0x451680
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x40429d
mov eax, dword [ebp - 4]
xor esi, esi
mov ebx, dword [ebx + 0x30]
or esi, dword [eax + 0x34]
jmp 0x4042a3
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp + 0xc], eax
mov esi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4042b3
push eax
call fcn.004072de
add esp, 4
mov eax, dword [ebp - 4]
test eax, eax
je 0x4042c3
push eax
call fcn.004072de
add esp, 4
mov ecx, dword [ebp + 0xc]
mov eax, ecx
mov edx, dword [ebp - 8]
or eax, edx
je 0x4042d9
cmp edx, ebx
jb 0x4042d9
ja 0x40432b
cmp ecx, esi
jae 0x40432b
lea eax, [ebp - 0x28]
push eax
push edi
call fcn.004049d0
add esp, 8
test al, al
je 0x404311
lea eax, [ebp - 0x30]
push eax
push 0x451680
call fcn.004049d0
add esp, 8
test al, al
je 0x404311
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x2c]
jb 0x404311
ja 0x40432b
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x30]
jae 0x40432b
mov ebx, dword [ebp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
push 1
push edi
push 0x451680
call esi
test eax, eax
je 0x404334
mov byte [ebx], 1
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [0x42b37f], 0
je 0x404357
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push edi
push 0x451680
call esi
test eax, eax
jne 0x40432b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0xb7
je 0x40432b
call fcn.00402940
push 0x451680
push str._rError_copying__s_to_remote_system:_n
call fcn.00407f6a
add eax, 0x40
push eax
call fcn.004082af
push esi
call fcn.00402ec0
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4043a0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push ebx
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
call fcn.00403be0
add esp, 4
test eax, eax
jne 0x4043d6
call fcn.00402940
push str._rError_initializing_crypto:_n
jmp 0x4044d1
mov edi, dword [ebp + 8]
lea eax, [ebp - 0xc]
push 0
push eax
push 4
lea eax, [ebp - 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4043ff
call fcn.00402940
push str._rError_reading_public_key_length_from_PsExec_services:_n
jmp 0x4044d1
mov esi, dword [ebp - 8]
push esi
call fcn.00407316
add esp, 4
mov dword [ebp - 4], eax
lea ecx, [ebp - 0xc]
push 0
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404430
call fcn.00402940
push str._rError_reading_public_key_from_PsExec_service:_n
jmp 0x4044d1
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
push 0
push dword [ebx]
call fcn.00403bc0
add esp, 0x14
test eax, eax
jne 0x404456
call fcn.00402940
push str._rError_importing_public_key:_n
jmp 0x4044d1
push dword [ebp - 4]
call fcn.004072de
lea eax, [ebp - 8]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
push 0x6610
push dword [ebp - 0x10]
push dword [ebx]
call fcn.00403ae0
add esp, 0x1c
test eax, eax
jne 0x404492
call fcn.00402940
push str._rError_generation_session_key:_n
jmp 0x4044d1
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0xc]
push 0
push eax
push 4
lea eax, [ebp - 8]
push eax
push edi
call esi
test eax, eax
je 0x4044c7
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
push edi
call esi
test eax, eax
je 0x4044c7
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00402940
push str._rError_sending_session_key_to_PsExec_service:_n
call fcn.00407f6a
add eax, 0x40
push eax
call fcn.004082af
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00402ec0
mov eax, dword [ebp - 0x10]
add esp, 4
test eax, eax
je 0x4044ff
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [ebp - 4]
test eax, eax
je 0x40450f
push eax
call fcn.004072de
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404850
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404887
mov ecx, dword [ebp + 0x14]
sub ecx, esi
lea esp, [esp]
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x404870
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, esi
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404890
mov eax, dword [ebp + 0x10]
sub ecx, edx
sar ecx, 1
add eax, ecx
push ebx
push edi
lea eax, [eax*2 + 4]
push eax
call fcn.00407316
mov ebx, dword [ebp + 0xc]
add esp, 4
mov edi, eax
mov dword [ebp - 4], edi
test ebx, ebx
je 0x404986
cmp word [ebx], 0
je 0x404986
mov edx, edi
mov eax, ebx
sub edx, ebx
jmp 0x4048e0
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [edx + eax - 2], cx
test cx, cx
jne 0x4048e0
push 0x3b
push edi
call fcn.00408924
add esp, 8
test eax, eax
je 0x404904
xor ecx, ecx
mov word [eax], cx
add edi, 0xfffffffe
jmp 0x404910
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x404910
mov eax, dword [0x4211b0]
mov edx, esi
mov dword [edi], eax
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x404925
mov edi, dword [ebp - 4]
sub edx, esi
add edi, 0xfffffffe
jmp 0x404940
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404940
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]
mov edi, dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x404998
push 0x3b
push ebx
call fcn.00408924
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x404986
mov esi, dword [ebp + 8]
add ebx, 2
jne 0x4048c6
push edi
call fcn.004072de
add esp, 4
xor al, al
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x14]
mov ecx, edi
sub edx, edi
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x4049a0
push edi
call fcn.004072de
add esp, 4
mov al, 1
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x411fdb
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x42a130]
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
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0040b106
mov dword [ebp - 0x14], eax
cmp dword [0x43163c], esi
jne 0x4120ce
push 0x800
push esi
push 0x426e88
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x41205b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x4121ae
push esi
push esi
push 0x426e88
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x4121ae
push 0x426ea0
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4121ae
push eax
call ebx
push 0x426eac
push edi
mov dword [0x43163c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x426ebc
push edi
mov dword [0x431640], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x426ed0
push edi
mov dword [0x431644], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x43164c], eax
test eax, eax
je 0x4120cb
push 0x426eec
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x431648], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x4120f3
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4120e6
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x412108
push 4
pop eax
jmp 0x4121b0
cmp dword [ebp - 0x14], esi
je 0x412108
push dword [0x43163c]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x4120ed
mov eax, dword [0x431648]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x412166
cmp dword [0x43164c], edi
je 0x412166
push eax
call ebx
push dword [0x43164c]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x412166
test eax, eax
je 0x412166
call ecx
test eax, eax
je 0x41215b
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 0x41215b
test byte [ebp - 8], 1
jne 0x412166
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x412196
mov eax, dword [0x431640]
cmp eax, edi
je 0x412193
push eax
call ebx
test eax, eax
je 0x412193
call eax
mov esi, eax
test esi, esi
je 0x412193
mov eax, dword [0x431644]
cmp eax, edi
je 0x412193
push eax
call ebx
test eax, eax
je 0x412193
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x43163c]
call ebx
test eax, eax
je 0x4121ae
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x4121b0
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004077dc
mov esp, ebp
pop ebp
ret
Function at 0x10001d24
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x10005080
cmp edx, dword [eax]
je 0x10001d46
add eax, 8
inc ecx
cmp eax, 0x10005110
jl 0x10001d37
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x10005080]
jne 0x10001e74
mov eax, dword [0x100053a0]
cmp eax, 1
je 0x10001e4e
test eax, eax
jne 0x10001d77
cmp dword [0x100053a4], 1
je 0x10001e4e
cmp edx, 0xfc
je 0x10001e74
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10001dae
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.100020f0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.100021e0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x10001df1
lea eax, [ebp - 0x1a4]
push eax
call fcn.100021e0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x100043ac
push edi
call fcn.10003260
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.100020f0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.10002100
lea eax, [ebp - 0xa0]
push 0x1000438c
push eax
call fcn.10002100
push dword [esi + 0x10005084]
lea eax, [ebp - 0xa0]
push eax
call fcn.10002100
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.100031ce
add esp, 0x2c
pop edi
jmp 0x10001e74
lea eax, [ebp + 8]
lea esi, [esi + 0x10005084]
push 0
push eax
push dword [esi]
call fcn.100021e0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [0x10004090]
pop esi
leave
ret

Function at 0x4426d4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
mov eax, section.sect_0
call 0x4426d4
lcall 0x5de5, 0x8b10c483
jmp loc.00969180