joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10014230
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10062881
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x1008a00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x34], edx
mov ebx, ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [0x10093878]
test eax, eax
jne 0x100143cd
mov eax, dword fs:[0x2c]
mov ecx, dword [0x1008af0c]
movaps xmm0, xmmword [0x1007e110]
movups xmmword [ebp - 0x24], xmm0
mov byte [ebp - 0x14], 0xeb
mov esi, dword [eax + ecx*4]
mov eax, dword [esi + 0xa50]
test al, 1
jne 0x100142ec
or eax, 1
mov dword [esi + 0xa50], eax
mov dword [ebp - 4], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x2c], xmm0
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov byte [esi + 0x2e0d], 1
mov al, byte [ebp + ecx - 0x24]
mov byte [ecx + esi + 0x2dfc], al
add ecx, 1
adc edx, 0
jne 0x100142d8
cmp ecx, 0x11
jb 0x100142c0
push 0x1006f8a0
call fcn.1005fde7
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea edi, [esi + 0x2dfc]
mov ecx, edi
call fcn.1005a050
mov eax, dword [esi + 0x1ed4]
mov dword [ebp - 0x20], 0x4e71a4bc
mov dword [ebp - 0x1c], 0x9bb182bb
mov dword [ebp - 0x18], 0x753818f
test al, 1
jne 0x1001436c
or eax, 1
mov dword [esi + 0x1ed4], eax
mov dword [ebp - 4], 1
xorps xmm0, xmm0
movlpd qword [ebp - 0x2c], xmm0
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov byte [esi + 0xb88], 1
nop dword [eax]
mov al, byte [ebp + ecx - 0x20]
mov byte [ecx + esi + 0xb7c], al
add ecx, 1
adc edx, 0
jne 0x10014358
cmp ecx, 0xc
jb 0x10014340
push 0x1006f8f0
call fcn.1005fde7
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea esi, [esi + 0xb7c]
mov ecx, esi
call fcn.1005a0b0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, 0x1000
jbe 0x100143c6
push 7
call fcn.1005fd3e
add esp, 4
mov esi, eax
lea eax, [ebp - 0x28]
push eax
push 0x40
push 7
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov cx, word [edi]
lea eax, [esi + 2]
sub edi, eax
mov word [esi], cx
sub edi, 3
mov byte [eax], 0xe9
mov dword [eax + 1], edi
add eax, 0xfffffffe
jmp 0x100143c8
xor eax, eax
mov dword [0x10093878], eax
push dword [ebp - 0x30]
mov dword [0x1008ff9c], eax
push 0x64
push dword [ebp - 0x34]
push ebx
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1005f409
mov esp, ebp
pop ebp
ret
Function at 0x10014400
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10062911
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x1008a00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [0x100938dc]
test eax, eax
jne 0x1001459d
mov eax, dword fs:[0x2c]
mov ecx, dword [0x1008af0c]
movaps xmm0, xmmword [0x1007d180]
movups xmmword [ebp - 0x24], xmm0
mov dword [ebp - 0x14], 0x4f0c492f
mov esi, dword [eax + ecx*4]
mov eax, dword [esi + 0x3c70]
test al, 1
jne 0x100144bc
or eax, 1
mov dword [esi + 0x3c70], eax
mov dword [ebp - 4], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x2c], xmm0
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov byte [esi + 0x115c], 1
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x24]
mov byte [ecx + esi + 0x1148], al
add ecx, 1
adc edx, 0
jne 0x100144a8
cmp ecx, 0x14
jb 0x10014490
push 0x1006f940
call fcn.1005fde7
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea edi, [esi + 0x1148]
mov ecx, edi
call fcn.10059f90
mov eax, dword [esi + 0x1734]
mov dword [ebp - 0x1c], 0x6276c1c
mov dword [ebp - 0x18], 0x61815429
mov dword [ebp - 0x14], 0x4f05492f
test al, 1
jne 0x1001453c
or eax, 1
mov dword [esi + 0x1734], eax
mov dword [ebp - 4], 1
xorps xmm0, xmm0
movlpd qword [ebp - 0x2c], xmm0
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov byte [esi + 0x20cc], 1
nop dword [eax]
mov al, byte [ebp + ecx - 0x1c]
mov byte [ecx + esi + 0x20c0], al
add ecx, 1
adc edx, 0
jne 0x10014528
cmp ecx, 0xc
jb 0x10014510
push 0x1006f990
call fcn.1005fde7
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea esi, [esi + 0x20c0]
mov ecx, esi
call fcn.10059ff0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, 0x1000
jbe 0x10014596
push 7
call fcn.1005fd3e
add esp, 4
mov esi, eax
lea eax, [ebp - 0x28]
push eax
push 0x40
push 7
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov cx, word [edi]
lea eax, [esi + 2]
sub edi, eax
mov word [esi], cx
sub edi, 3
mov byte [eax], 0xe9
mov dword [eax + 1], edi
add eax, 0xfffffffe
jmp 0x10014598
xor eax, eax
mov dword [0x100938dc], eax
push ebx
mov dword [0x1009117c], eax
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1005f409
mov esp, ebp
pop ebp
ret
Function at 0x10020080
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x1008a00c]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x10091ea8], 0
push esi
push edi
jle 0x100200ea
mov ecx, dword [0x100903f4]
mov eax, dword [0x1008c77c]
add eax, 0x1c
push eax
mov edx, dword [ecx]
call dword [edx + 4]
cmp dword [eax], 0
je 0x100200ea
mov ecx, dword [0x100903f4]
mov eax, dword [0x1008c77c]
add eax, 0x144
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov edi, eax
cmp edi, 0x1000
jbe 0x1002012a
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 8]
push eax
push 0x40
push 1
push edi
call esi
mov byte [edi], 0xcc
jmp 0x1002011e
mov ecx, dword [0x100903f4]
mov eax, dword [0x1008c77c]
add eax, 0x144
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov edi, eax
cmp edi, 0x1000
jbe 0x1002012a
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 8]
push eax
push 0x40
push 1
push edi
call esi
mov byte [edi], 0x68
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 1
push edi
call esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.1005f409
mov esp, ebp
pop ebp
ret
Function at 0x10022080
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10063181
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, dword [0x1008a00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [0x1008af0c]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x100938a4]
cmp eax, dword [ecx + 0xc]
jle 0x10022115
push 0x100938a4
call fcn.1005f7fb
add esp, 4
cmp dword [0x100938a4], 0xffffffff
jne 0x10022115
mov dword [ebp - 4], 0
mov ecx, dword [0x100903f4]
mov eax, dword [0x1008c77c]
add eax, 0x148
push eax
mov edx, dword [ecx]
call dword [edx + 4]
add eax, 4
mov dword [ebp - 4], 0xffffffff
push 0x100938a4
mov dword [0x10093858], eax
call fcn.1005f7b1
add esp, 4
mov ecx, dword [0x100903f4]
mov eax, dword [0x1008c77c]
add eax, 0x1c
push eax
mov edx, dword [ecx]
call dword [edx + 4]
cmp dword [eax], 0
je 0x100221a4
cmp dword [0x10091e7c], 0
je 0x100221a4
mov eax, dword [0x1008c77c]
mov ecx, dword [eax + 0x298]
mov eax, dword [0x100912c8]
mov ecx, dword [eax + ecx]
call fcn.100158b0
mov esi, eax
test esi, esi
je 0x100221a4
mov ecx, dword [0x100903f4]
push 0x100916cc
mov edx, dword [ecx]
call dword [edx + 4]
test eax, eax
je 0x100221a4
mov edx, dword [0x100909b8]
add edx, eax
cmp edx, eax
jbe 0x100221a4
mov ecx, esi
call edx
test eax, eax
jle 0x100221a4
mov edi, dword [0x10093858]
cmp edi, 0x1000
jbe 0x100221d5
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0x14]
push eax
push 0x40
push 4
push edi
call esi
mov dword [edi], 0x3a8312a2
jmp 0x100221c9
mov edi, dword [0x10093858]
cmp edi, 0x1000
jbe 0x100221d5
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0x14]
push eax
push 0x40
push 4
push edi
call esi
mov dword [edi], 0x3e19999a
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14]
push 4
push edi
call esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1005f409
mov esp, ebp
pop ebp
ret
Function at 0x100221f0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x1008a00c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [0x100903f4]
mov eax, dword [0x1008c77c]
push esi
push edi
mov edx, dword [ecx]
add eax, 0x1c
push eax
call dword [edx + 4]
mov ecx, dword [0x100903f4]
cmp dword [eax], 0
mov edx, dword [ecx]
mov eax, dword [0x1008c77c]
je 0x1002225a
add eax, 0x150
cmp dword [0x10091034], 0
push eax
je 0x10022260
call dword [edx + 4]
mov edi, eax
cmp edi, 0x1000
jbe 0x1002228d
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 8]
push eax
push 0x40
push 1
push edi
call esi
mov byte [edi], 0xcc
jmp 0x10022281
add eax, 0x150
push eax
call dword [edx + 4]
mov edi, eax
cmp edi, 0x1000
jbe 0x1002228d
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 8]
push eax
push 0x40
push 1
push edi
call esi
mov byte [edi], 0x6a
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 1
push edi
call esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.1005f409
mov esp, ebp
pop ebp
ret

