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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x421050]
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.004094cd
mov dword [ebp - 0x14], eax
cmp dword [0x42311c], esi
jne 0x40e2d6
push 0x800
push esi
push 0x4196a4
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x40e263
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40e3b6
push esi
push esi
push 0x4196a4
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40e3b6
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40e3b6
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x42311c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x423120], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x423124], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x42312c], eax
test eax, eax
je 0x40e2d3
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x423128], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40e2fb
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40e2ee
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x40e310
push 4
pop eax
jmp 0x40e3b8
cmp dword [ebp - 0x14], esi
je 0x40e310
push dword [0x42311c]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40e2f5
mov eax, dword [0x423128]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x40e36e
cmp dword [0x42312c], edi
je 0x40e36e
push eax
call ebx
push dword [0x42312c]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40e36e
test eax, eax
je 0x40e36e
call ecx
test eax, eax
je 0x40e363
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 0x40e363
test byte [ebp - 8], 1
jne 0x40e36e
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x40e39e
mov eax, dword [0x423120]
cmp eax, edi
je 0x40e39b
push eax
call ebx
test eax, eax
je 0x40e39b
call eax
mov esi, eax
test esi, esi
je 0x40e39b
mov eax, dword [0x423124]
cmp eax, edi
je 0x40e39b
push eax
call ebx
test eax, eax
je 0x40e39b
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x42311c]
call ebx
test eax, eax
je 0x40e3b6
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40e3b8
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404d91
mov esp, ebp
pop ebp
ret
Function at 0x10026d8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x100a024]
cmp eax, 0xffffffff
je 0x1002787
push ebx
push esi
xor ebx, ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 4]
push eax
mov esi, 0x314
push esi
push 0x100a5a0
push dword [0x100a024]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100277e
cmp dword [ebp - 4], esi
jne 0x100277e
cmp dword [0x100a5a0], 0x6e776453
jne 0x100277e
test byte [0x100a5ab], 0x80
jne 0x1002785
or byte [0x100a5ab], 0x40
push 0x100a7b0
push 0x103
push 0x100a9e0
mov byte [0x100a7af], bl
mov byte [0x100a8b3], bl
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0xc
cmp dword [0x100a5a4], 0x10000
jne 0x1002785
test dword [0x100a5a8], 0x3fffffec
jne 0x1002785
and byte [0x100a5ab], 0xbf
jmp 0x1002785
or byte [0x100a5ab], 0x80
pop esi
pop ebx
leave
ret

Function at 0x1002789
Capabilities:
Create directory
Delete directory
Move file

Disassembly:
push ebp
lea ebp, [esp - 0x94]
sub esp, 0x114
mov eax, dword [0x100a028]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push edi
xor ebx, ebx
push ebx
mov dword [ebp + 0x90], eax
mov dword [ebp - 0x7c], ebx
call esi
mov dword [ebp - 0x80], eax
or eax, 1
push eax
call esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
mov dword [ebp - 0x78], ebx
xor edx, edx
mov ecx, 0xf4240
mov eax, edi
div ecx
lea eax, [ebp - 0x74]
push edx
push dword [ebp + 0x9c]
push 0x10021fc
push eax
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0x10
push ebx
lea eax, [ebp - 0x74]
push eax
inc edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x1002816
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1002838
inc dword [ebp - 0x78]
cmp dword [ebp - 0x78], 0x3e8
jl 0x10027c7
jmp 0x1002838
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x1002831
push 4
push ebx
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov dword [ebp - 0x7c], 1
push dword [ebp - 0x80]
call esi
mov ecx, dword [ebp + 0x90]
mov eax, dword [ebp - 0x7c]
pop edi
pop esi
pop ebx
call fcn.01005d91
add ebp, 0x94
leave
ret 4
Function at 0x1002858
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0xbac]
sub esp, 0xc2c
mov eax, dword [0x100a028]
mov dword [ebp + 0xba8], eax
push 0x208
lea eax, [ebp + 0x9a0]
push eax
mov byte [ebp - 0x61], 0
mov dword [ebp - 0x70], 0x100
mov dword [ebp - 0x7c], 0x400
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x100295f
push edi
lea edi, [ebp + 0x9a0]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10028a5
push esi
mov esi, 0x1002254
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp + 0x9a0]
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x100295d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x1002248
push edi
call esi
test eax, eax
mov dword [ebp - 0x74], eax
je 0x1002956
push 0x1002238
push edi
call esi
test eax, eax
mov dword [ebp - 0x78], eax
je 0x1002956
push ebx
push 0x1002224
push edi
call esi
mov ebx, eax
test ebx, ebx
je 0x1002955
push 0x1002208
push edi
call esi
test eax, eax
mov dword [ebp - 0x68], eax
je 0x1002955
lea eax, [ebp - 0x6c]
push eax
push 0
call ebx
test eax, eax
jne 0x1002955
cmp dword [ebp - 0x6c], 0x13
jne 0x1002955
push eax
call dword [ebp - 0x74]
mov esi, eax
test esi, esi
je 0x1002955
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp + 0x7a0]
push eax
push esi
call dword [ebp - 0x68]
test eax, eax
jne 0x1002951
mov al, byte [ebp - 0x60]
mov byte [ebp - 0x61], al
push esi
call dword [ebp - 0x78]
pop ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
pop edi
mov ecx, dword [ebp + 0xba8]
mov al, byte [ebp - 0x61]
call fcn.01005d91
add ebp, 0xbac
leave
ret

Function at 0x1002975
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x100a028]
push ebx
mov bl, byte [ebp + 8]
push esi
push edi
mov esi, 0x1002264
lea edi, [ebp - 0xc]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x5c3a3f
push eax
movsb byte es:[edi], byte [esi]
mov byte [ebp - 0x10], bl
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov edi, eax
dec eax
dec eax
je 0x10029c0
dec eax
je 0x1002a0e
sub eax, 3
je 0x10029bb
xor edi, edi
jmp 0x1002a0e
push 3
pop edi
jmp 0x1002a0e
xor esi, esi
push esi
push esi
push 3
push esi
push 3
push 0x80000000
lea eax, [ebp - 0xc]
push eax
mov byte [ebp - 8], bl
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10029b7
push esi
lea eax, [ebp + 8]
push eax
push 0x18
lea eax, [ebp - 0x28]
push eax
push esi
push esi
push 0x70000
push ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x1002a05
cmp dword [ebp - 0x20], 0xb
je 0x1002a07
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
pop ebx
call fcn.01005d91
leave
ret 4
Function at 0x1002baa
Capabilities:
Check if file exists
Delete directory
Delete file
Move file

Disassembly:
push ebx
push ebp
push esi
push edi
push 0x100ad40
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x100a184]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x1002bd2
push eax
call esi
and dword [0x100a184], 0
mov eax, dword [0x100a024]
cmp eax, 0xffffffff
je 0x1002be6
push eax
call esi
or dword [0x100a024], 0xffffffff
mov esi, dword [0x100a008]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov edi, 0x100a008
jmp 0x1002c2c
mov eax, dword [esi + 4]
test eax, eax
je 0x1002c2a
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x1002c26
call ebp
cmp eax, 2
je 0x1002c26
cmp eax, 3
je 0x1002c26
push 4
push 0
push dword [esi + 4]
call ebx
and dword [esi + 4], 0
mov esi, dword [esi]
cmp esi, edi
jne 0x1002bff
mov esi, dword [0x100a010]
mov edi, 0x100a010
jmp 0x1002c6a
mov eax, dword [esi + 4]
test eax, eax
je 0x1002c68
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x1002c64
call ebp
cmp eax, 2
je 0x1002c64
cmp eax, 3
je 0x1002c64
push 4
push 0
push dword [esi + 4]
call ebx
and dword [esi + 4], 0
mov esi, dword [esi]
cmp esi, edi
jne 0x1002c3d
push 0x100ad40
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x1002df6
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 0xc]
test edx, edx
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
je 0x1002e20
push esi
push edi
movzx esi, byte [ecx]
movzx edi, al
xor esi, edi
shr eax, 8
xor eax, dword [esi*4 + 0x100a1a0]
inc ecx
dec edx
jne 0x1002e08
pop edi
pop esi
ret 0xc
Function at 0x10031b2
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, dword [0x100ad24]
xor ebx, ebx
cmp eax, ebx
je 0x100322a
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 8]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10031de
push ebx
lea ecx, [ebp - 4]
push ecx
sub eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push dword [ebp + 8]
push dword [0x100ad24]
call esi
test eax, eax
je 0x100322d
mov ecx, 0x100229c
mov eax, ecx
push edi
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x100320d
push ebx
lea edx, [ebp - 4]
push edx
sub eax, edi
push eax
push ecx
push dword [0x100ad24]
call esi
test eax, eax
pop edi
je 0x100322d
xor ebx, ebx
inc ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
mov eax, ebx
pop ebx
leave
ret 4

