joyce8/EMBER2024-capa huggingface dataset:
Function at 0x415de7
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4219a0]
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.0040b9e6
and dword [ebp - 0x14], 0
cmp dword [0x42392c], 0
mov dword [ebp - 0x18], eax
jne 0x415e9a
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x415f42
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x415f42
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x42392c], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x423930], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x423934], eax
call edi
push eax
call esi
mov dword [0x42393c], eax
test eax, eax
je 0x415e9a
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x423938], eax
mov eax, dword [0x423938]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x415ef3
cmp dword [0x42393c], ecx
je 0x415ef3
push eax
call esi
push dword [0x42393c]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x415ef3
test ebx, ebx
je 0x415ef3
call edi
test eax, eax
je 0x415eea
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x415eea
test byte [ebp - 8], 1
jne 0x415ef3
or dword [ebp + 0x10], 0x200000
jmp 0x415f26
mov eax, dword [0x423930]
cmp eax, dword [ebp - 0x18]
je 0x415f26
push eax
call esi
test eax, eax
je 0x415f26
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x415f26
mov eax, dword [0x423934]
cmp eax, dword [ebp - 0x18]
je 0x415f26
push eax
call esi
test eax, eax
je 0x415f26
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x42392c]
call esi
test eax, eax
je 0x415f42
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x415f44
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004085e2
leave
ret
Function at 0x404bf0
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x264
mov eax, dword [0x417018]
xor eax, esp
mov dword [esp + 0x260], eax
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x10], 0x104
jb 0x404c1f
xor al, al
jmp 0x404d20
xor ebx, ebx
push edi
lea esi, [esp + 0x14]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov word [esp + 0x1c], bx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.00404fd8
pop ecx
test al, al
je 0x404c74
cmp byte [esp + 0x18], bl
je 0x404c74
cmp dword [edi + 0x14], 8
jb 0x404c63
mov edi, dword [edi]
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
setne al
jmp 0x404d20
cmp dword [edi + 0x14], 8
jb 0x404c7e
mov eax, dword [edi]
jmp 0x404c80
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x404c92
mov al, 1
jmp 0x404d20
xor eax, eax
push 0x208
mov word [esp + 0x5c], ax
lea eax, [esp + 0x5e]
push ebx
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
cmp dword [edi + 0x14], 8
jb 0x404cb4
mov edi, dword [edi]
lea ecx, [esp + 0x58]
sub ecx, edi
movzx eax, word [edi]
mov word [ecx + edi], ax
add edi, 2
cmp ax, bx
jne 0x404cba
push 6
xor eax, eax
pop ecx
mov dword [esp + 0x38], ebx
lea edi, [esp + 0x3c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x58]
mov dword [esp + 0x40], eax
mov eax, 0x1494
mov word [esp + 0x48], ax
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x40], 3
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
cmp dword [esp + 0x4a], ebx
jne 0x404c18
cmp eax, ebx
je 0x404d1d
cmp eax, 2
je 0x404d1d
cmp eax, 0x402
je 0x404d1d
xor eax, eax
jmp 0x404d20
xor eax, eax
inc eax
mov ecx, dword [esp + 0x26c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040cc2c
mov esp, ebp
pop ebp
ret

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

Disassembly:
cmp dword [eax + 0x14], 8
jb 0x404d3d
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne al
ret

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

Disassembly:
cmp dword [eax + 0x14], 8
jb 0x404d55
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404d68
shr eax, 4
and eax, 1
ret
xor al, al
ret
Function at 0x404d6b
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x1e4]
sub esp, 0x264
mov eax, dword [0x417018]
xor eax, ebp
mov dword [ebp + 0x1e0], eax
lea eax, [ebp - 0x2c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
dec eax
cmp eax, 0x102
ja 0x404df3
push esi
push edi
lea eax, [ebp - 0x2c]
push eax
lea esi, [ebp - 0x80]
call fcn.00402843
mov eax, esi
push eax
lea esi, [ebp - 0x64]
call fcn.004023d1
mov eax, esi
push eax
lea esi, [ebp - 0x48]
call fcn.004023d1
mov edi, esi
call fcn.00402d89
push ebx
mov eax, esi
call fcn.00402a14
push 1
xor edi, edi
call fcn.00402865
push 1
lea esi, [ebp - 0x64]
call fcn.00402865
push 1
lea esi, [ebp - 0x80]
call fcn.00402865
pop edi
mov al, 1
pop esi
jmp 0x404df5
xor al, al
mov ecx, dword [ebp + 0x1e0]
xor ecx, ebp
call fcn.0040cc2c
add ebp, 0x1e4
leave
ret
Function at 0x404e0a
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe0
mov eax, dword [0x417018]
xor eax, ebp
mov dword [ebp - 8], eax
and dword [ebp - 0x28], 0
push ebx
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0x14], 8
push esi
push edi
jb 0x404e31
mov esi, dword [ebx]
jmp 0x404e33
mov esi, ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404ed0
test al, 0x10
je 0x404e58
mov al, 1
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040cc2c
leave
ret
xor eax, eax
inc eax
cmp dword [0x418060], eax
jg 0x404eb8
push str.file_util_win.cc
mov ebx, 0x29e
lea edi, [ebp - 0xdc]
mov dword [ebp - 0x28], 2
call fcn.00406800
push str.conflicts_with_existing_file.
push ecx
push 0x413708
push ecx
push esi
push ecx
add eax, 8
push str.CreateDirectory_
push eax
call fcn.0040354a
add esp, 0xc
mov ecx, eax
call fcn.00406d68
pop ecx
pop ecx
push eax
call fcn.0040354a
add esp, 0xc
push eax
call fcn.0040354a
pop ecx
pop ecx
test byte [ebp - 0x28], 2
je 0x404ec9
lea ecx, [ebp - 0xdc]
call fcn.0040692e
xor al, al
jmp 0x404e49
push ebx
lea eax, [ebp - 0x24]
call fcn.00402a46
cmp dword [ebx + 0x14], 8
mov edi, dword [ebx + 0x10]
jb 0x404ee6
mov eax, dword [ebx]
jmp 0x404ee8
mov eax, ebx
push eax
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x24]
call fcn.0040307c
test eax, eax
jne 0x404f06
push 1
xor edi, edi
lea esi, [ebp - 0x24]
call fcn.00402865
jmp 0x404ec9
lea eax, [ebp - 0x24]
push eax
call fcn.00404e0a
pop ecx
test al, al
jne 0x404f29
xor bl, bl
push 1
xor edi, edi
lea esi, [ebp - 0x24]
call fcn.00402865
mov al, bl
jmp 0x404e49
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x404f51
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
cmp eax, 0xb7
jne 0x404f55
mov eax, ebx
call fcn.00404d4d
test al, al
je 0x404f55
mov bl, 1
jmp 0x404f16
xor eax, eax
inc eax
cmp dword [0x418060], eax
jg 0x404fbe
push str.file_util_win.cc
mov ebx, 0x2ba
lea edi, [ebp - 0xdc]
mov dword [ebp - 0x28], 8
call fcn.00406800
push 0x413740
push dword [ebp - 0x2c]
add eax, 8
push str.__last_error_is
push ecx
push esi
push ecx
push str.Failed_to_create_directory
push eax
call fcn.0040354a
add esp, 0xc
mov ecx, eax
call fcn.00406d68
pop ecx
pop ecx
push eax
call fcn.0040354a
pop ecx
pop ecx
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
push eax
call fcn.0040354a
pop ecx
pop ecx
test byte [ebp - 0x28], 8
je 0x404f14
lea ecx, [ebp - 0xdc]
call fcn.0040692e
jmp 0x404f14
Function at 0x40506b
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x1e0]
sub esp, 0x260
mov eax, dword [0x417018]
xor eax, ebp
mov dword [ebp + 0x1dc], eax
xor eax, eax
push esi
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x2c]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x4050f9
cmp eax, esi
ja 0x4050f9
push edi
lea eax, [ebp - 0x2c]
push eax
lea esi, [ebp - 0x80]
call fcn.00402843
mov eax, esi
push eax
lea esi, [ebp - 0x64]
call fcn.004023d1
mov eax, esi
push eax
lea esi, [ebp - 0x48]
call fcn.004023d1
mov edi, esi
call fcn.00402d89
push ebx
mov eax, esi
call fcn.00402a14
push 1
xor edi, edi
call fcn.00402865
push 1
lea esi, [ebp - 0x64]
call fcn.00402865
push 1
lea esi, [ebp - 0x80]
call fcn.00402865
mov al, 1
pop edi
jmp 0x4050fb
xor al, al
mov ecx, dword [ebp + 0x1dc]
xor ecx, ebp
pop esi
call fcn.0040cc2c
add ebp, 0x1e0
leave
ret

Function at 0x406690
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
mov eax, dword [0x417018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi + 0x10], ebx
je 0x4067f1
cmp byte [0x41806f], bl
je 0x4067f1
mov edi, 0x104
push edi
lea eax, [ebp - 0x210]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x210]
push 0x5c
push eax
call dword [sym.imp.MSVCR100.dll_wcsrchr]
pop ecx
pop ecx
cmp eax, ebx
je 0x4066ee
xor ecx, ecx
mov word [eax + 2], cx
push str.debug_message.exe
lea eax, [ebp - 0x210]
push edi
push eax
call dword [sym.imp.MSVCR100.dll_wcscat_s]
add esp, 0xc
cmp dword [esi + 0x14], 0x10
jb 0x406714
mov eax, dword [esi]
mov dword [ebp - 0x234], eax
jmp 0x40671a
mov dword [ebp - 0x234], esi
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x230], eax
lea eax, [ebp - 0x234]
lea ecx, [ebp - 0x22c]
call fcn.00406efe
cmp dword [ebp - 0x21c], ebx
je 0x4067e2
push 0x44
pop esi
push esi
lea eax, [ebp - 0x290]
push ebx
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [ebp - 0x22c]
add esp, 0xc
cmp dword [ebp - 0x218], 8
mov dword [ebp - 0x290], esi
jae 0x40676f
lea eax, [ebp - 0x22c]
lea ecx, [ebp - 0x244]
push ecx
lea ecx, [ebp - 0x290]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x4067bb
push 0xffffffffffffffff
push dword [ebp - 0x244]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x240]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x244]
call esi
jmp 0x4067e2
cmp dword [ebp - 0x218], 8
mov eax, dword [ebp - 0x22c]
jae 0x4067d0
lea eax, [ebp - 0x22c]
push 0x40010
push str.Fatal_error
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
push 1
xor edi, edi
lea esi, [ebp - 0x22c]
call fcn.00402865
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040cc2c
leave
ret
Function at 0x40692e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov eax, dword [0x417018]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
push edi
push dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ebx, ecx
lea ecx, [ebx + 8]
mov dword [esp + 0x18], ecx
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea edx, [esp + 0x1c]
lea ecx, [ebx + 0xc]
call fcn.00404735
mov eax, dword [0x418078]
xor esi, esi
cmp eax, esi
je 0x406997
lea ecx, [esp + 0x1c]
push ecx
push dword [ebx + 0xa0]
push dword [ebx + 0xa8]
push dword [ebx + 0xa4]
push dword [ebx]
call eax
add esp, 0x14
test al, al
jne 0x406aa1
cmp dword [ebx], 2
jl 0x4069d5
cmp dword [esp + 0x30], 0x10
mov eax, dword [esp + 0x1c]
jae 0x4069ab
lea eax, [esp + 0x1c]
mov esi, dword [sym.imp.MSVCR100.dll___iob_func]
push eax
push 0x413a28
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
pop ecx
xor esi, esi
call fcn.00406468
lea eax, [esp + 0x13]
push eax
call fcn.00406419
call fcn.0040656f
test al, al
je 0x406a23
push 2
push esi
push esi
push dword [0x418068]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esp + 0x30], 0x10
mov eax, dword [esp + 0x1c]
jae 0x406a0c
lea eax, [esp + 0x1c]
push esi
lea ecx, [esp + 0x1c]
push ecx
push dword [esp + 0x34]
push eax
push dword [0x418068]
call dword [sym.imp.KERNEL32.dll_WriteFile]
call fcn.00406445
mov eax, dword [ebx]
cmp eax, 4
jne 0x406a60
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x406a3e
call fcn.00407e47
cmp dword [0x418070], esi
je 0x406a39
lea edx, [esp + 0x38]
lea ecx, [ebx + 0xc]
call fcn.00404735
lea eax, [esp + 0x38]
push eax
call dword [0x418070]
pop ecx
jmp 0x406a94
cmp eax, 3
jne 0x406aa1
lea edx, [esp + 0x38]
lea ecx, [ebx + 0xc]
cmp dword [0x418074], esi
je 0x406a86
call fcn.00404735
lea eax, [esp + 0x38]
push eax
call dword [0x418074]
jmp 0x406a5d
call fcn.00404735
lea ecx, [esp + 0x38]
call fcn.00406690
push 1
xor edi, edi
lea esi, [esp + 0x3c]
call fcn.004028b2
push 1
xor edi, edi
lea esi, [esp + 0x20]
call fcn.004028b2
push dword [ebx + 0xac]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x14]
call fcn.00404146
mov ecx, dword [esp + 0x54]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040cc2c
mov esp, ebp
pop ebp
ret
Function at 0x4079d7
Capabilities:
Check os version
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x208
mov eax, dword [0x417018]
xor eax, esp
mov dword [esp + 0x204], eax
and dword [esp + 8], 0
and dword [esi], 0
push ebx
push edi
push 3
pop ebx
mov dword [esi + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push str.IsWow64Process
push str.kernel32.dll
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x407a43
and dword [esp + 0xc], 0
lea ecx, [esp + 0xc]
push ecx
push edi
call eax
test eax, eax
jne 0x407a3a
push 2
pop eax
jmp 0x407a43
xor eax, eax
cmp dword [esp + 0xc], eax
setne al
push 0x118
mov dword [esi + 0x24], eax
lea eax, [esp + 0xf0]
push 0
push eax
mov dword [esp + 0xf4], 0x11c
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [esp + 0xe8]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [esp + 0xec]
mov ecx, dword [esp + 0xf0]
mov edx, dword [esp + 0xf4]
push 5
pop edi
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
cmp eax, edi
jne 0x407ab0
test ecx, ecx
jle 0x407b2f
xor eax, eax
cmp ecx, 1
setne al
inc eax
mov dword [esi], eax
jmp 0x407b2f
push 6
pop edx
cmp eax, edx
jne 0x407add
cmp byte [esp + 0x202], 1
jne 0x407ad5
sub ecx, 0
je 0x407ad1
dec ecx
je 0x407acd
mov dword [esi], edx
jmp 0x407b2f
mov dword [esi], edi
jmp 0x407b2f
mov dword [esi], ebx
jmp 0x407b2f
mov dword [esi], 4
jmp 0x407b2f
jle 0x407b2f
xor eax, eax
inc eax
cmp dword [0x41805c], eax
jne 0x407b19
cmp dword [0x418060], ebx
jg 0x407b19
push str.winwindows_version.cc
mov dword [esp + 0x14], eax
push 0x39
mov eax, ebx
pop ebx
lea edi, [esp + 0x3c]
call fcn.00406800
add eax, 8
push str.Check_failed:_false.
push eax
call fcn.0040354a
pop ecx
pop ecx
test byte [esp + 0x10], 1
je 0x407b29
lea ecx, [esp + 0x38]
call fcn.0040692e
mov dword [esi], 7
movzx eax, word [esp + 0x1fc]
and dword [esp + 0x14], 0
mov dword [esi + 0x10], eax
movzx eax, word [esp + 0x1fe]
push 8
mov dword [esi + 0x14], eax
pop ecx
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
movzx eax, word [esp + 0x14]
test eax, eax
je 0x407b85
cmp eax, 6
je 0x407b7c
cmp eax, 9
jne 0x407b89
mov dword [esi + 0x18], 1
jmp 0x407b89
mov dword [esi + 0x18], 2
jmp 0x407b89
and dword [esi + 0x18], 0
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20c]
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x30]
pop edi
pop ebx
mov dword [esi + 0x20], eax
xor ecx, esp
mov eax, esi
call fcn.0040cc2c
mov esp, ebp
pop ebp
ret
Function at 0x408043
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x4085d1
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
xor eax, eax
mov dword [ebp - 8], eax
cmp dword [esi + 0x4090], eax
je 0x408633
cmp dword [esi + 0x6c], eax
jbe 0x408633
push ebx
mov dword [ebp - 4], 0xffffff78
sub dword [ebp - 4], esi
push edi
lea ebx, [esi + 0x88]
lea eax, [esi + 0x4094]
call fcn.00408026
mov edi, dword [esi + 0x40a0]
mov dword [ebp - 0xc], eax
movzx eax, byte [ebx]
push eax
lea ecx, [esi + 0x4094]
call fcn.00408043
mov al, byte [ebp - 0xc]
xor byte [ebx], al
mov eax, dword [ebp - 4]
add esp, 4
inc ebx
add eax, ebx
cmp eax, dword [esi + 0x6c]
jb 0x4085fb
pop edi
pop ebx
push dword [esi + 0x6c]
lea eax, [esi + 0x88]
push eax
push dword [esi + 0x20]
push dword [esi + 0x1c]
call dword [esi + 8]
add esp, 0x10
cmp eax, dword [esi + 0x6c]
je 0x408652
or dword [ebp - 8], 0xffffffff
and dword [esi + 0x6c], 0
mov eax, dword [ebp - 8]
leave
ret
Function at 0x408741
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xc
push edi
xor edi, edi
mov dword [esp + 4], edi
mov dword [esp + 8], edi
cmp ebx, edi
jne 0x40875b
push 0xffffffffffffff9a
pop eax
jmp 0x40890c
cmp dword [ebx + 0x2c], edi
je 0x408753
cmp dword [ebx + 0x80], 8
push ebp
push esi
mov dword [ebx + 0x34], edi
jne 0x4087b6
cmp dword [ebx + 0x84], edi
jne 0x4087b6
cmp dword [ebx + 0x40], 0
jne 0x408793
mov esi, ebx
call fcn.004085d1
lea eax, [ebx + 0x88]
mov dword [ebx + 0x40], 0x4000
mov dword [ebx + 0x3c], eax
mov esi, dword [ebx + 0x44]
push 4
lea edi, [ebx + 0x30]
call fcn.00408dad
mov edi, eax
mov eax, dword [ebx + 0x44]
sub eax, esi
add dword [ebx + 0x6c], eax
pop ecx
test edi, edi
je 0x408776
cmp edi, 1
jne 0x4087b6
xor edi, edi
cmp dword [ebx + 0x6c], 0
jbe 0x4087ce
test edi, edi
jne 0x4087ce
mov esi, ebx
call fcn.004085d1
cmp eax, 0xffffffff
jne 0x4087ce
or edi, eax
cmp dword [ebx + 0x80], 8
jne 0x4087ee
cmp dword [ebx + 0x84], 0
jne 0x408808
lea esi, [ebx + 0x30]
call fcn.004094e6
and dword [ebx + 0x68], 0
mov edi, eax
cmp dword [ebx + 0x84], 0
jne 0x408808
mov eax, dword [ebx + 0x408c]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x38]
mov dword [esp + 0x10], eax
mov esi, dword [ebx + 0x74]
mov ebp, dword [ebx + 0x40a4]
mov ecx, dword [esp + 0xc]
add ebp, dword [ebx + 0x44]
push 4
add esi, 0x10
pop edx
call fcn.0040817c
mov esi, dword [ebx + 0x74]
push 4
add esi, 0x14
pop edx
mov ecx, ebp
call fcn.0040817c
xor ecx, ecx
inc ecx
cmp dword [ebx + 0x5c], ecx
jne 0x408849
mov esi, dword [ebx + 0x74]
push 2
add esi, 0x24
pop edx
call fcn.0040817c
mov esi, dword [ebx + 0x74]
mov ecx, dword [esp + 0x10]
push 4
add esi, 0x18
pop edx
call fcn.0040817c
test edi, edi
jne 0x408871
push dword [ebx + 0x78]
lea edi, [ebx + 0x24]
push dword [ebx + 0x74]
call fcn.004080a5
pop ecx
pop ecx
mov edi, eax
push dword [ebx + 0x74]
call dword [sym.imp.MSVCR100.dll_free]
pop ecx
test edi, edi
jne 0x4088fe
push dword [ebx + 0x20]
push dword [ebx + 0x1c]
call dword [ebx + 0xc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x70]
push edi
add eax, 0xe
push eax
push dword [ebx + 0x20]
push dword [ebx + 0x1c]
call dword [ebx + 0x10]
add esp, 0x18
test eax, eax
je 0x4088a9
or edi, 0xffffffff
jmp 0x4088e5
push dword [ebx + 0x20]
mov ecx, dword [esp + 0x10]
push 4
pop esi
mov edi, ebx
call fcn.00408133
mov edi, eax
pop ecx
test edi, edi
jne 0x4088e5
push dword [ebx + 0x20]
mov ecx, ebp
mov edi, ebx
call fcn.00408133
mov edi, eax
pop ecx
test edi, edi
jne 0x4088e5
push dword [ebx + 0x20]
mov ecx, dword [esp + 0x14]
mov edi, ebx
call fcn.00408133
pop ecx
mov edi, eax
push 0
push dword [esp + 0x18]
push dword [ebx + 0x20]
push dword [ebx + 0x1c]
call dword [ebx + 0x10]
add esp, 0x10
test eax, eax
je 0x4088fe
or edi, 0xffffffff
inc dword [ebx + 0x40b0]
and dword [ebx + 0x2c], 0
pop esi
mov eax, edi
pop ebp
pop edi
add esp, 0xc
ret
Function at 0x4097e5
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [esi + 0x2c]
push edi
mov edi, dword [esi + 0x3c]
sub edi, dword [esi + 0x74]
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x2c]
sub edi, eax
lea ecx, [ebx + ecx - 0x106]
mov dword [ebp - 8], edi
cmp eax, ecx
jb 0x409874
mov eax, dword [esi + 0x38]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call sub.MSVCR100.dll_memcpy
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x44]
sub dword [esi + 0x70], ebx
sub dword [esi + 0x6c], ebx
add esp, 0xc
sub dword [esi + 0x5c], ebx
mov dword [ebp - 4], eax
lea eax, [ecx + eax*2]
sub eax, 2
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 0x409832
mov eax, dword [esi + 0x40]
mov dword [ebp - 4], ebx
lea eax, [eax + ebx*2]
sub eax, 2
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 0x409855
add edi, ebx
mov dword [ebp - 8], edi
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x409939
mov ecx, dword [esi + 0x74]
add ecx, dword [esi + 0x6c]
mov eax, dword [edi + 4]
add ecx, dword [esi + 0x38]
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], eax
cmp eax, edx
jbe 0x40989c
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
jne 0x4098a6
xor eax, eax
jmp 0x4098fd
sub eax, dword [ebp - 4]
mov dword [edi + 4], eax
mov eax, dword [edi + 0x1c]
mov eax, dword [eax + 0x18]
cmp eax, 1
jne 0x4098c6
push dword [ebp - 4]
mov ecx, dword [edi]
mov eax, dword [edi + 0x30]
call fcn.0040b94b
jmp 0x4098e0
cmp eax, 2
jne 0x4098e7
mov edx, dword [edi]
mov eax, dword [edi + 0x30]
test edx, edx
jne 0x4098d8
xor eax, eax
jmp 0x4098e4
push dword [ebp - 4]
call fcn.0040a1e8
pop ecx
mov ecx, dword [ebp - 0xc]
mov dword [edi + 0x30], eax
push dword [ebp - 4]
push dword [edi]
push ecx
call sub.MSVCR100.dll_memcpy
mov eax, dword [ebp - 4]
add dword [edi], eax
add esp, 0xc
add dword [edi + 8], eax
add dword [esi + 0x74], eax
mov edi, dword [esi + 0x74]
cmp edi, 3
jb 0x409925
mov edx, dword [esi + 0x6c]
add edx, dword [esi + 0x38]
mov ecx, dword [esi + 0x58]
movzx eax, byte [edx]
mov dword [esi + 0x48], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [esi + 0x54]
mov dword [esi + 0x48], eax
cmp edi, 0x106
jae 0x409939
mov eax, dword [esi]
cmp dword [eax + 4], 0
jne 0x4097f0
pop edi
pop ebx
leave
ret