joyce8/EMBER2024-capa huggingface dataset:
Function at 0x504300
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi + 0x48]
test byte [eax], 8
jne 0x504318
mov dword [esi + 0x40], 0x6f
xor eax, eax
pop esi
ret
push esi
push esi
call fcn.005044b0
add esp, 8
test eax, eax
je 0x504314
lea eax, [esi + 4]
push eax
push esi
call fcn.005044b0
add esp, 8
test eax, eax
je 0x504314
mov ecx, dword [esi + 0x48]
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x504357
push 3
lea ecx, [esp + 0x10]
push ecx
push esi
call eax
add esp, 0xc
jmp 0x504368
push dword [ecx + 0x38]
lea eax, [esp + 0x10]
push 3
push 1
push eax
call ebp
add esp, 0x10
cmp eax, 3
je 0x50438b
push dword [esi + 0x14]
mov dword [esi + 0x40], 0x66
call fcn.00504d60
add esp, 4
mov dword [esi + 0x14], 0
xor eax, eax
pop ebp
pop esi
ret
mov dl, byte [esp + 0xc]
movzx ecx, dl
mov eax, ecx
and ecx, 7
shr eax, 4
inc ecx
and eax, 7
inc eax
push ebx
mov dword [esi + 8], eax
mov bl, dl
movzx eax, byte [esp + 0x11]
shr bl, 3
mov dword [esi + 0xc], eax
and bl, 1
mov al, byte [esp + 0x12]
mov byte [esi + 0x10], al
push edi
test dl, dl
jns 0x504490
mov eax, 1
shl eax, cl
push 0
push eax
call fcn.00504e10
add esp, 8
mov dword [esi + 0x14], eax
test eax, eax
jne 0x5043e8
pop edi
pop ebx
pop ebp
mov dword [esi + 0x40], 0x6d
pop esi
ret
mov byte [eax + 8], bl
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp dword [eax], ebx
jle 0x504497
xor edi, edi
lea ebx, [ebx]
mov ecx, dword [esi + 0x48]
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x504419
push 3
lea ecx, [esp + 0x18]
push ecx
push esi
call eax
add esp, 0xc
jmp 0x50442a
push dword [ecx + 0x38]
lea eax, [esp + 0x18]
push 3
push 1
push eax
call ebp
add esp, 0x10
cmp eax, 3
jne 0x504470
mov eax, dword [esi + 0x14]
inc ebx
mov ecx, dword [eax + 0xc]
movzx eax, byte [esp + 0x14]
mov byte [edi + ecx], al
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + 0xc]
movzx eax, byte [esp + 0x15]
mov byte [ecx + edi + 1], al
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + 0xc]
movzx eax, byte [esp + 0x16]
mov byte [ecx + edi + 2], al
add edi, 3
mov eax, dword [esi + 0x14]
cmp ebx, dword [eax]
jl 0x504400
pop edi
pop ebx
pop ebp
mov eax, 1
pop esi
ret
push dword [esi + 0x14]
call fcn.00504d60
add esp, 4
mov dword [esi + 0x14], 0
mov dword [esi + 0x40], 0x66
xor eax, eax
pop edi
pop ebx
pop ebp
pop esi
ret
mov dword [esi + 0x14], 0
pop edi
pop ebx
pop ebp
mov eax, 1
pop esi
ret

