joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10036ae0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x10072f40]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x10036b10
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005078e
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x10036b40
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x10036b40
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.1005078e
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x10036c3d
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x10036b69
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 0x10036b9d
push dword [esi + 0x4c]
movsx eax, bl
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.1005078e
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x28], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
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]
sub eax, 0
je 0x10036bfc
sub eax, 1
je 0x10036bfc
sub eax, 2
jne 0x10036c3d
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.1000b300
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005078e
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x10036c1a
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 0x10036c3d
lea ecx, [ebp - 0x28]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005078e
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.1005078e
mov esp, ebp
pop ebp
ret 4
Function at 0x1003af20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 8
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
test eax, eax
jg 0x1003af44
jl 0x1003af39
test ecx, ecx
jne 0x1003af44
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x1003af5e
push eax
push ecx
push dword [ebp + 8]
mov ecx, ebx
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 ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push esi
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x1003afaa
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 4], edx
mov eax, dword [eax]
test eax, eax
je 0x1003afb0
mov edi, dword [ebp + 8]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp + 8], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
jmp 0x1003afb0
lea eax, [ebx + 0x2c]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
mov esi, dword [ebp + 8]
je 0x1003b026
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x1003afdc
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x1003b014
nop dword [eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x1003b026
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x1003aff0
test edi, edi
je 0x1003b026
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x1003b040
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x1003b065
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 ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], eax
test ecx, ecx
je 0x1003b08b
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x1003b090
xor ecx, ecx
mov dword [ebp - 8], eax
mov eax, ecx
cdq
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x1003b0f0
jg 0x1003b0a5
test esi, esi
je 0x1003b0f0
test ecx, ecx
jl 0x1003b0eb
jg 0x1003b0af
test eax, eax
je 0x1003b0eb
cmp edi, ecx
jg 0x1003b0c1
jl 0x1003b0b9
cmp esi, eax
jae 0x1003b0c1
mov eax, esi
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 8]
add esp, 0xc
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [ebp - 4]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x1003b0f3
mov ecx, dword [ebp + 8]
jmp 0x1003b0fd
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x1003b117
jg 0x1003b0fd
test esi, esi
je 0x1003b117
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x1003b117
push eax
push esi
push 1
push ecx
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 [ebp - 0x10]
mov edx, dword [ebp - 0x14]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x1003b1c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005a760
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x10072f40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1c], edi
mov dword [edi], vtable.CFileDetMgrLogger.0
mov dword [ebp - 4], 0
or ebx, 0xffffffff
cmp dword [edi + 4], ebx
je 0x1003b293
call fcn.100063f0
mov ecx, eax
test ecx, ecx
je 0x1003b2db
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x10]
push eax
push dword [0x100721a0]
mov ecx, edi
call fcn.1003ba30
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x18], 0
mov eax, dword [esi - 0xc]
add eax, eax
cmp dword [esi - 4], 1
mov dword [ebp - 0x14], eax
jle 0x1003b25e
push dword [esi - 0xc]
lea ecx, [ebp - 0x10]
call fcn.10004050
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
push 0
lea ecx, [ebp - 0x18]
push ecx
push eax
push esi
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1003b293
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [edi + 0x10], 0
mov dword [edi + 4], 0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 8]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [eax]
sub edx, 0x10
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x1003b2c9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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 0x80004005
call fcn.10003510
int3
Function at 0x1003b900
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005a89d
mov eax, dword fs:[0]
push eax
push ebx
push esi
push edi
mov eax, dword [0x10072f40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [edi + 4], 0xffffffff
mov eax, dword [ebp + 8]
mov dword [edi + 0xc], eax
mov byte [edi + 0x10], 1
jne 0x1003ba0d
mov esi, dword [ebp + 0xc]
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi + 4], eax
cmp eax, 0xffffffff
je 0x1003ba0d
test esi, esi
jne 0x1003b96b
xor eax, eax
jmp 0x1003b97f
mov eax, esi
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1003b970
sub eax, ebx
sar eax, 1
push eax
push esi
lea ecx, [edi + 8]
call fcn.100050f0
call fcn.100063f0
mov ecx, eax
test ecx, ecx
je 0x1003ba21
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov dword [ebp - 4], 1
lea eax, [ebp + 8]
push eax
push dword [0x1007219c]
mov ecx, edi
call fcn.1003ba30
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 0
cmp dword [esi - 4], 1
mov eax, dword [esi - 0xc]
lea ebx, [eax + eax]
jle 0x1003b9dd
push eax
lea ecx, [ebp + 8]
call fcn.10004050
mov esi, dword [ebp + 8]
push 0
lea eax, [ebp + 0xc]
push eax
push ebx
push esi
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1003ba0d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.10003510
int3
Function at 0x1003c320
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005aac6
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push esi
mov eax, dword [0x10072f40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], 0
mov al, byte [ebp + 8]
mov ecx, dword [esi + 0x84]
mov byte [esi + 0x7c], al
test al, al
je 0x1003c428
test ecx, ecx
jne 0x1003c467
mov dword [ebp - 4], ecx
push 4
call fcn.1005021f
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x1003c382
mov dword [ecx], esi
jmp 0x1003c384
xor ecx, ecx
mov dword [ebp + 8], ecx
mov byte [ebp - 4], 1
mov dword [ebp + 8], 0
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], 1
mov byte [ebp - 4], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], ecx
mov byte [ebp - 4], 2
mov eax, 1
mov dword [ebp - 0x10], eax
and eax, 0xfffffffe
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 3
lea eax, [ebp - 0x1c]
push eax
push 0
push ecx
push 0x1003bc00
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
mov dword [ebp - 0x20], eax
test eax, eax
je 0x1003c479
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 4
cmp dword [esi + 0x84], 0
jne 0x1003c422
mov eax, dword [ebp - 0x20]
xorps xmm0, xmm0
mov ecx, dword [ebp - 0x1c]
movlpd qword [ebp - 0x20], xmm0
mov dword [esi + 0x80], eax
mov dword [esi + 0x84], ecx
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x1c], 0
je 0x1003c467
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
test ecx, ecx
je 0x1003c467
call sub.MSVCP140.dll__Thrd_id
cmp dword [esi + 0x84], eax
je 0x1003c487
push 0
push dword [esi + 0x84]
push dword [esi + 0x80]
call sub.MSVCP140.dll__Thrd_join
add esp, 0xc
test eax, eax
jne 0x1003c48e
lea ecx, [esi + 0x68]
mov dword [esi + 0x80], eax
mov dword [esi + 0x84], eax
call fcn.1003d180
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 4
push 6
mov dword [ebp - 0x1c], 0
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
push 5
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
push 2
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3
Function at 0x1003e280
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
cmp dword [edi + 0x7c], 0xffffffff
jne 0x1003e296
mov eax, 0x80004005
pop edi
pop ebp
ret 4
cmp dword [ebp + 8], 0
mov eax, dword [edi + 0x2c0]
push esi
je 0x1003e3bd
test eax, eax
jne 0x1003e457
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push eax
push eax
push 1
push eax
call esi
push 0
push 0
push 1
push 0
mov dword [edi + 0x40], eax
call esi
push 0
push 0
push 1
push 0
mov dword [edi + 0x2c8], eax
call esi
push 0
push 0
push 1
push 0
mov dword [edi + 0x2cc], eax
call esi
mov ecx, dword [edi + 0x40]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x2d0], eax
test ecx, ecx
je 0x1003e366
cmp dword [edi + 0x2c8], 0
je 0x1003e363
cmp dword [edi + 0x2cc], 0
je 0x1003e363
test eax, eax
je 0x1003e363
lea eax, [edi + 0x2c4]
push eax
push 0
push edi
push 0x1003eee0
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
mov dword [edi + 0x2c0], eax
test eax, eax
jne 0x1003e342
mov eax, dword [edi + 0x40]
test eax, eax
je 0x1003e366
push eax
jmp 0x1003e364
push 0x1388
push dword [edi + 0x2cc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x1003e457
jmp 0x1003e3e4
push ecx
call esi
mov eax, dword [edi + 0x2c8]
mov dword [edi + 0x40], 0
test eax, eax
je 0x1003e37a
push eax
call esi
mov eax, dword [edi + 0x2cc]
mov dword [edi + 0x2c8], 0
test eax, eax
je 0x1003e391
push eax
call esi
mov eax, dword [edi + 0x2d0]
mov dword [edi + 0x2cc], 0
test eax, eax
je 0x1003e3a8
push eax
call esi
pop esi
mov dword [edi + 0x2d0], 0
mov eax, 0x80004005
pop edi
pop ebp
ret 4
test eax, eax
je 0x1003e457
mov eax, dword [edi + 0x2c8]
test eax, eax
je 0x1003e3d6
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push dword [edi + 0x2d0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [edi + 0x2c0]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1003e3f7
push eax
call esi
mov eax, dword [edi + 0x40]
mov dword [edi + 0x2c0], 0
test eax, eax
je 0x1003e40b
push eax
call esi
mov eax, dword [edi + 0x2c8]
mov dword [edi + 0x40], 0
test eax, eax
je 0x1003e41f
push eax
call esi
mov eax, dword [edi + 0x2cc]
mov dword [edi + 0x2c8], 0
test eax, eax
je 0x1003e436
push eax
call esi
mov eax, dword [edi + 0x2d0]
mov dword [edi + 0x2cc], 0
test eax, eax
je 0x1003e44d
push eax
call esi
mov dword [edi + 0x2d0], 0
pop esi
xor eax, eax
pop edi
pop ebp
ret 4
Function at 0x1003e9f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 8], 0
mov esi, 0x80004005
mov eax, dword [edi]
call dword [eax + 0x38]
test eax, eax
je 0x1003eaf5
push 0
push 0
xorps xmm0, xmm0
push 1
push 0
movlpd qword [ebp - 0x1c], xmm0
movlpd qword [ebp - 0x14], xmm0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ebx, eax
test ebx, ebx
jne 0x1003ea47
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x3c]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push ebx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 0x1c]
mov dword [ebp - 0xc], ebx
push eax
lea eax, [ebp - 8]
mov dword [ebp - 4], 0
push eax
movzx eax, byte [ebp + 0xc]
push eax
push dword [ebp + 8]
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1003ea79
xor esi, esi
jmp 0x1003eae7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x1003ea8d
mov esi, 1
jmp 0x1003eae7
cmp eax, 0x3e5
jne 0x1003eae7
push 0x7d0
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [edi + 0x7c]
test eax, eax
jne 0x1003eac9
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
neg eax
sbb esi, esi
and esi, 0x7fffbffb
add esi, 0x80004005
jmp 0x1003eae7
lea eax, [ebp - 0x1c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CancelIoEx]
push 1
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x3c]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x1003ebe0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0xc], 0
mov edi, 1
mov esi, 0x80004005
nop dword [eax]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x38]
test eax, eax
je 0x1003ed10
push 0
push 0
push 1
xorps xmm0, xmm0
mov dword [ebp - 0x10], 0
push 0
movups xmmword [ebp - 0x20], xmm0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
je 0x1003ed24
push esi
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x10], esi
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 4], 0
push eax
movzx eax, byte [ebp + 0xc]
push eax
push dword [ebp + 8]
push dword [ebx + 0x7c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1003ec6f
xor esi, esi
xor edi, edi
jmp 0x1003ecfe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0xea
jne 0x1003ec88
mov esi, 1
xor edi, edi
jmp 0x1003ecfe
cmp esi, 0x3e5
jne 0x1003ecf0
push 0x3e8
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebx + 0x7c]
test eax, eax
jne 0x1003ecc9
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
neg eax
sbb esi, esi
and esi, 0x7fffbffb
add esi, 0x80004005
xor edi, edi
jmp 0x1003ecfe
lea eax, [ebp - 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CancelIoEx]
push 1
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebx + 0x7c]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov esi, 0x80004005
xor edi, edi
jmp 0x1003ecfe
test esi, esi
jle 0x1003ecfd
movzx esi, si
or esi, 0x80070000
dec edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x3c]
jmp 0x1003ed11
dec edi
test edi, edi
jne 0x1003ec00
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x3c]
pop edi
pop esi
mov eax, 0x80004005
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x1004cdd0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x1004cde0
pop ebp
jmp fcn.10030780
xor eax, eax
pop ebp
ret 0xc

Function at 0x1004da10
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
push 0x104
push 0
push 0x10075250
mov dword [ebp - 4], ecx
call sub.VCRUNTIME140.dll_memset
push 0x104
push 0
push 0x10075458
call sub.VCRUNTIME140.dll_memset
push 0x104
push 0
push 0x10075660
call sub.VCRUNTIME140.dll_memset
add esp, 0x24
push 0x104
push 0x10075250
push 0x10000000
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0
push 0x104
push 0x10075660
push 0x104
push 0x10075458
push 0
push 0
push 0x10075250
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wsplitpath_s]
push 0x10075458
push str._sLog
push 0x10075868
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x30
push 0
push 0x10075868
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x10075660
push 0x10075458
mov ecx, 0x82
mov esi, 0x10075868
mov edi, 0x10075458
push str._s_s.log
rep movsd dword es:[edi], dword [esi]
push 0x10075868
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov ecx, 0x100721d8
push 0x10075868
push 0
call fcn.1003b900
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
call fcn.10050c00
divsd xmm0, qword [0x10062ab0]
mov eax, dword [ebp - 4]
pop edi
pop esi
movsd qword [eax + 0x30], xmm0
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x1004ea50
Capabilities:
Check mutex on windows
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005c740
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x10072f40]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x250], eax
push 0x1234
push 0x1234
push str.RzProtocolMutex__04X__04X
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 0x88], eax
test eax, eax
je 0x1004eb11
push 0x1388
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1004eb11
xor edi, edi
mov dword [ebp - 4], edi
push edi
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x18], eax
push edi
push 0x40000000
push 3
push edi
push edi
push 0xc0000000
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
jne 0x1004eb34
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1005078e
mov esp, ebp
pop ebp
ret 0x14
push 5
push eax
call dword [sym.imp.KERNEL32.dll_SetCommMask]
test eax, eax
je 0x1004eb11
xorps xmm0, xmm0
movups xmmword [ebp - 0x238], xmm0
movq qword [ebp - 0x228], xmm0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x238], 0x1c
lea eax, [ebp - 0x238]
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
je 0x1004eb11
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x234], eax
mov al, byte [ebp + 0x18]
mov byte [ebp - 0x226], al
mov al, byte [ebp + 0x10]
mov byte [ebp - 0x225], al
mov al, byte [ebp + 0x14]
cmp al, 1
jne 0x1004eba6
mov byte [ebp - 0x224], 0
jmp 0x1004ebb3
cmp al, 2
sete al
inc al
mov byte [ebp - 0x224], al
mov eax, dword [ebp - 0x230]
and eax, 0xffffffbf
mov dword [ebp - 0x230], eax
and eax, 0xffffffdf
or eax, 0x10
mov dword [ebp - 0x230], eax
and eax, 0xfffffff7
mov dword [ebp - 0x230], eax
lea eax, [ebp - 0x238]
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
je 0x1004eb11
mov dword [ebp - 0x24c], 0xffffffff
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x244], 0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
lea eax, [ebp - 0x24c]
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
je 0x1004eb11
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0xc], eax
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x14], eax
push 0
push 0
push esi
push 0x1004edb0
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
mov dword [esi + 0x10], eax
mov byte [esi + 0x1c], 1
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 4], 3
mov eax, edi
jmp 0x1004eb16