joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1003c140
Capabilities:
Get file size

Disassembly:
sub esp, 0x18
push ebx
mov ebx, dword [esp + 0x24]
push esi
push edi
push 0x20
push 0
push ebx
call fcn.10004e04
mov word [ebx + 6], 1
add esp, 0xc
mov eax, dword [esp + 0x28]
push dword [eax*4 + 0x10061678]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x1003c186
mov di, word [esp + 0x28]
mov edx, 0x2180
mov word [ebx], di
mov word [ebx + 0xc], di
jmp 0x1003c202
lea ecx, [esp + 0x1c]
push ecx
push 0
push 0
mov edx, dword [esp + 0x34]
push dword [edx*4 + 0x10061678]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
jne 0x1003c1b5
call fcn.1000b76c
mov eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x18
ret
lea esi, [esp + 0x1c]
push esi
call fcn.1003c22c
test eax, eax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x18], eax
jne 0x1003c1d8
pop edi
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x18
ret
mov dword [esp + 0x14], 0x8180
xor ecx, ecx
push ecx
mov edx, dword [esp + 0x2c]
mov word [ebx], cx
mov word [ebx + 0xc], cx
push dword [edx*4 + 0x10061678]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [esp + 0x14]
mov dword [ebx + 0x10], eax
mov esi, edx
and esi, 0x1c0
mov dword [esp + 0x10], esi
sar esi, 3
mov eax, dword [esp + 0x10]
or esi, edx
sar eax, 6
or esi, eax
mov word [ebx + 4], si
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x18
ret
Function at 0x1003d2e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 8]
cmp ebx, 0x3c
jae 0x1003d32a
mov ecx, dword [ebp + 0x10]
or ecx, ecx
je 0x1003d326
test byte [ebx + 0x1006163c], 0x10
jne 0x1003d33b
mov edx, dword [ebp + 0xc]
push ecx
push edx
push 0
lea eax, [ebp - 8]
push eax
push ecx
push edx
push dword [ebx*4 + 0x10061678]
call sub.KERNEL32.dll_ReadFile
pop edx
pop ecx
or eax, eax
je 0x1003d32a
mov eax, dword [ebp - 8]
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
jmp 0x1003d321
push 9
call fcn.10008638
mov eax, 0xffffffff
jmp 0x1003d321
push esi
push edi
mov edi, dword [ebp + 0xc]
and byte [ebx + 0x1006163c], 0xfe
cld
push ds
pop es
mov edx, edi
push ecx
push edx
push 0
lea eax, [ebp - 8]
push eax
push ecx
push edx
push dword [ebx*4 + 0x10061678]
call sub.KERNEL32.dll_ReadFile
pop edx
pop ecx
or eax, eax
je 0x1003d419
mov eax, dword [ebp - 8]
add edx, eax
cmp eax, ecx
je 0x1003d37e
or byte [ebx + 0x1006163c], 1
mov ecx, eax
or ecx, ecx
je 0x1003d4c0
push edi
mov al, 0x1a
repne scasb al, byte es:[edi]
je 0x1003d3e8
pop edi
mov ecx, edx
sub ecx, edi
mov al, 0xd
xor esi, esi
repne scasb al, byte es:[edi]
jne 0x1003d4c0
cmp edi, edx
jae 0x1003d42d
cmp byte [edi], 0xa
jne 0x1003d396
mov esi, edi
mov dword [ebp - 4], edi
dec dword [ebp - 4]
mov ecx, edx
sub ecx, edi
mov al, 0xd
repne scasb al, byte es:[edi]
jne 0x1003d48a
cmp edi, edx
jae 0x1003d42d
cmp byte [edi], 0xa
jne 0x1003d3b9
mov ecx, edi
dec ecx
sub ecx, esi
mov eax, edi
mov edi, dword [ebp - 4]
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 4], edi
mov edi, eax
inc esi
jmp 0x1003d3b3
dec edi
test byte [ebx + 0x1006163c], 8
jne 0x1003d40b
sub edx, edi
push 1
push 0
push edx
push dword [ebx*4 + 0x10061678]
call sub.KERNEL32.dll_SetFilePointer
cmp ax, 0xffff
je 0x1003d419
or byte [ebx + 0x1006163c], 1
mov edx, edi
jmp 0x1003d38d
push 9
call fcn.10008638
mov eax, 0xffffffff
jmp 0x1003d4c5
test byte [ebx + 0x1006163c], 1
jne 0x1003d48a
dec edx
mov ecx, 1
push ecx
push edx
push 0
lea eax, [ebp - 8]
push eax
push ecx
push edx
push dword [ebx*4 + 0x10061678]
call sub.KERNEL32.dll_ReadFile
pop edx
pop ecx
or eax, eax
je 0x1003d419
mov eax, dword [ebp - 8]
or eax, eax
je 0x1003d483
cmp byte [edi - 1], 0xa
je 0x1003d48a
mov byte [edi - 1], 0xd
push 1
push 0
push 0xffffffffffffffff
push dword [ebx*4 + 0x10061678]
call sub.KERNEL32.dll_SetFilePointer
cmp ax, 0xffff
je 0x1003d419
jmp 0x1003d48a
or byte [ebx + 0x1006163c], 1
cmp esi, 0
je 0x1003d4c0
mov ecx, edi
sub ecx, esi
mov edi, dword [ebp - 4]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test byte [ebx + 0x1006163c], 8
jne 0x1003d4c0
mov ecx, esi
sub ecx, edi
je 0x1003d4c0
test byte [ebx + 0x1006163c], 1
je 0x1003d34a
mov eax, edi
sub eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1003de90
Capabilities:
Query environment variable