Function at 0x5044b0
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
mov ecx, dword [esi + 0x48]
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x5044ce
push 2
lea ecx, [esp + 0xc]
push ecx
push esi
call eax
add esp, 0xc
jmp 0x5044e3
push dword [ecx + 0x38]
lea eax, [esp + 0xc]
push 2
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 2
je 0x5044f3
mov dword [esi + 0x40], 0x66
xor eax, eax
pop esi
ret
mov ax, word [esp + 8]
movzx ecx, ah
movzx eax, al
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0xc]
pop esi
mov dword [eax], ecx
mov eax, 1
ret
Function at 0x504510
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push edi
push 0x4c
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
jne 0x50453a
mov eax, dword [esp + 0x18]
test eax, eax
je 0x504533
mov dword [eax], 0x6d
xor eax, eax
pop edi
add esp, 8
ret
push esi
push 0x4c
push 0
push edi
call sub.MSVCRT.dll_memset
push 0x614c
push 1
mov dword [edi + 0x34], 0
mov dword [edi + 0x14], 0
call dword [sym.imp.MSVCRT.dll_calloc]
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x504589
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x504577
mov dword [eax], 0x6d
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop esi
pop edi
add esp, 8
ret
push 0x614c
push 0
push esi
call sub.MSVCRT.dll_memset
mov eax, dword [esp + 0x24]
add esp, 0xc
mov dword [edi + 0x48], esi
mov dword [esi + 0x3c], eax
mov eax, dword [esp + 0x14]
mov dword [esi + 4], 0
mov dword [esi + 0x38], 0
mov dword [esi], 8
mov ecx, dword [edi + 0x48]
mov dword [edi + 0x44], eax
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x5045d7
push 6
lea ecx, [esp + 0xc]
push ecx
push edi
call eax
add esp, 0xc
jmp 0x5045ec
push dword [ecx + 0x38]
lea eax, [esp + 0xc]
push 6
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 6
je 0x504601
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x50462d
mov dword [eax], 0x66
jmp 0x50462d
push 3
lea eax, [esp + 0xc]
mov byte [esp + 0x12], 0
push eax
push str.GIFVER
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x504644
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x50462d
mov dword [eax], 0x67
push esi
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
push edi
call esi
add esp, 8
xor eax, eax
pop esi
pop edi
add esp, 8
ret
push edi
call fcn.00504300
add esp, 4
test eax, eax
jne 0x504676
push esi
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
push edi
call esi
mov eax, dword [esp + 0x24]
add esp, 8
test eax, eax
je 0x50466e
mov dword [eax], 0x68
pop esi
xor eax, eax
pop edi
add esp, 8
ret
mov dword [edi + 0x40], 0
cmp byte [esp + 0xb], 0x39
sete al
mov byte [esi + 0x6148], al
mov eax, edi
pop esi
pop edi
add esp, 8
ret

Function at 0x5048c0
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, dword [esi + 0x48]
mov eax, dword [edi + 0x3c]
test eax, eax
je 0x5048df
push 1
lea ecx, [esp + 0x10]
push ecx
push esi
call eax
add esp, 0xc
jmp 0x5048f4
push dword [edi + 0x38]
lea eax, [esp + 0x10]
push 1
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jb 0x50490a
movzx ecx, byte [esp + 0xc]
cmp ecx, 8
jle 0x50490f
mov dword [esi + 0x40], 0x66
pop edi
xor eax, eax
pop esi
ret
mov eax, 1
mov dword [edi + 8], ecx
shl eax, cl
inc ecx
mov dword [edi + 0xc], eax
inc eax
mov dword [edi + 0x10], eax
inc eax
mov dword [edi + 0x14], eax
mov eax, 1
shl eax, cl
mov dword [edi + 0x1c], eax
mov eax, 0x1002
mov dword [edi + 0x18], ecx
mov ecx, 0x1000
mov byte [edi + 0x44], 0
mov dword [edi + 0x28], 0
mov dword [edi + 0x20], 0x1002
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0
add edi, 0x2144
rep stosd dword es:[edi], eax
pop edi
mov eax, 1
pop esi
ret
Function at 0x5056b4
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x7b3640], 0
push ebx
push esi
mov esi, 0x7b3648
jne 0x5056e0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0x7b3660], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x7b3640], 1
push dword [0x7b3660]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x50577d
push 0x14
push 8
push dword [0x7b07fc]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x5057a7
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x7b3644]
test eax, eax
je 0x505722
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0x7b3644], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x5057ac
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0x7b3660]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0x7b07fc]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x5057a7
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8

Function at 0x505be9
Capabilities:
Set thread local storage value

Disassembly:
push esi
push 0x184
push 8
push dword [0x7b07fc]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
push esi
push dword [0x7b3acc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [esp + 8]
mov dword [0x7b3ad0], esi
and dword [esi + 0xa8], 0
or dword [esi + 0xac], 0xffffffff
or dword [esi + 0xb0], 0xffffffff
push esi
mov dword [esi + 0xa4], 0xffffff
mov dword [esi + 0x74], 2
mov dword [esi + 0x78], 0x3f
call fcn.0050881c
mov dword [esi + 0x58], 0x5067fc
mov eax, esi
mov dword [esi + 0x5c], 0x506848
mov dword [esi + 0x10], fcn.0050639d
mov dword [esi + 0x30], 0x50628f
mov dword [esi + 0x64], 0x5068d2
mov dword [esi + 0x60], 0x50688a
mov dword [esi + 0x34], 0x505f3f
mov dword [esi + 0x24], 0x505f16
mov dword [esi + 0x28], 0x505eeb
mov dword [esi + 0x2c], 0x505e3d
mov dword [esi + 0x44], 0x506602
pop esi
ret 4
Function at 0x50bae6
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
mov edx, dword [esp + 0x2c]
push esi
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0xd4]
mov dword [esp + 4], eax
test edx, edx
je 0x50bb9c
imul eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
imul ecx, dword [esp + 0x28]
push ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
neg eax
add ecx, dword [esp + 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x28]
push ebp
push edi
lea edi, [ecx + eax*4]
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + 0xcc]
mov ebp, edi
imul ecx, ebx
add ecx, dword [esi + 0xc8]
add ecx, eax
cmp dword [esp + 0x38], 0
jle 0x50bb7c
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x10]
mov al, byte [ebp + 2]
xor byte [ecx + 2], al
mov al, byte [ebp + 1]
xor byte [ecx + 1], al
mov al, byte [ebp]
lea ebp, [ebp + 4]
xor byte [ecx], al
add ecx, esi
dec edx
jne 0x50bb57
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
dec edx
inc ebx
cmp dword [esi + 0xe8], 0
mov dword [esp + 0x3c], edx
jne 0x50bb91
add edi, dword [esp + 0x14]
jmp 0x50bb95
add edi, dword [esp + 0x24]
test edx, edx
jne 0x50bb35
pop edi
pop ebp
pop ebx
pop esi
pop ecx
pop ecx
ret 0x24

Function at 0x50bea7
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
push ecx
imul edx, dword [esp + 0x28], 3
push ebx
mov ebx, dword [esp + 0x30]
mov dword [esp + 8], edx
test ebx, ebx
je 0x50bf81
imul eax, dword [esp + 0x1c], 3
mov ecx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x24]
neg ecx
push esi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
imul eax, dword [esp + 0x30]
push edi
imul edi, dword [esp + 0x30], 3
mov dword [esp + 0x10], ecx
add eax, dword [esp + 0x20]
add edi, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x38], edi
mov esi, dword [eax + 0xcc]
imul esi, ebp
mov dword [esp + 0x34], edi
add esi, dword [eax + 0xc8]
add esi, dword [esp + 0x28]
test edx, edx
jle 0x50bf57
mov ebp, dword [esp + 0x34]
mov ebx, 0xff
sub ebx, dword [esp + 0x40]
mov edi, edx
movzx eax, byte [esi]
movzx ecx, byte [ebp]
imul ecx, dword [esp + 0x40]
imul eax, ebx
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
inc ebp
mov byte [esi], al
inc esi
dec edi
jne 0x50bf1f
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
dec ebx
inc ebp
cmp dword [eax + 0xe8], 0
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x2c], ebp
jne 0x50bf6e
add edi, ecx
jmp 0x50bf72
add edi, dword [esp + 0x24]
mov dword [esp + 0x38], edi
test ebx, ebx
jne 0x50bef5
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret 0x28
Function at 0x50c5a1
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
push esi
mov esi, dword [esp + 0x30]
push edi
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 0xd4]
mov dword [esp + 8], eax
test esi, esi
je 0x50c656
imul eax, dword [esp + 0x20]
imul edx, dword [esp + 0x28], 3
push ebx
mov ebx, dword [esp + 0x28]
push ebp
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x24]
neg eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x24]
imul eax, dword [esp + 0x34]
add eax, dword [esp + 0x20]
add edx, eax
mov eax, dword [esp + 0x28]
mov ecx, dword [edi + 0xcc]
mov ebp, edx
imul ecx, ebx
add ecx, dword [edi + 0xc8]
add ecx, eax
cmp dword [esp + 0x38], 0
jle 0x50c637
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x10]
mov al, byte [ebp + 2]
xor byte [ecx + 2], al
mov al, byte [ebp + 1]
xor byte [ecx + 1], al
mov al, byte [ebp]
lea ebp, [ebp + 3]
xor byte [ecx], al
add ecx, edi
dec esi
jne 0x50c612
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
dec esi
inc ebx
cmp dword [edi + 0xe8], 0
mov dword [esp + 0x3c], esi
jne 0x50c64c
add edx, dword [esp + 0x14]
jmp 0x50c650
add edx, dword [esp + 0x24]
test esi, esi
jne 0x50c5f0
pop ebp
pop ebx
pop edi
pop esi
pop ecx
pop ecx
ret 0x24
Function at 0x10003360
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 1
jne 0x1000339a
cmp byte [0x10085f8a], 0
jne 0x1000339a
push 0
push 0
push dword [ebp + 8]
push 0x10003310
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x1000339a
push eax
mov byte [0x10085f8a], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop ebp
ret 0xc
Function at 0x10005f60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x10005f8c
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 + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x10005fb4
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x10005fba
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x10006022
jg 0x10005fd1
test esi, esi
je 0x10006022
test ecx, ecx
jl 0x1000601d
jg 0x10005fdb
test eax, eax
je 0x1000601d
cmp edi, ecx
jg 0x10005fef
jl 0x10005fe5
cmp esi, eax
jae 0x10005fef
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x10006025
mov ecx, dword [ebp + 8]
jmp 0x1000602f
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x10006049
jg 0x1000602f
test esi, esi
je 0x10006049
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x10006049
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 [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10006060
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x1000608c
jl 0x10006080
test ecx, ecx
jne 0x1000608c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x100060a5
push eax
push ecx
push esi
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 esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x100060ed
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x100060f3
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push dword [ebp - 4]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp - 4], esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x100060f3
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x10006166
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x1000611c
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 - 0xc]
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 0x10006154
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 0x10006166
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x10006130
test edi, edi
je 0x10006166
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 0x100064f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x10085040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x10006520
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002ae9c
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x1000655c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x1000655c
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002ae9c
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x10006633
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x10006584
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 0x10006590
movsx eax, bl
jmp 0x100065c8
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]
sub eax, 0
je 0x100065f2
sub eax, 1
je 0x100065f2
sub eax, 2
jne 0x10006633
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
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002ae9c
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x10006610
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 0x10006633
lea ecx, [ebp - 0x25]
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.1002ae9c
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.1002ae9c
mov esp, ebp
pop ebp
ret 4
Function at 0x10007270
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x10085040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x1000732c
cmp byte [esi + 0x3d], 0
je 0x1000732c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x1000731a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x100072e1
sub eax, 1
je 0x100072e5
sub eax, 2
jne 0x1000731a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002ae9c
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x10007303
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 0x1000731a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002ae9c
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002ae9c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.1002ae9c
mov esp, ebp
pop ebp
ret