Function at 0x10033b1
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x310
cmp dword [0x100a044], 0
mov eax, dword [0x100a028]
mov dword [ebp - 4], eax
jne 0x100349c
push esi
push 0x100236c
push 0x1002364
push dword [ebp + 8]
call fcn.01005c81
test eax, eax
mov esi, 0x104
je 0x1003414
push esi
lea ecx, [ebp - 0x20c]
push ecx
push 1
push eax
call fcn.01005b5c
test eax, eax
je 0x1003414
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
push 0x100ad60
jmp 0x1003435
push esi
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x108]
push eax
push 0x1002354
lea eax, [ebp - 0x310]
push eax
call fcn.01002a1f
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [0x100a058], eax
je 0x1003475
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x100233c
push eax
call esi
push 0x1002328
push dword [0x100a058]
mov dword [0x100a044], eax
call esi
mov dword [0x100a040], eax
cmp dword [0x100a044], 0
pop esi
jne 0x1003489
mov dword [0x100a044], 0x10033ac
cmp dword [0x100a040], 0
jne 0x100349c
mov dword [0x100a040], 0x10033a7
mov ecx, dword [ebp - 4]
call fcn.01005d91
leave
ret 4

Function at 0x10034d4
Capabilities:
Move file

Disassembly:
mov eax, dword [esp + 0xc]
push esi
xor esi, esi
inc esi
cmp byte [eax], 0
je 0x10034f2
push dword [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x10034f2
xor esi, esi
mov eax, dword [esp + 0x14]
cmp byte [eax], 0
je 0x100350e
push 1
push dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x100350e
xor esi, esi
mov eax, esi
pop esi
ret 0x10
Function at 0x1003518
Capabilities:
Query environment variable
Set environment variable
Write file on windows

Disassembly:
push ecx
push ebx
xor ebx, ebx
push ebx
push ebx
push 0x1002388
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x10035e3
push esi
mov esi, 0x100afa0
push esi
push 0x1002378
push 0x100ad60
call fcn.01002a1f
push ebx
push 0x4000002
push 1
push ebx
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, eax
cmp edx, 0xffffffff
mov dword [0x100a024], edx
je 0x10035e2
push ebp
push edi
mov ebp, 0x100a5a0
xor eax, eax
push ebx
mov ecx, 0xc5
mov edi, ebp
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push eax
mov edi, 0x314
push edi
push ebp
push edx
mov dword [0x100a5a0], 0x6e776453
mov dword [0x100a5a4], 0x10000
mov dword [0x100a5a8], 0xc0000013
mov byte [0x100a7b0], bl
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10035cd
cmp dword [esp + 0x10], edi
jne 0x10035cd
push esi
push 0x1002388
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
jmp 0x10035e0
push dword [0x100a024]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x100a024], 0xffffffff
pop edi
pop ebp
pop esi
pop ebx
pop ecx
ret