Disassembly:
push ebx
xor ebx, ebx
push esi
mov esi, dword [esp + 0xc]
test esi, esi
push edi
je 0x1003deed
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov edi, eax
test eax, eax
je 0x1003deed
lea ecx, [edi + 1]
push ecx
call fcn.1000884c
add esp, 4
mov ebx, eax
test eax, eax
je 0x1003deed
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x1003deda
push ebx
call fcn.10006550
xor ebx, ebx
add esp, 4
jmp 0x1003deed
push ebx
push esi
call fcn.1000b808
add esp, 4
push eax
call fcn.1003dda0
add esp, 8
pop edi
mov eax, ebx
pop esi
pop ebx
ret

Function at 0x7d8058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.007d81a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x7d807e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x7d806a
add dl, dl
jne 0x7d8089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x7d80dc
xor eax, eax
add dl, dl
jne 0x7d8096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x7d817d
add dl, dl
jne 0x7d80a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x7d80d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x7d8075
mov eax, 1
add dl, dl
jne 0x7d80ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x7d80e1
sub eax, ebx
mov ebx, 1
jne 0x7d8128
mov ecx, 1
add dl, dl
jne 0x7d810e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x7d8119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x7d8105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x7d8075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x7d813f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x7d814a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x7d8136
cmp eax, 0x7d00
jae 0x7d816d
cmp eax, 0x500
jb 0x7d8168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x7d8075
cmp eax, 0x7f
ja 0x7d8170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x7d8075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x7d819e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x7d8075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x406c50
Capabilities:
Read clipboard data

Disassembly:
sub esp, 0x20c
push esi
mov esi, dword [esp + 0x218]
push edi
test esi, esi
je 0x406c69
mov dword [esi], 0
mov edi, dword [esp + 0x218]
lea eax, [edi - 0xc000]
cmp eax, 0x3fff
ja 0x406d49
push 0x104
lea eax, [esp + 0xc]
push eax
push edi
call dword [sym.imp.USER32.dll_GetClipboardFormatNameW]
push 0xb
lea eax, [esp + 0xc]
push str.Link_Source
push eax
call fcn.0049f042
add esp, 0xc
test eax, eax
je 0x406d3c
lea eax, [esp + 8]
push str.ObjectLink
push eax
call fcn.0049eec1
add esp, 8
test eax, eax
je 0x406d3c
lea eax, [esp + 8]
push str.OwnerLink
push eax
call fcn.0049eec1
add esp, 8
test eax, eax
je 0x406d3c
lea eax, [esp + 8]
push str.Native
push eax
call fcn.0049eec1
add esp, 8
test eax, eax
je 0x406d3c
lea eax, [esp + 8]
push str.Embed_Source
push eax
call fcn.0049eec1
add esp, 8
test eax, eax
je 0x406d3c
lea eax, [esp + 8]
push str.MSDEVColumnSelect
push eax
call fcn.0049eec1
add esp, 8
test eax, eax
je 0x406d32
lea eax, [esp + 8]
push str.MSDEVLineSelect
push eax
call fcn.0049eec1
add esp, 8
test eax, eax
jne 0x406d50
test esi, esi
je 0x406d3c
mov dword [esi], 1
pop edi
xor eax, eax
pop esi
add esp, 0x20c
ret 8
xor eax, eax
mov word [esp + 8], ax
push edi
call dword [sym.imp.USER32.dll_GetClipboardData]
pop edi
pop esi
add esp, 0x20c
ret 8

Function at 0x406d70
Capabilities:
Check for time delay via gettickcount
Open clipboard

Disassembly:
cmp dword [0x4ea678], 0
push ebx
push esi
push edi
jne 0x406df8
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
push dword [0x4e8ccc]
mov edi, dword [sym.imp.USER32.dll_OpenClipboard]
mov ebx, eax
call edi
test eax, eax
jne 0x406dee
nop dword [eax + eax]
mov eax, dword [0x4e4808]
cmp eax, 0xffffffff
je 0x406dbf
test eax, eax
je 0x406e01
call esi
mov ecx, dword [0x4e4808]
add ecx, ebx
sub ecx, eax
cmp ecx, 5
jle 0x406e01
mov edx, 1
mov dword [0x4e47f0], 0
mov ecx, 0x8000012f
call fcn.004015e0
push dword [0x4e8ccc]
mov dword [0x4e47f0], 1
call edi
test eax, eax
je 0x406da0
mov dword [0x4ea678], 1
mov eax, 1
pop edi
pop esi
pop ebx
ret
pop edi
pop esi
xor eax, eax
pop ebx
ret
Function at 0x407451
Capabilities:
Resolve dns

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0x14]
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
push ecx
and dword [ebp], 0
mov dword [esp + 0x14], edx
mov byte [ebx], 0
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov esi, eax
test esi, esi
je 0x4074cf
cmp word [esi + 8], 2
jne 0x4074b1
push 4
pop eax
cmp word [esi + 0xa], ax
jne 0x4074b1
mov edi, dword [esi + 0xc]
jmp 0x4074ab
push dword [eax]
mov edx, dword [esp + 0x1c]
push dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
call fcn.004073ea
mov dword [ebp], eax
test eax, eax
je 0x4074ca
lea ebp, [eax + 0x1c]
add edi, 4
mov eax, dword [edi]
test eax, eax
jne 0x40748b
push 0x400
push dword [esi]
push 0x401
push ebx
call fcn.004a3c87
add esp, 0x10
xor eax, eax
jmp 0x4074f6
push 8
pop eax
jmp 0x4074f6
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ecx, 0x2af9
sub eax, ecx
je 0x4074f4
sub eax, 1
je 0x4074ed
sub eax, 1
jne 0x4074f4
lea eax, [ecx + 2]
jmp 0x4074f6
mov eax, 0x2afa
jmp 0x4074f6
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0x10

Function at 0x407b22
Capabilities:
Get common file path

Disassembly:
sub esp, 0x230
cmp dword [0x4e8c90], 0
mov ax, cx
mov word [esp + 2], ax
mov dword [esp + 4], str.getaddrinfo
mov dword [esp + 8], 0x40763f
mov dword [esp + 0xc], str.getnameinfo
mov dword [esp + 0x10], 0x407952
mov dword [esp + 0x14], str.freeaddrinfo
mov dword [esp + 0x18], 0x407604
je 0x407b71
movzx eax, ax
jmp 0x407c7f
push 0x104
lea eax, [esp + 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x407c70
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x138]
mov ebx, 0x10c
push eax
lea eax, [esp + 0x30]
push ebx
push eax
call fcn.004a3b76
push str.ws2_32
lea eax, [esp + 0x3c]
push ebx
push eax
call fcn.004a49f9
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea eax, [esp + 0x44]
add esp, 0x18
push eax
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test esi, esi
je 0x407be9
push str.getaddrinfo
push esi
call ebx
test eax, eax
jne 0x407c2d
push esi
call ebp
lea eax, [esp + 0x138]
mov esi, 0x10c
push eax
lea eax, [esp + 0x30]
push esi
push eax
call fcn.004a3b76
push str.wship6
lea eax, [esp + 0x3c]
push esi
push eax
call fcn.004a49f9
add esp, 0x18
lea eax, [esp + 0x2c]
push eax
call edi
mov esi, eax
test esi, esi
je 0x407c6c
push str.getaddrinfo
push esi
call ebx
test eax, eax
je 0x407c69
xor edi, edi
lea eax, [esp + 0x14]
mov ebx, edi
push dword [eax + ebx*8]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + ebx*8 + 0x18], eax
test eax, eax
je 0x407c69
inc ebx
lea eax, [esp + 0x14]
cmp ebx, 3
jl 0x407c35
test esi, esi
je 0x407c6c
mov eax, dword [esp + edi + 0x18]
mov dword [edi + 0x4e78fc], eax
add edi, 8
cmp edi, 0x18
jl 0x407c55
jmp 0x407c6c
push esi
call ebp
pop edi
pop esi
pop ebp
pop ebx
movzx eax, word [esp + 2]
mov dword [0x4e8c90], 1
mov eax, dword [eax*8 + 0x4e78fc]
add esp, 0x230
ret
Function at 0x40a903
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
push 0xa
mov edx, dword [edi + 0x3c]
mov ecx, edx
mov eax, dword [edi + 0x34]
sub ecx, ebx
mov dword [esp + 0x14], ecx
mov byte [edx + eax], 0
lea eax, [esp + 0x18]
push eax
lea eax, [ecx + 0x26]
push eax
call fcn.004a3a2c
lea eax, [esp + 0x20]
push 0
push eax
call fcn.0049d080
push str.__xml_version_1.0__encoding_UTF_8___
push 0x4d1bbc
lea esi, [eax + 1]
push esi
call fcn.0040be37
add esp, 0x20
add esi, eax
lea eax, [esp + 0x14]
sub esi, eax
push 0
push esi
mov esi, dword [sym.imp.WSOCK32.dll_send]
push eax
push dword [edi + 0x10]
call esi
cmp eax, 0xffffffff
je 0x40a993
mov eax, dword [esp + 0x10]
push 0
inc eax
push eax
mov eax, dword [edi + 0x34]
add eax, ebx
push eax
push dword [edi + 0x10]
call esi
cmp eax, 0xffffffff
je 0x40a993
mov dword [edi + 0x3c], ebx
xor eax, eax
jmp 0x40a99d
mov ecx, str.An_internal_error_has_occurred_in_the_debugger_engine._nContinue_running_the_script_without_the_debugger_
call fcn.0040acdf
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x40ad26
Capabilities:
Encode data using base64

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
mov ebx, ecx
xor esi, esi
mov dword [esp + 0x10], ebx
mov ebp, edx
cmp edi, 0xffffffff
jne 0x40ad47
push ebp
call fcn.004a3ae0
pop ecx
mov edi, eax
cmp edi, 2
jbe 0x40add0
lea eax, [ebx + 2]
xor edx, edx
mov dword [esp + 0x18], eax
lea eax, [edi - 3]
push 3
pop ecx
div ecx
mov ebx, dword [esp + 0x18]
lea edx, [eax + 1]
mov esi, edx
shl esi, 2
movzx eax, byte [ebp]
sub edi, 3
movzx ecx, byte [ebp + 1]
shl eax, 8
or ecx, eax
movzx eax, byte [ebp + 2]
shl ecx, 8
add ebp, 3
or ecx, eax
mov eax, ecx
shr eax, 0x12
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ebx - 2], al
mov eax, ecx
shr eax, 0xc
and eax, 0x3f
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ebx - 1], al
mov eax, ecx
shr eax, 6
and ecx, 0x3f
and eax, 0x3f
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ebx], al
lea ebx, [ebx + 4]
mov al, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ebx - 3], al
sub edx, 1
jne 0x40ad6d
mov ebx, dword [esp + 0x10]
test edi, edi
je 0x40ae2a
movzx ecx, byte [ebp]
shl ecx, 0x10
cmp edi, 1
jbe 0x40ade9
movzx eax, byte [ebp + 1]
shl eax, 8
or ecx, eax
mov eax, ecx
shr eax, 0x12
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + ebx], al
mov eax, ecx
shr eax, 0xc
and eax, 0x3f
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + ebx + 1], al
cmp edi, 1
jbe 0x40ae1c
shr ecx, 6
and ecx, 0x3f
mov al, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
jmp 0x40ae1e
mov al, 0x3d
mov byte [esi + ebx + 2], al
mov byte [esi + ebx + 3], 0x3d
add esi, 4
pop edi
mov byte [esi + ebx], 0
mov eax, esi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x40c560
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4b68dd
push eax
mov dword fs:[0], esp
sub esp, 0x38
mov eax, dword [0x4e9ef4]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
test eax, eax
je 0x40c5a0
push str.stdout
push esi
mov ecx, 0x4e9ea8
call fcn.0040a7f9
mov eax, dword [0x4e9ef4]
cmp eax, 2
je 0x40c726
mov eax, dword [0x4ea7fc]
mov dword [ebp - 0x44], vtable.TextStream.0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0xffffffff
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
cmp eax, 0xffffffff
je 0x40c5f9
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x34], eax
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x40c5f9
mov byte [ebp - 0x2a], al
mov dword [ebp - 0x44], vtable.TextFile.0
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x44]
push dword [edi + 0x6d8]
push 2
push dword [ebp + 0x10]
call fcn.0047ed70
push dword [ebp + 0xc]
lea ecx, [ebp - 0x44]
push esi
call fcn.0047f580
mov edx, dword [ebp - 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
test edx, edx
je 0x40c673
cmp dword [ebp - 0x18], 0
jne 0x40c673
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x10]
cmp eax, fcn.0047f9c0
jne 0x40c665
push 0
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push edx
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call edi
jmp 0x40c66e
push edx
push dword [ebp - 0x14]
lea ecx, [ebp - 0x44]
call eax
xor edx, edx
mov dword [ebp - 0x3c], edx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov word [ebp - 0x1c], ax
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 8]
cmp eax, fcn.0047f960
jne 0x40c6b1
mov ecx, dword [ebp - 0x10]
cmp ecx, 0xffffffff
je 0x40c6bc
mov eax, dword [ebp - 0x40]
and eax, 0x10000003
cmp eax, 0x10000000
je 0x40c6a9
push ecx
call esi
mov edx, dword [ebp - 0x3c]
or ecx, 0xffffffff
mov dword [ebp - 0x10], ecx
jmp 0x40c6bc
lea ecx, [ebp - 0x44]
call eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x44], vtable.TextFile.0
test edx, edx
je 0x40c6eb
cmp dword [ebp - 0x18], 0
jne 0x40c6eb
push 0
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push edx
push dword [ebp - 0x14]
push ecx
call edi
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x3c], 0
xor eax, eax
mov word [ebp - 0x1c], ax
cmp ecx, 0xffffffff
je 0x40c70f
mov eax, dword [ebp - 0x40]
and eax, 0x10000003
cmp eax, 0x10000000
je 0x40c708
push ecx
call esi
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x44], vtable.TextStream.0
test eax, eax
je 0x40c726
push eax
call fcn.0049efc2
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40e720
Capabilities:
Print debug messages

Disassembly:
mov eax, 0x4000
call fcn.004b57d0
push ebp
push esi
mov esi, dword [esp + 0x4018]
push edi
mov edi, ecx
test esi, esi
jne 0x40e753
mov esi, dword [edi + 0x644]
test esi, esi
jne 0x40e753
mov ecx, dword [edi + 0x27c]
movzx eax, word [edi + 0x280]
jmp 0x40e75b
movzx ecx, word [esi + 2]
movzx eax, word [esi + 4]
mov ebp, dword [esp + 0x4010]
test ebp, ebp
je 0x40e845
push ebx
push dword [esp + 0x4018]
movzx eax, ax
push str.Warning:
push eax
mov eax, dword [0x4e9070]
movzx ecx, cx
push dword [eax + ecx*4]
lea eax, [esp + 0x20]
push str._s___d__:____s_s_n
push 0x2000
push eax
call fcn.00481810
mov ebx, eax
add esp, 0x1c
mov eax, dword [esp + 0x401c]
cmp word [eax], 0
je 0x40e7cc
push eax
mov ecx, 0x2000
lea eax, [esp + 0x14]
push str._____Specifically:__s_n
sub ecx, ebx
lea eax, [eax + ebx*2]
push ecx
push eax
call fcn.00481810
add esp, 0x10
add ebx, eax
cmp ebp, 3
jne 0x40e7f0
push 0x4d2a74
push ebx
lea eax, [esp + 0x18]
mov ecx, edi
push eax
call fcn.0040c560
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x4000
ret 0x10
mov eax, dword [0x4e9ef0]
test eax, eax
je 0x40e812
push str.stderr
lea eax, [esp + 0x14]
mov ecx, 0x4e9ea8
push eax
call fcn.0040a7f9
mov eax, dword [0x4e9ef0]
cmp eax, 2
je 0x40e822
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp ebp, 2
jne 0x40e844
push 0
push esi
push dword [esp + 0x4024]
mov ecx, 0x4e9f30
push 1
push dword [esp + 0x4028]
call fcn.0040d480
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x4000
ret 0x10
Function at 0x412d60
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x28
push ebx
xor al, al
mov bl, cl
cmp dword [0x4e8ef4], 0
mov ecx, 1
push ebp
movzx eax, al
mov bh, dl
cmovne eax, ecx
mov byte [esp + 0xb], bh
cmp dword [0x4e8ef0], 0
push esi
push edi
mov dword [esp + 0x14], eax
je 0x412d9d
or eax, 2
mov dword [esp + 0x14], eax
cmp bl, al
je 0x412f9a
test al, al
jne 0x412dde
test bh, bh
jne 0x412dde
push 0x4e9028
push 0
push 0
push 0x413010
push 0x2000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4ea808], eax
test eax, eax
je 0x412e96
push 0xf
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
movzx edi, bh
xor esi, esi
xor edi, 1
movzx ebp, bl
nop dword [eax]
push edi
push ebp
push 0x417
push dword [0x4e9028]
call dword [sym.imp.USER32.dll_PostThreadMessageW]
test eax, eax
jne 0x412e15
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x32
jl 0x412df0
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor bh, bh
call esi
mov ebp, dword [sym.imp.USER32.dll_PeekMessageW]
mov edi, eax
mov dh, bl
mov dl, bh
test bl, bl
je 0x412ea3
push 1
push 0x417
push 0x417
push 0
lea eax, [esp + 0x2c]
push eax
call ebp
test eax, eax
je 0x412e81
cmp dword [esp + 0x24], 0
je 0x412ebd
mov bh, 1
call fcn.00413480
test al, al
jne 0x412ebd
cmp byte [esp + 0x13], al
jne 0x412f6d
xor bl, bl
lea eax, [esp + 0x18]
push eax
push dword [0x4ea808]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [esp + 0x18], 0x103
jne 0x412eca
call esi
sub eax, edi
cmp eax, 0x1f4
ja 0x412ebd
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x412e27
call fcn.004134a0
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esp + 0x13], 0
mov bh, dl
mov bl, dh
je 0x412e66
call fcn.00413480
test al, al
je 0x412f69
jmp 0x412e81
cmp byte [esp + 0x13], 0
jne 0x412f69
jmp 0x412ee5
push dword [0x4ea808]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4ea808], 0
call fcn.004134a0
mov al, byte [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CreateMutexW]
and al, 1
cmp dword [0x4e8ef4], 0
je 0x412f10
test al, al
jne 0x412f2a
push str.AHK_Keybd
push 0
push 0
call esi
mov dword [0x4ea800], eax
jmp 0x412f2a
test al, al
je 0x412f2a
push dword [0x4ea800]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4ea800], 0
mov eax, dword [esp + 0x14]
and al, 2
cmp dword [0x4e8ef0], 0
je 0x412f4f
test al, al
jne 0x412f69
push str.AHK_Mouse
push 0
push 0
call esi
mov dword [0x4ea804], eax
jmp 0x412f69
test al, al
je 0x412f69
push dword [0x4ea804]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4ea804], 0
test bh, bh
je 0x412f9a
push 0
push 0
xorps xmm3, xmm3
mov dword [0x4e47f0], 0
mov edx, 0x10000
mov ecx, str.Warning:_The_keyboard_and_or_mouse_hook_could_not_be_activated__some_parts_of_the_script_will_not_function.
call fcn.00486ce0
add esp, 8
mov dword [0x4e47f0], 1
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret