joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4068f0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test edx, edx
jne 0x4068fb
xor eax, eax
pop ebp
ret
push esi
mov esi, dword [ebp + 8]
not ecx
cmp esi, 8
jb 0x4069b7
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x418740]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x418740]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x418740]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x418740]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x418740]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x418740]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x418740]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x418740]
sub edi, 1
jne 0x406910
pop edi
test esi, esi
je 0x4069da
nop dword [eax + eax]
movzx eax, byte [edx]
lea edx, [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x418740]
sub esi, 1
jne 0x4069c0
not ecx
mov eax, ecx
pop esi
pop ebp
ret

Function at 0x407160
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, edx
mov ebx, esi
mov dword [ebp - 0xc], esi
imul ebx, dword [ebp + 8]
mov eax, ecx
mov dword [ebp - 8], eax
cmp byte [edi], 0
je 0x4071bc
push 0
lea ecx, [ebp - 8]
push ecx
push ebx
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4071a4
mov byte [edi + 8], 1
mov eax, dword [ebp - 8]
xor edx, edx
pop edi
div esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413d41
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x1c]
mov esi, dword [edi + 0x18]
mov ecx, dword [edi + 0x14]
sub esi, edx
lea eax, [edx + ebx]
cmp eax, dword [edi + 0x18]
cmovbe esi, ebx
add ecx, edx
push esi
push ecx
push dword [ebp - 8]
call sub.VCRUNTIME140.dll_memcpy
add dword [edi + 0x1c], esi
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, esi
xor edx, edx
xor ecx, ebp
div dword [ebp - 0xc]
pop edi
pop esi
pop ebx
call fcn.00413d41
mov esp, ebp
pop ebp
ret
Function at 0x407200
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov dword [ebp - 0xc], ebx
mov edi, 1
cmp byte [esi], 0
je 0x407245
push 0
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 5]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407240
mov byte [esi + 8], 1
mov edi, dword [ebp - 0xc]
jmp 0x407272
mov ebx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea eax, [ebx + 1]
cmp eax, ecx
jbe 0x407256
mov edi, ecx
sub edi, ebx
mov eax, dword [esi + 0x14]
add eax, ebx
push edi
push eax
lea eax, [ebp - 5]
push eax
call sub.VCRUNTIME140.dll_memcpy
lea eax, [ebx + edi]
add esp, 0xc
mov ebx, dword [ebp - 0xc]
mov dword [esi + 0x1c], eax
cmp edi, 1
jne 0x407290
movzx eax, byte [ebp - 5]
mov dword [ebx], eax
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413d41
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0
je 0x40727d
cmp byte [esi + 8], 0
je 0x40727d
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413d41
mov esp, ebp
pop ebp
ret
Function at 0x407350
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
mov ebx, ecx
push esi
push edi
mov cl, byte [ebx]
test cl, cl
je 0x40738c
cmp byte [ebx + 1], 0
je 0x4073de
push 2
push 0
push 0
push dword [ebx + 4]
call edx
mov cl, byte [ebx]
mov edx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x407392
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x1c], eax
test cl, cl
je 0x4073b3
cmp byte [ebx + 1], 0
je 0x4073ac
push 1
push 0
push 0
push dword [ebx + 4]
call edx
sub eax, dword [ebx + 0xc]
jmp 0x4073b6
xor eax, eax
mov dword [ebp - 0x10], eax
jmp 0x4073c5
mov eax, dword [ebx + 0x1c]
mov esi, 0xffff
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], esi
cmp eax, esi
jae 0x4073ca
mov esi, eax
mov dword [ebp - 0x18], eax
push 0x404
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
jne 0x4073f2
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413d41
mov esp, ebp
pop ebp
ret
mov eax, 4
mov dword [ebp - 0xc], 0xffffffff
cmp esi, eax
jbe 0x4074ec
mov edx, dword [ebp - 0x10]
add eax, 0x400
cmp eax, esi
mov ecx, esi
cmovbe ecx, eax
mov eax, 0x404
sub edx, ecx
mov dword [ebp - 0x20], ecx
cmp ecx, 0x404
mov dword [ebp - 0x1c], edx
mov esi, ecx
cmova esi, eax
mov al, byte [ebx]
mov dword [ebp - 0x14], esi
test al, al
je 0x407457
cmp byte [ebx + 1], 0
je 0x4074ec
mov eax, dword [ebx + 0xc]
push 0
push 0
add eax, edx
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov al, byte [ebx]
jmp 0x40745a
mov dword [ebx + 0x1c], edx
test al, al
je 0x40747c
push 0
lea eax, [ebp - 8]
push eax
push esi
push edi
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407477
mov byte [ebx + 8], 1
mov eax, dword [ebp - 8]
jmp 0x4074a6
mov edx, dword [ebx + 0x1c]
mov ecx, dword [ebx + 0x14]
lea eax, [edx + esi]
mov esi, dword [ebx + 0x18]
sub esi, edx
cmp eax, dword [ebx + 0x18]
cmovbe esi, dword [ebp - 0x14]
add ecx, edx
push esi
push ecx
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, esi
add dword [ebx + 0x1c], esi
mov esi, dword [ebp - 0x14]
xor edx, edx
div esi
cmp eax, 1
jne 0x4074ec
lea eax, [esi - 3]
test eax, eax
js 0x4074d7
mov ecx, eax
dec eax
cmp byte [eax + edi], 0x50
jne 0x4074d3
cmp byte [ecx + edi], 0x4b
jne 0x4074d3
cmp byte [eax + edi + 2], 5
jne 0x4074d3
cmp byte [eax + edi + 3], 6
je 0x40750a
test eax, eax
jns 0x4074b6
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x4074ec
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x18]
cmp eax, esi
jb 0x407406
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, dword [ebp - 0xc]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00413d41
mov esp, ebp
pop ebp
ret
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
jmp 0x4074da
Function at 0x408070
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
mov edi, ecx
mov ebx, edx
test edi, edi
je 0x40822c
cmp dword [edi + 0x18], 0
je 0x40822c
cmp dword [edi + 0x7c], 0
je 0x408099
call fcn.00408520
lea eax, [ebp - 8]
mov ecx, edi
push eax
lea eax, [ebp - 4]
push eax
lea edx, [ebp - 0xc]
call fcn.00407e00
add esp, 8
test eax, eax
je 0x4080bd
pop edi
mov eax, 0xffffff99
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push 0x84
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x408103
push 0x4000
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, dword [ebp - 4]
add esp, 4
mov dword [esi + 0x44], ecx
mov ecx, dword [ebp - 8]
mov dword [esi], eax
mov dword [esi + 0x48], ecx
mov dword [esi + 0x4c], 0
test eax, eax
jne 0x40810f
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
pop esi
pop edi
mov eax, 0xffffff98
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x40], 0
mov ecx, dword [edi + 0x34]
mov eax, dword [edi + 0x3c]
mov dword [esi + 0x54], eax
mov dword [esi + 0x50], 0
mov eax, dword [edi + 0x34]
mov dword [esi + 0x64], eax
mov eax, dword [edi]
mov dword [esi + 0x60], eax
mov eax, dword [edi + 0xc]
mov dword [esi + 0x68], eax
mov dword [esi + 0x18], 0
test ecx, ecx
je 0x40816a
lea ecx, [esi + 4]
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
call fcn.00406c40
test eax, eax
jne 0x40816a
mov dword [esi + 0x40], 1
mov eax, dword [edi + 0x40]
mov dword [esi + 0x58], eax
mov eax, dword [edi + 0x44]
mov dword [esi + 0x5c], eax
mov al, byte [edi + 0x30]
and al, 1
mov byte [esi + 0x6c], al
mov eax, dword [edi + 0x30]
shr eax, 3
test al, 1
je 0x40818d
mov al, byte [edi + 0x39]
jmp 0x408190
mov al, byte [edi + 0x3f]
mov byte [esi + 0x80], al
mov ecx, 0xc
xor eax, eax
cmp byte [esi + 0x6c], al
cmovne eax, ecx
mov dword [esi + 0x7c], eax
mov dword [esi + 0x70], 0x12345678
mov dword [esi + 0x74], 0x23456789
mov dword [esi + 0x78], 0x34567890
test ebx, ebx
je 0x40820d
nop
mov al, byte [ebx]
test al, al
je 0x40820d
mov ecx, dword [esi + 0x70]
movsx eax, al
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x418740]
xor eax, ecx
mov ecx, dword [esi + 0x78]
mov dword [esi + 0x70], eax
movzx eax, al
add eax, dword [esi + 0x74]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x74], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x418740]
mov dword [esi + 0x78], ecx
add ebx, 1
jne 0x4081c0
mov eax, dword [ebp - 0xc]
add eax, 0x1e
add eax, dword [edi + 0x78]
mov dword [esi + 0x3c], eax
xor eax, eax
mov dword [esi + 8], 0
mov dword [edi + 0x7c], esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, 0xffffff9a
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408c50
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x414d52
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x41e008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov dword [ebp - 0x10], ecx
push 0x244
call fcn.00413d52
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
push 0x244
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esi], 0
lea edi, [esi + 0x140]
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0x134], 0xffffffff
mov dword [esi + 0x138], 0
push edi
push 0x104
mov dword [esi + 0x13c], 0
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408ce8
sub ecx, edx
mov al, byte [ecx + esi + 0x13f]
cmp al, 0x5c
je 0x408d14
cmp al, 0x2f
je 0x408d14
push 0x41a2e8
push 0x104
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
add esp, 0xc
push 0x20
call fcn.00413d52
mov ecx, dword [ebp - 0x10]
add esp, 4
mov dword [eax + 0x14], ecx
mov ecx, eax
mov word [eax], pe_nt_image_headers32
mov byte [eax + 0x10], 0
mov dword [eax + 0x18], ebx
mov dword [eax + 0x1c], 0
mov dword [eax + 0xc], 0
call fcn.00407520
mov dword [esi], eax
test eax, eax
jne 0x408d71
push ecx
mov ecx, esi
mov dword [0x41e5e0], 0x200
call fcn.00408da0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 8
mov dword [0x41e5e0], 0
call fcn.00413d52
add esp, 4
mov dword [eax], 1
mov dword [eax + 4], esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40fb40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x114]
mov dword [ebp - 0x230], ecx
push 0
push eax
mov ebx, edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x114]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x114]
push 0x5c
push eax
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsrchr]
add esp, 4
mov edx, 0xc
push str.network.log
push ecx
lea ecx, [eax + 1]
call fcn.00409060
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 2
push 0
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [ebp - 0x220]
movzx eax, word [ebp - 0x222]
push ecx
push eax
movzx eax, word [ebp - 0x224]
push eax
movzx eax, word [ebp - 0x226]
push eax
movzx eax, word [ebp - 0x22a]
push eax
movzx eax, word [ebp - 0x22c]
push eax
push str._d__02d__02d__02d:_02d:_02d
lea eax, [ebp - 0x21c]
push 0x104
push eax
call fcn.00408fe0
lea eax, [ebp - 0x21c]
add esp, 0x24
lea edx, [eax + 1]
nop word [eax + eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40fc40
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
sub eax, edx
push 0
push 0
push eax
lea eax, [ebp - 0x21c]
push eax
push esi
call edi
mov eax, dword [ebp + 8]
cmp eax, 5
ja case.default.0x40fc66
jmp dword [eax*4 + 0x40fcf8]
push 0
push 0
push 0xc
push str._Send_Head:
jmp 0x40fcb9
push 0
push 0
push 0x11
push str._Send_Plan_Text:
jmp 0x40fcb9
push 0
push 0
push 0x13
push str._Send_Cipher_Text:
jmp 0x40fcb9
push 0
push 0
push 0xf
push str._Receive_Head:
jmp 0x40fcb9
push 0
push 0
push 0x14
push str._Receive_Plan_Text:
jmp 0x40fcb9
push 0
push 0
push 0x16
push str._Receive_Cipher_Text:
push esi
call edi
push 0
push 0
push ebx
push dword [ebp - 0x230]
push esi
call edi
push 0
push 0
push 4
push str._r_n_r_n
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413d41
mov esp, ebp
pop ebp
ret
Function at 0x4105e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x41060c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], eax
test eax, eax
je 0x41062e
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x410630
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test edi, edi
jl 0x4106b5
jg 0x410645
test esi, esi
je 0x4106b5
test ecx, ecx
jl 0x41068e
jg 0x41064f
test eax, eax
je 0x41068e
cmp edi, ecx
jg 0x410663
jl 0x410659
cmp esi, eax
jae 0x410663
mov eax, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x1c]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x30]
add edx, ecx
sub esi, ecx
sbb edi, dword [esp + 0x10]
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
jmp 0x410691
mov edx, dword [ebp + 8]
test edi, edi
jl 0x4106b5
jg 0x41069b
test esi, esi
je 0x4106b5
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x4106b5
push eax
push esi
push 1
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4106d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x38], 0
je 0x4106fc
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi + 0x1c]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
test eax, eax
je 0x41071e
mov eax, dword [edi + 0x2c]
mov eax, dword [eax]
jmp 0x410720
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test ebx, ebx
jl 0x4107c0
jg 0x41073d
test esi, esi
je 0x4107c0
test ecx, ecx
jl 0x41078a
jg 0x410747
test eax, eax
je 0x41078a
cmp ebx, ecx
jg 0x41075b
jl 0x410751
cmp esi, eax
jae 0x41075b
mov eax, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
push eax
push dword [esp + 0x18]
push dword [ebp + 8]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [edi + 0x2c]
add edx, ecx
sub esi, ecx
mov dword [esp + 0xc], edx
sbb ebx, dword [esp + 0x10]
sub dword [eax], ecx
mov eax, dword [edi + 0x1c]
add dword [eax], ecx
jmp 0x410791
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
test ebx, ebx
jl 0x4107c0
jg 0x41079b
test esi, esi
je 0x4107c0
cmp dword [edi + 0x4c], 0
je 0x4107c0
mov ecx, edi
call fcn.00410eb0
push dword [edi + 0x4c]
push esi
push 1
push dword [esp + 0x18]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
sub esi, eax
sbb ebx, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
pop edi
pop esi
sbb edx, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x410b30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x410b60
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413d41
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x410b90
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x410b90
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413d41
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x410c65
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x410bb9
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x410bc5
movsx eax, bl
jmp 0x410bfc
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
test eax, eax
js 0x410c65
cmp eax, 1
jle 0x410c26
cmp eax, 3
jne 0x410c65
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413d41
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x410c44
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x410c65
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x410c65
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413d41
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413d41
mov esp, ebp
pop ebp
ret 4
Function at 0x413730
Capabilities:
Hide graphical window
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x18c
mov eax, dword [0x41e008]
xor eax, esp
mov dword [esp + 0x188], eax
movzx eax, byte [0x41ab18]
movq xmm0, qword [0x41ab10]
push esi
mov esi, dword [ebp + 8]
mov byte [esp + 0x4c], al
mov eax, dword [0x41ab24]
movq qword [esp + 0x44], xmm0
movq xmm0, qword [str.HelloWindows]
mov dword [esp + 0x58], eax
movzx eax, byte [0x41ab28]
push 0x7f00
push 0
movq qword [esp + 0x58], xmm0
mov byte [esp + 0x64], al
mov dword [esp + 0x14], 0x30
mov dword [esp + 0x18], 3
mov dword [esp + 0x1c], 0x413990
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], esi
call dword [sym.imp.USER32.dll_LoadIconA]
push 0x7f00
push 0
mov dword [esp + 0x2c], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push 0
mov dword [esp + 0x2c], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x44]
mov dword [esp + 0x34], eax
lea eax, [esp + 0xc]
push eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], 0
call dword [sym.imp.USER32.dll_RegisterClassExA]
push 0
push esi
push 0
push 0
push 0x12c
push 0x190
push 0x80000000
push 0x80000000
push 0xcf0000
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x6c]
push eax
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov esi, eax
push 0
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x41396f
mov al, byte [eax]
cmp al, 0x31
jne 0x41386a
call fcn.004139a0
call fcn.00409ac0
jmp 0x413967
cmp al, 0x32
jne 0x413967
mov eax, dword [0x41ab3c]
movups xmm0, xmmword [str.SoftwareSkyCompress]
push 0
mov dword [esp + 0x74], eax
mov al, byte [0x41ab40]
mov byte [esp + 0x78], al
lea eax, [esp + 0xc]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
lea eax, [esp + 0x7c]
push eax
push 0x80000001
movups xmmword [esp + 0x84], xmm0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x413962
push 0x104
push eax
lea eax, [esp + 0x88]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x40], 1
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 0x104
push eax
lea eax, [esp + 0x84]
push eax
lea eax, [esp + 0x48]
push eax
push 0
push str.LogicBear
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x413953
mov ecx, str.W2e3Ux891
lea eax, [esp + 0x80]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x413938
test dl, dl
je 0x413934
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x413938
add eax, 2
add ecx, 2
test dl, dl
jne 0x413918
xor ecx, ecx
jmp 0x41393d
sbb ecx, ecx
or ecx, 1
movzx eax, byte [0x41e6ec]
test ecx, ecx
mov edx, 1
cmove eax, edx
mov byte [0x41e6ec], al
mov eax, dword [esp + 8]
test eax, eax
je 0x413962
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.0040c020
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov ecx, dword [esp + 0x18c]
xor eax, eax
pop esi
xor ecx, esp
call fcn.00413d41
mov esp, ebp
pop ebp
ret 0x10