Function at 0x10035e6
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
push esi
mov esi, dword [ebp + 8]
cmp esi, 0xffffffff
jne 0x1003600
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp dword [0x101b0c0], 0
jne 0x1003661
lea eax, [ebp - 0x280]
push eax
push 0x200
push esi
call fcn.01002b42
lea eax, [ebp - 0x280]
push eax
call fcn.0100323e
push 0x80
lea eax, [ebp - 0x80]
push eax
push 0x20000003
push dword [0x100a05c]
mov byte [ebp - 0x80], 0
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x10010
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x280]
push eax
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_MessageBoxA]
call fcn.01002baa
test esi, esi
jne 0x100366b
inc esi
cmp dword [0x100a060], 0
je 0x1003686
push 0x100ad40
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
and dword [0x100a060], 0
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x1003a05
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x100a028]
push edi
push dword [ebp + 8]
xor edi, edi
push edi
push edi
push edi
push edi
push edi
push edi
push 0x220
push 0x20
mov dword [ebp - 4], eax
push 2
lea eax, [ebp - 0xc]
push eax
mov byte [ebp - 0xc], 0
mov byte [ebp - 0xb], 0
mov byte [ebp - 0xa], 0
mov byte [ebp - 9], 0
mov byte [ebp - 8], 0
mov byte [ebp - 7], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x1003a65
lea eax, [ebp - 0x10]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1003a6c
xor eax, eax
jmp 0x1003b22
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp + 8]
push eax
push 0x10000
push 0x100b0c0
push 4
push dword [ebp - 0x10]
call ebx
test eax, eax
je 0x1003b21
push esi
push dword [0x100b0c0]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
push esi
call fcn.0100390c
cmp eax, edi
pop ecx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
je 0x1003afe
mov ecx, esi
mov esi, dword [0x100b0c0]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp + 8]
push eax
push 0x10000
push 0x100b0c0
and ecx, 3
push 1
rep movsb byte es:[edi], byte [esi]
push dword [ebp - 0x10]
call ebx
test eax, eax
je 0x1003b20
push dword [0x100b0c0]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
push esi
call fcn.0100390c
test eax, eax
pop ecx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
jne 0x1003b05
push 8
call fcn.010035e6
mov ecx, esi
mov esi, dword [0x100b0c0]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
inc eax
pop esi
pop ebx
mov ecx, dword [ebp - 4]
pop edi
call fcn.01005d91
leave
ret 0xc
Function at 0x1004188
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x10]
mov edx, esi
xor ebx, ebx
push edi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x1004199
push 0x2e
push esi
call dword [sym.imp.msvcrt.dll_strrchr]
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x1004206
push 0x10024b4
push edi
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
pop ecx
pop ecx
jne 0x1004206
xor ebx, ebx
inc ebx
mov eax, dword [0x101b0c8]
xor edx, edx
mov ecx, 0x3e8
div ecx
inc dword [0x101b0c8]
push edx
push 0x10024ac
push edi
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x10041c9
push esi
push 0x100a008
call fcn.01004163
jmp 0x1004209
mov byte [esi], 0
pop edi
pop esi
mov eax, ebx
pop ebx
ret 8

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x100a028]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, esi
push edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10042ca
sub eax, edx
lea ecx, [eax + 1]
mov edx, ecx
shr ecx, 2
lea edi, [ebp - 0x108]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp + eax - 0x108]
cmp byte [eax - 1], 0x5c
pop edi
pop esi
je 0x1004300
mov byte [eax], 0x5c
mov byte [eax + 1], 0
push dword [ebp + 0x10]
lea eax, [ebp - 0x108]
push dword [ebp + 0xc]
push eax
call fcn.0100425b
test eax, eax
je 0x1004365
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1004365
test al, 0x10
je 0x1004365
push 0x100240c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x1004360
push 0x10024bc
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1004360
push 0
lea ecx, [ebp - 0x108]
push ecx
call eax
test eax, eax
jne 0x1004360
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
inc eax
jmp 0x1004367
xor eax, eax
mov ecx, dword [ebp - 4]
call fcn.01005d91
leave
ret 0xc
Function at 0x1005d91
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x100a028]
jne 0x1005d9a
ret
jmp 0x1005d9f
push ebp
lea ebp, [esp - 0x2a8]
sub esp, 0x328
mov eax, dword [0x100a028]
mov dword [ebp + 0x2a4], eax
mov eax, dword [0x101b0cc]
test eax, eax
je 0x1005dc3
call eax
cmp dword [0x101b0d0], 0
je 0x1005e0a
push edi
xor eax, eax
and dword [ebp - 0x28], eax
push 0x13
pop ecx
lea edi, [ebp - 0x7c]
rep stosd dword es:[edi], eax
mov ecx, 0xb2
lea edi, [ebp - 0x24]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x80]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x28]
push 0
mov dword [ebp - 0x80], 0xc0000409
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [ebp - 0x30]
push eax
call dword [0x101b0d0]
pop edi
push 0x502
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [ebp + 0x2a4]
call fcn.01005d91
add ebp, 0x2a8
leave
ret

Function at 0x100702b
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
mov eax, esi
shr eax, 2
test eax, eax
push edi
mov edi, dword [esp + 0x14]
jle 0x1007066
push ebx
movzx edx, byte [ecx]
xor ebx, ebx
inc ecx
mov bh, byte [ecx]
or edx, ebx
inc ecx
movzx ebx, byte [ecx]
shl ebx, 0x10
or edx, ebx
inc ecx
movzx ebx, byte [ecx]
shl ebx, 0x18
or edx, ebx
inc ecx
xor edi, edx
dec eax
jne 0x1007043
pop ebx
and esi, 3
xor eax, eax
dec esi
je 0x1007082
dec esi
je 0x100707b
dec esi
jne 0x1007087
movzx eax, byte [ecx]
shl eax, 0x10
inc ecx
xor edx, edx
mov dh, byte [ecx]
or eax, edx
inc ecx
movzx ecx, byte [ecx]
or eax, ecx
xor eax, edi
pop edi
pop esi
ret 0xc
Function at 0x4017c0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4017d9
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x4017ed
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40180e
cmp esi, eax
jae 0x4017e7
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401800
cmp esi, eax
jae 0x4017e7
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x407150
Capabilities:
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x444bc8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov ecx, dword [0x456824]
mov eax, 0xbdd265f5
imul ecx
add edx, ecx
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [0x45681c]
push esi
mov esi, eax
mov eax, 0x5f7fac71
imul edx
sar edx, 0xb
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [0x456830]
imul edx, edx, 0x1525
sub esi, eax
add esi, edx
mov eax, 0x61e35267
imul ecx
mov ecx, dword [0x456838]
sar edx, 0xb
imul ecx, ecx, 0x58f
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [0x56cb8c]
sub esi, eax
add esi, ecx
mov ecx, 0x56cb8c
mov dword [str._r_____r____], esi
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 4], eax
mov ecx, dword [0x45682c]
mov esi, dword [0x456818]
mov eax, 0x61e35267
imul esi, esi, 0x1ec0
imul ecx
mov ecx, dword [str._r_____r____]
imul ecx, ecx, 0x14ec
sar edx, 0xb
mov eax, edx
shr eax, 0x1f
add eax, edx
sub esi, eax
add esi, ecx
mov ecx, dword [0x456820]
mov eax, 0x776d83ad
imul ecx
mov ecx, dword [0x456834]
sar edx, 0xb
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x18]
sub esi, eax
sub esi, ecx
lea ecx, [esp + 0x1c]
push ecx
sub esi, 0x11cf
push edx
lea ecx, [esp + 0xc]
mov dword [esp + 0x18], 0
mov dword [0x456820], esi
call fcn.00406ec0
mov ecx, dword [0x45681c]
mov eax, 0x214d0215
imul ecx
mov ecx, dword [0x456820]
mov esi, ecx
imul esi, esi, 0x1572
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
sub esi, eax
mov eax, 0x61e35267
imul ecx
mov eax, dword [0x456830]
sar edx, 0xb
imul eax, eax, 0xcde
add esi, edx
mov ecx, edx
mov edx, dword [0x45682c]
imul edx, edx, 0x11cf
shr ecx, 0x1f
add ecx, esi
mov esi, dword [esp + 4]
add ecx, edx
add ecx, eax
push esi
mov dword [0x45682c], ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esi - 0x10]
mov dword [esp + 0x10], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
pop esi
jg 0x4072e9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret