joyce8/EMBER2024-capa huggingface dataset:
Function at 0x19bb600
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1a1fab1
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x1a3df40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x28], 0
push 0
push 0
mov ecx, dword [ebp + 0xc]
call fcn.019b8240
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jbe 0x19bb6b6
mov byte [ebp - 0x21], 0
lea eax, [ebp - 0x21]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 2
push ecx
lea ecx, [ebp - 0x20]
call fcn.0198a1e0
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x10]
add edx, 1
push edx
push 0
lea ecx, [ebp - 0x20]
call fcn.0198a2c0
push eax
mov ecx, dword [ebp + 0xc]
call fcn.019b8240
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0
lea ecx, [ebp - 0x20]
call fcn.0198a2c0
push eax
mov ecx, dword [ebp + 8]
call fcn.0197f900
mov eax, dword [ebp - 0x28]
or eax, 1
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x20]
call fcn.0198a260
mov eax, dword [ebp + 8]
jmp 0x19bb6d5
mov ecx, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 8]
call fcn.01980410
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x28]
or edx, 1
mov dword [ebp - 0x28], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret

Function at 0x19bbb20
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1a1fbb1
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x1a3df40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x28], 0
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jbe 0x19bbbc8
mov byte [ebp - 0x21], 0
lea ecx, [ebp - 0x21]
push ecx
mov edx, dword [ebp - 0x10]
add edx, 1
push edx
lea ecx, [ebp - 0x20]
call fcn.0198a1e0
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x10]
add eax, 1
push eax
push 0
lea ecx, [ebp - 0x20]
call fcn.0198a2c0
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.USER32.dll_GetWindowTextA]
push 0
lea ecx, [ebp - 0x20]
call fcn.0198a2c0
push eax
mov ecx, dword [ebp + 8]
call fcn.0197f900
mov edx, dword [ebp - 0x28]
or edx, 1
mov dword [ebp - 0x28], edx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x20]
call fcn.0198a260
mov eax, dword [ebp + 8]
jmp 0x19bbbe3
mov ecx, dword [ebp + 8]
call fcn.0197f890
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x28]
or eax, 1
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
Function at 0x19bc640
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1a1fe41
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x1a3df40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x28], 0
push 0
push 0
push 0xe
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [ebp - 0x10], eax
mov byte [ebp - 0x21], 0
lea ecx, [ebp - 0x21]
push ecx
mov edx, dword [ebp - 0x10]
add edx, 1
push edx
lea ecx, [ebp - 0x20]
call fcn.0198a1e0
mov dword [ebp - 4], 1
push 0
lea ecx, [ebp - 0x20]
call fcn.0198a2c0
push eax
mov eax, dword [ebp - 0x10]
add eax, 1
push eax
push 0xd
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
push 0
lea ecx, [ebp - 0x20]
call fcn.0198a2c0
push eax
mov ecx, dword [ebp + 8]
call fcn.0197f900
mov edx, dword [ebp - 0x28]
or edx, 1
mov dword [ebp - 0x28], edx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x20]
call fcn.0198a260
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
Function at 0x19cd6e0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x1a21d40
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push esi
mov eax, dword [0x1a3df40]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 8], esi
mov dword [esi + 4], 0
push 0x1a41d0c
lea ecx, [esp + 0x10]
mov dword [esp + 0x3c], 0
mov dword [esi], 0x1a41df0
call fcn.01982be0
mov byte [esp + 0x38], 1
call fcn.019cc8b4
lea ecx, [esp + 0xc]
mov dword [esi + 8], eax
mov dword [esi + 0xc], edx
mov byte [esp + 0x38], 0
call fcn.01982cb0
mov dword [esi], 0x1a41e14
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x34
ret
Function at 0x19d5830
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x1a22da0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x1a3df40]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
push esi
push edi
mov eax, dword [0x1a3df40]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov edi, dword [esp + 0x54]
cmp dword [edi + 0x14], 8
mov ebx, dword [esp + 0x50]
mov esi, dword [esp + 0x58]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], esi
jb 0x19d587f
mov eax, dword [edi]
jmp 0x19d5881
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x19d58a1
push esi
push edi
push ebx
call fcn.019d38a0
add esp, 0xc
jmp 0x19d59d5
test eax, 0x400
je 0x19d59a3
cmp dword [edi + 0x14], 8
jb 0x19d58b6
mov edx, dword [edi]
jmp 0x19d58b8
mov edx, edi
xor eax, eax
mov word [esp + 0x20], ax
mov ebx, 7
mov eax, edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], 0
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x19d58d5
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x28]
call fcn.0198d5f0
cmp dword [esp + 0x34], 8
mov eax, dword [esp + 0x20]
mov dword [esp + 0x48], 0
jae 0x19d5906
lea eax, [esp + 0x20]
push 0
push 0x2000000
push 3
push 0
push ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x1c], esi
cmp dword [esp + 0x34], 8
mov byte [esp + 0x48], 2
jb 0x19d593a
mov ecx, dword [esp + 0x20]
push ecx
call fcn.019d89d6
add esp, 4
mov dword [esp + 0x34], ebx
xor edx, edx
or ebx, 0xffffffff
mov dword [esp + 0x30], 0
mov word [esp + 0x20], dx
cmp esi, ebx
jne 0x19d596b
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
push eax
push edi
push esi
call fcn.019d38a0
add esp, 0xc
mov eax, esi
jmp 0x19d59d7
push edi
call fcn.019d1b60
add esp, 4
mov dword [esp + 0x48], ebx
push esi
test al, al
jne 0x19d5991
mov edi, dword [esp + 0x18]
mov dword [edi], 9
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x19d59d7
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
test esi, esi
je 0x19d59b9
mov dword [esi], 0
call fcn.019d7bd0
mov dword [esi + 4], eax
mov eax, dword [esp + 0x10]
test al, 0x10
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 3
jne 0x19d59d1
mov dword [esp + 0x10], 2
mov ecx, dword [eax]
mov dword [ebx], ecx
mov eax, ebx
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.019d90da
add esp, 0x3c
ret
Function at 0x19d5a00
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x14]
cmp dword [edi + 0x14], 8
jb 0x19d5a11
mov eax, dword [edi]
jmp 0x19d5a13
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x19d5a3a
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
push eax
push edi
push esi
call fcn.019d38a0
add esp, 0xc
pop edi
mov eax, esi
pop esi
pop ebx
ret
mov esi, dword [esp + 0x18]
test esi, esi
je 0x19d5a50
mov dword [esi], 0
call fcn.019d7bd0
mov dword [esi + 4], eax
test ebx, 0x400
je 0x19d5a85
push edi
call fcn.019d1b60
add esp, 4
test al, al
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 4
jne 0x19d5a79
mov dword [esp + 0x14], 9
mov ecx, dword [eax]
mov eax, dword [esp + 0x10]
pop edi
pop esi
mov dword [eax], ecx
pop ebx
ret
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 3
test bl, 0x10
jne 0x19d5a9e
mov dword [esp + 0x14], 2
mov edx, dword [eax]
mov eax, dword [esp + 0x10]
pop edi
pop esi
mov dword [eax], edx
pop ebx
ret

Function at 0x19d90da
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x1a3df40]
jne 0x19d90e4
repz ret
jmp fcn.019e460c
Function at 0x19f3b72
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x1a3df40]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.019e3ff9
and dword [ebp - 0x14], 0
cmp dword [0x1a59ebc], 0
mov dword [ebp - 0x18], eax
jne 0x19f3c25
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x19f3ccd
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x19f3ccd
mov esi, dword [0x1a3f390]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x1a59ebc], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x1a59ec0], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x1a59ec4], eax
call edi
push eax
call esi
mov dword [0x1a59ecc], eax
test eax, eax
je 0x19f3c25
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x1a59ec8], eax
mov eax, dword [0x1a59ec8]
mov ecx, dword [ebp - 0x18]
mov esi, dword [0x1a3f394]
cmp eax, ecx
je 0x19f3c7e
cmp dword [0x1a59ecc], ecx
je 0x19f3c7e
push eax
call esi
push dword [0x1a59ecc]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x19f3c7e
test ebx, ebx
je 0x19f3c7e
call edi
test eax, eax
je 0x19f3c75
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x19f3c75
test byte [ebp - 8], 1
jne 0x19f3c7e
or dword [ebp + 0x10], 0x200000
jmp 0x19f3cb1
mov eax, dword [0x1a59ec0]
cmp eax, dword [ebp - 0x18]
je 0x19f3cb1
push eax
call esi
test eax, eax
je 0x19f3cb1
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x19f3cb1
mov eax, dword [0x1a59ec4]
cmp eax, dword [ebp - 0x18]
je 0x19f3cb1
push eax
call esi
test eax, eax
je 0x19f3cb1
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x1a59ebc]
call esi
test eax, eax
je 0x19f3ccd
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x19f3ccf
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.019d90da
leave
ret
Function at 0x19fe666
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [edi + 0x2c]
push esi
mov esi, dword [edi + 0x3c]
sub esi, dword [edi + 0x74]
mov eax, dword [edi + 0x6c]
mov ecx, dword [edi + 0x2c]
lea ecx, [ebx + ecx - 0x106]
sub esi, eax
cmp eax, ecx
jb 0x19fe6eb
mov eax, dword [edi + 0x38]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call fcn.019d9900
mov eax, dword [edi + 0x4c]
mov ecx, dword [edi + 0x44]
sub dword [edi + 0x70], ebx
sub dword [edi + 0x6c], ebx
add esp, 0xc
sub dword [edi + 0x5c], ebx
mov dword [ebp - 4], eax
lea eax, [ecx + eax*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x19fe6ae
mov eax, dword [edi + 0x40]
mov dword [ebp - 4], ebx
lea eax, [eax + ebx*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x19fe6d0
add esi, ebx
mov eax, dword [edi]
cmp dword [eax + 4], 0
je 0x19fe746
mov ecx, dword [edi + 0x74]
add ecx, dword [edi + 0x6c]
push esi
add ecx, dword [edi + 0x38]
mov esi, eax
push ecx
call fcn.019fe3b6
add dword [edi + 0x74], eax
mov esi, dword [edi + 0x74]
cmp esi, 3
pop ecx
pop ecx
jb 0x19fe732
mov eax, dword [edi + 0x6c]
mov ecx, dword [edi + 0x38]
lea edx, [eax + ecx]
movzx eax, byte [edx]
mov ecx, dword [edi + 0x58]
mov dword [edi + 0x48], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [edi + 0x54]
mov dword [edi + 0x48], eax
cmp esi, 0x106
jae 0x19fe746
mov eax, dword [edi]
cmp dword [eax + 4], 0
jne 0x19fe66f
pop esi
pop ebx
leave
ret
Function at 0x1000128f
Capabilities:
Query environment variable

Disassembly:
push ebx
xor ebx, ebx
cmp dword [esp + 8], ebx
je 0x100012b2
push 0x104
push dword [esp + 0xc]
push str.USER_JPI_PROFILE
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x100012b2
mov bl, 1
mov al, bl
pop ebx
ret

Function at 0x100017d8
Capabilities:
Get common file path

Disassembly:
push 0x14
mov eax, 0x10011265
call fcn.10002bb0
mov eax, dword [ebp + 8]
push 0x104
push eax
xor edi, edi
push edi
push edi
xor ecx, ecx
push 0x10012858
mov word [eax], cx
mov dword [ebp - 4], edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathEx]
mov esi, eax
cmp esi, edi
jge 0x1000184c
push esi
push str.Error:_08x_in_SHGetFolderPathEx_FOLDERID_LocalAppDataLow__0__NULL__pPath__MAX_PATH_
call fcn.1000230d
pop ecx
pop ecx
push edi
push esi
call fcn.10010cd2
mov ecx, dword [ebp - 0x18]
mov esi, dword [ecx + 4]
mov dword [ebp - 0x14], esi
call fcn.10002085
push eax
push esi
push 0x100124f4
call fcn.1000230d
or dword [ebp - 4], 0xffffffff
add esp, 0xc
mov eax, 0x10001845
ret
or dword [ebp - 4], 0xffffffff
cmp esi, edi
jge 0x100018fd
push dword [ebp + 8]
mov dword [ebp - 4], 2
push edi
push edi
push 0x1a
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov esi, eax
cmp esi, edi
jge 0x100018a9
push esi
push str.Error:_08x_in_SHGetFolderPathW_NULL__CSIDL_APPDATA__NULL__0__pPath_
jmp 0x10001810
or dword [ebp - 4], 0xffffffff
cmp esi, edi
jge 0x100018fd
push 1
push 0x1a
push dword [ebp + 8]
mov dword [ebp - 4], 4
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov esi, eax
cmp esi, edi
jge 0x100018fd
push esi
push str.Error:_08x_in_SHGetSpecialFolderPathW_NULL__pPath__CSIDL_APPDATA__TRUE_
jmp 0x10001810
mov eax, esi
call fcn.10002be6
ret

Function at 0x10002390
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x10016040]
jne 0x1000239a
repz ret
jmp fcn.100046fe
Function at 0x10010cd2
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
pushal
call 0x10010ce1
pop dword [ebp - 0x10]
mov eax, 0x10010ce1
sub dword [ebp - 0x10], eax
mov dword [ebp - 0x20], 0xf81c6dc1
add dword [ebp - 0x20], 0x5635d78a
mov dword [ebp - 0x1c], 0x1d6bd37e
sub dword [ebp - 0x1c], 0xeb388739
mov dword [ebp - 0x18], 0x76fb681
add dword [ebp - 0x18], 0x44dc8dad
mov dword [ebp - 0x14], 0x33e3c5c4
add dword [ebp - 0x14], 0xcc1c3a3c
lea eax, [ebp - 0x20]
push eax
mov eax, 0x775a1a24
sub eax, 0x6758f9ec
add eax, dword [ebp - 0x10]
call dword [eax]
mov dword [ebp - 0x20], 0x9c7f2636
sub dword [ebp - 0x20], 0x280cbce0
mov dword [ebp - 0x1c], 0x57ca93e0
sub dword [ebp - 0x1c], 0x165e326b
mov dword [ebp - 0x18], 0x7550a28f
add dword [ebp - 0x18], 0xee1ec9dd
mov dword [ebp - 0x14], 0x8a84556d
sub dword [ebp - 0x14], 0x8a84556d
lea ebx, [ebp - 0x20]
push ebx
push eax
mov eax, sym.imp.kernel32.dll_GetProcAddress
add eax, dword [ebp - 0x10]
call dword [eax]
push 0x40
push 0x1000
push 0x3a1a9
push 0
call eax
mov ecx, 0x941ab2aa
sub ecx, 0x941a6917
mov edx, eax
mov ebx, 0x96a49248
add ebx, 0x795da7b8
add ebx, dword [ebp - 0x10]
mov esi, 0xed8054a9
sub esi, 0xe4de3c49
xor dword [ebp - 0xc], edx
mov edi, dword [ebx]
add dword [ebp - 8], edi
sub edi, esi
xor dword [ebp - 8], ecx
mov dword [edx], edi
add dword [ebp - 4], eax
add edx, 0xf5a8f64a
add edx, 0xa5709ba
add ebx, 4
loop 0x10010df9
add eax, 0x1191f
mov ebx, eax
add eax, 0x7993e3e
sub eax, 0x7993e39
mov ecx, 0x8e3e84bd
sub ecx, 0x7e3e84bd
add ecx, dword [ebp - 0x10]
call ebx
leave
ret
Function at 0x40a15c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
mov word [ebp + 0xc], ax
mov ebx, 0x19826993
mov eax, ebx
mul ebx
mov dword [ebp - 0x10], eax
mov ebx, eax
xor esi, esi
mov eax, ebx
mul ebx
mov dword [ebp - 0x14], eax
mov ebx, eax
mov word [ebp - 0xc], 0
jmp 0x40a272
mov eax, ebx
xor eax, ebx
mov ebx, eax
mov eax, dword [ebp + 8]
add eax, esi
push eax
call fcn.00405066
pop ecx
mov edx, eax
mov byte [ebp - 1], dl
cmp byte [ebp - 1], 0
jne 0x40a1b3
mov byte [ebp - 2], 0
jmp 0x40a1dd
call fcn.0040ddd8
mov dword [ebp - 0x18], eax
mov eax, 0x7fff
mov edi, 7
movzx edx, byte [ebp - 1]
mov ecx, edi
sub ecx, edx
cdq
idiv ecx
mov ecx, eax
mov eax, dword [ebp - 0x18]
cdq
idiv ecx
mov edx, eax
mov byte [ebp - 2], dl
mov eax, dword [ebp + 8]
mov al, byte [esi + eax]
cmp al, 0x70
jb 0x40a1fc
cmp al, 0x7f
ja 0x40a1fc
mov eax, dword [ebp + 8]
add eax, esi
inc eax
movzx edx, byte [eax]
movzx ecx, byte [ebp - 2]
sub edx, ecx
mov byte [eax], dl
mov eax, dword [ebp + 8]
movzx eax, byte [esi + eax]
cmp eax, 0xe2
jne 0x40a21b
mov eax, dword [ebp + 8]
add eax, esi
inc eax
movzx edx, byte [eax]
movzx ecx, byte [ebp - 2]
sub edx, ecx
mov byte [eax], dl
mov eax, ebx
sub eax, ebx
mov ebx, eax
push 8
push 0x90
lea eax, [ebp - 0xa]
push eax
call fcn.0040ddc0
movzx eax, byte [ebp - 1]
push eax
mov eax, dword [ebp + 8]
add eax, esi
push eax
lea eax, [ebp - 0xa]
movzx edx, byte [ebp - 2]
add eax, edx
push eax
call fcn.0040ddb4
mov eax, ebx
sub eax, ebx
mov ebx, eax
push 6
lea eax, [ebp - 0xa]
push eax
mov eax, dword [ebp + 8]
add eax, esi
push eax
call fcn.0040ddb4
add esp, 0x24
mov eax, ebx
add eax, ebx
mov ebx, eax
add esi, 6
inc word [ebp - 0xc]
movzx eax, word [ebp + 0xc]
dec eax
cmp esi, eax
jb 0x40a190
pop edi
pop esi
pop ebx
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x401000
Capabilities:
Accept command line arguments
Access peb ldr_data
Resume thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x78
push esi
push edi
lea eax, [esp + 0x14]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [esp + 0x10], eax
test eax, eax
je 0x401174
cmp dword [esp + 0x14], 1
jl 0x401174
xorps xmm0, xmm0
mov dword [esp + 0x38], 0x44
push str.KrkrUniversalPatch.dll
lea eax, [esp + 0x1c]
movlpd qword [esp + 0x40], xmm0
push eax
movlpd qword [esp + 0x4c], xmm0
movlpd qword [esp + 0x54], xmm0
movlpd qword [esp + 0x5c], xmm0
movlpd qword [esp + 0x64], xmm0
movlpd qword [esp + 0x6c], xmm0
movlpd qword [esp + 0x74], xmm0
movlpd qword [esp + 0x7c], xmm0
movaps xmmword [esp + 0x28], xmm0
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov eax, dword fs:[0x30]
mov ecx, dword [eax + 0xc]
mov ecx, dword [ecx + 0x1c]
sub ecx, 0x10
mov edi, ecx
mov ecx, dword [ecx + 0x10]
sub ecx, 0x10
mov edx, dword [ecx + 0x30]
test edx, edx
je 0x4010e4
mov eax, dword [edx]
mov esi, dword [edx + 4]
and eax, 0xffdfffdf
and esi, 0xffdfffdf
cmp eax, 0x45004b
jne 0x4010e4
cmp esi, 0x4e0052
jne 0x4010e4
mov eax, dword [edx + 8]
mov esi, dword [edx + 0xc]
and eax, 0xffdfffdf
and esi, 0xffdfffdf
cmp eax, 0x4c0045
jne 0x4010e4
cmp esi, 0x120013
jne 0x4010e4
cmp word [edx + 0x10], 0x2e
je 0x4010ea
cmp edi, ecx
jne 0x401091
xor ecx, ecx
mov ecx, dword [ecx + 0x18]
mov edx, 0x638020fb
call fcn.004015c0
push 0
lea ecx, [esp + 0x24]
mov dword [0x4145a8], eax
push ecx
lea ecx, [esp + 0x40]
push ecx
push 0
push 0
push 4
push 0
push 0
push 0
push str.rina_witch.exe
push 0
push 0
call eax
test eax, eax
je 0x40115c
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x18]
mov ecx, dword [esp + 0x20]
sub esp, 0xc
push eax
call fcn.00401330
add esp, 0x10
push 0
push dword [esp + 0x28]
call dword [sym.imp.ntdll.dll_NtResumeThread]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
push 0x10
push str.Krkr_Universal_Patch
push str.Couldnt_Launch_Game
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x10

Function at 0x4011e0
Capabilities:
Parse pe header

Disassembly:
push esi
mov esi, ecx
mov eax, 0x5a4d
push edi
cmp word [esi], ax
jne 0x401240
mov eax, dword [esi + 0x3c]
add eax, esi
cmp dword [eax], 0x4550
jne 0x401240
movzx ecx, word [eax + 0x18]
mov edx, 0x10b
cmp cx, dx
je 0x40121a
mov edx, 0x20b
cmp cx, dx
jne 0x401240
mov ecx, 0x88
jmp 0x40121f
mov ecx, 0x78
mov edx, dword [eax + 0x50]
lea edi, [eax + ecx]
mov ecx, edi
call fcn.004011a0
test eax, eax
je 0x401240
mov eax, dword [edi]
cmp dword [eax + esi + 0x1c], edx
jae 0x401240
pop edi
mov eax, 1
pop esi
ret
pop edi
xor eax, eax
pop esi
ret