Function at 0x10022880
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
cmp dword [0x1008c158], 0
jne 0x100228e3
mov edx, 0x54
xor eax, eax
mov cl, byte [eax + 0x1007c80c]
xor cl, dl
inc edx
mov byte [ebp + eax - 0x18], cl
and edx, 0x800000ff
jns 0x100228b3
dec edx
or edx, 0xffffff00
inc edx
inc eax
cmp eax, 0x15
jl 0x10022896
lea eax, [ebp - 0x18]
mov byte [ebp - 3], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
add eax, 0xcdda
mov dword [0x1008c158], 1
mov dword [0x10091770], eax
add eax, 0x18
mov dword [0x10090ad0], eax
mov esp, ebp
pop ebp
ret
Function at 0x10025a20
Capabilities:
Get hostname

Disassembly:
push 0x1008a060
push 0x10091124
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
call fcn.10025930
cmp eax, 1
jne 0x10025a4c
push str.Win_XP
push 0x1008cb28
call fcn.100057b0
add esp, 8
call fcn.10025930
cmp eax, 2
jne 0x10025a68
push str.Win_Vista
push 0x1008cb28
call fcn.100057b0
add esp, 8
call fcn.10025930
cmp eax, 3
jne 0x10025a84
push str.Win_7
push 0x1008cb28
call fcn.100057b0
add esp, 8
call fcn.10025930
cmp eax, 4
jne 0x10025aa0
push str.Win_8
push 0x1008cb28
call fcn.100057b0
add esp, 8
call fcn.10025930
cmp eax, 5
jne 0x10025abc
push str.Wi_10
push 0x1008cb28
call fcn.100057b0
add esp, 8
ret
Function at 0x10050730
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x1008a00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push esi
push edi
mov esi, edx
mov edi, ecx
nop dword [eax]
cmp byte [edi], 0x6a
jne 0x100507ce
cmp esi, 0x1000
jbe 0x100507aa
cmp edi, 0x1000
jbe 0x100507aa
lea eax, [ebp - 8]
push eax
push 0x80
push 7
push esi
call ebx
push 7
push edi
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
push 7
push esi
call ebx
mov edx, dword [ebp + 8]
push ecx
lea ecx, [esi + 7]
lea edx, [edx + 7]
call fcn.10013540
add esp, 4
lea eax, [ebp - 0x14]
push eax
push 0x40
push 5
jmp 0x1005083a
mov edx, dword [ebp + 8]
push ecx
lea ecx, [esi + 7]
lea edx, [edx + 7]
call fcn.10013540
add esp, 4
cmp esi, 0x1000
jbe 0x1005083d
lea eax, [ebp - 0x14]
push eax
push 0x40
push 5
jmp 0x1005083a
cmp esi, 0x1000
jbe 0x10050818
cmp edi, 0x1000
jbe 0x10050818
lea eax, [ebp - 0xc]
push eax
push 0x80
push 5
push esi
call ebx
push 5
push edi
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0xc]
push 5
push esi
call ebx
mov edx, dword [ebp + 8]
push ecx
lea ecx, [esi + 5]
lea edx, [edx + 5]
call fcn.10013540
add esp, 4
jmp 0x10050832
mov edx, dword [ebp + 8]
push ecx
lea ecx, [esi + 5]
lea edx, [edx + 5]
call fcn.10013540
add esp, 4
cmp esi, 0x1000
jbe 0x1005083d
lea eax, [ebp - 0x1c]
push eax
push 0x40
push 7
push esi
call ebx
mov al, byte [edi]
cmp al, 0x8b
je 0x10050854
cmp al, 0x6a
je 0x10050854
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10050750
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005f409
mov esp, ebp
pop ebp
ret
Function at 0x100514b0
Capabilities:
Access peb ldr_data
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x1008a00c]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 1
push edi
mov edi, dword [ebp + 8]
jne 0x100515b2
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x10051537
cmp ecx, edi
jne 0x1005152e
mov edx, dword [eax + 4]
test edx, edx
je 0x100514fc
mov ecx, dword [eax]
mov dword [edx], ecx
mov edx, dword [eax + 4]
test edx, edx
je 0x100514fc
mov ecx, dword [eax]
mov dword [ecx + 4], edx
mov edx, dword [eax + 0x14]
test edx, edx
je 0x10051508
mov ecx, dword [eax + 0x10]
mov dword [edx], ecx
mov edx, dword [eax + 0x10]
test edx, edx
je 0x10051515
mov ecx, dword [eax + 0x14]
mov dword [edx + 4], ecx
mov edx, dword [eax + 8]
test edx, edx
je 0x1005152e
mov ecx, dword [eax + 0xc]
mov dword [ecx], edx
mov edx, dword [eax + 8]
test edx, edx
je 0x1005152e
mov ecx, dword [eax + 0xc]
mov dword [edx + 4], ecx
mov eax, dword [eax]
mov ecx, dword [eax + 0x18]
test ecx, ecx
jne 0x100514e1
push esi
push 0x1c
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0xc]
push eax
push 0x40
push dword [ebp - 0x14]
push dword [ebp - 0x20]
call esi
push 0xc8
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0
push dword [ebp - 0xc]
push dword [ebp - 0x14]
push dword [ebp - 0x20]
call esi
push dword [ebp - 0x14]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x1003ab20
push 0
push 0
call esi
push 0
push 0
push 0
push 0x10050bc0
push 0
push 0
call esi
pop esi
mov ecx, dword [ebp - 4]
mov eax, 1
xor ecx, ebp
pop edi
call fcn.1005f409
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10051b80
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 0x10051bac
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 0x10051bce
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x10051bd0
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test edi, edi
jl 0x10051c55
jg 0x10051be5
test esi, esi
je 0x10051c55
test ecx, ecx
jl 0x10051c38
jg 0x10051bef
test eax, eax
je 0x10051c38
cmp edi, ecx
jg 0x10051c03
jl 0x10051bf9
cmp esi, eax
jae 0x10051c03
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 eax, dword [ebx + 0x30]
sub esi, ecx
mov edx, dword [ebp + 8]
sbb edi, dword [esp + 0x10]
add edx, ecx
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
test edi, edi
jl 0x10051c55
jg 0x10051c3b
test esi, esi
je 0x10051c55
jmp 0x10051c3b
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x10051c55
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 0x10051c70
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 + 8]
mov dword [ebp - 8], ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x10051c9c
jl 0x10051c90
test esi, esi
jne 0x10051c9c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x10051cb5
push eax
push esi
push ecx
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, esi
mov dword [ebp - 4], esi
mov edx, dword [eax]
test edx, edx
je 0x10051cf5
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
test eax, eax
je 0x10051cf5
mov edi, dword [ebp + 0xc]
cmp eax, edi
cmovb esi, eax
push esi
push edx
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp - 8], esi
add esp, 0xc
mov dword [ebp - 4], edi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0xc]
cmp dword [ebx + 0x4c], 0
je 0x10051dac
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x10051d20
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 [ebx + 0x2c]
mov dword [eax], edx
mov eax, dword [ebp - 4]
mov edx, eax
mov ecx, dword [ebp - 8]
cmp eax, 0xfff
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov dword [ebp - 4], edx
jbe 0x10051d6f
nop word [eax + eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push ecx
call eax
mov ecx, dword [ebp - 8]
sub edi, eax
add ecx, eax
mov dword [ebp - 4], edi
add esp, 0x10
mov dword [ebp - 8], ecx
mov edx, edi
cmp eax, 0xfff
jne 0x10051d99
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x10051d40
cmp dword [ebp - 4], 0
jbe 0x10051daf
push dword [ebx + 0x4c]
push edi
push 1
push ecx
call eax
mov edx, dword [ebp - 4]
add esp, 0x10
sub edx, eax
sub esi, edx
mov edx, dword [ebp + 0x10]
mov eax, esi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 0x10]
sub esi, edi
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp - 4]
sub esi, edx
mov edx, dword [ebp + 0x10]
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10052120
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x1008a00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x10052150
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005f409
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x10052180
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x10052180
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.1005f409
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x10052255
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x100521a9
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 0x100521b5
movsx eax, bl
jmp 0x100521ec
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 0x10052255
cmp eax, 1
jle 0x10052216
cmp eax, 3
jne 0x10052255
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.1005f409
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x10052234
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 0x10052255
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x10052255
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005f409
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.1005f409
mov esp, ebp
pop ebp
ret 4
Function at 0x1005a4d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x1008a00c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x1005a58c
cmp byte [esi + 0x3d], 0
je 0x1005a58c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x1005a57a
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 0x1005a541
sub eax, 1
je 0x1005a545
sub eax, 2
jne 0x1005a57a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005f409
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x1005a563
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 0x1005a57a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005f409
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005f409
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.1005f409
mov esp, ebp
pop ebp
ret