joyce8/EMBER2024-capa huggingface dataset:
Function at 0x101d162
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [0x1029fe8]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
push 0xef42
lea eax, [ebp - 0x84]
push eax
call fcn.01022733
lea eax, [ebp - 0x84]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
test eax, eax
lea eax, [ebp - 0x44]
jne 0x101d1b4
push 0x1004610
push eax
call ebx
jmp 0x101d1bb
push eax
push esi
call fcn.0101d0f1
lea eax, [ebp - 0x290]
push eax
push 0xf003f
push 0
push 0x102cbe0
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x101d28a
lea eax, [ebp - 0x294]
push eax
lea eax, [ebp - 0x28c]
push eax
lea eax, [ebp - 0x298]
push eax
push 0
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x290]
mov dword [ebp - 0x294], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x290]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x101d28a
cmp word [ebp - 0x28c], si
je 0x101d28a
push dword [ebp + 0x10]
lea eax, [ebp - 0x28c]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp word [edi + 2], 0x3a
jne 0x101d257
push 0x1002734
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
jne 0x101d285
push edi
lea eax, [ebp - 0x28c]
push eax
call ebx
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x1001c1c
push edi
call esi
lea eax, [ebp - 0x28c]
push eax
push edi
call esi
xor eax, eax
inc eax
jmp 0x101d28c
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01023881
leave
ret 0xc
Function at 0x101d2a0
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x290
mov eax, dword [0x1029fe8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], eax
push 0xef42
lea eax, [ebp - 0x84]
push eax
call fcn.01022733
lea eax, [ebp - 0x84]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
test eax, eax
lea eax, [ebp - 0x44]
jne 0x101d2f2
push 0x1004610
push eax
call esi
jmp 0x101d2f9
push eax
push edi
call fcn.0101d0f1
lea eax, [ebp - 0x290]
push eax
push 0xf003f
push 0
push 0x102cbe0
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x101d322
xor eax, eax
jmp 0x101d3a5
push ebx
call fcn.0101d099
mov edi, eax
test edi, edi
lea eax, [ebp - 0x28c]
je 0x101d35f
push 0x100463c
push eax
call esi
cmp word [edi], 0x5c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
je 0x101d356
push 0x1002734
lea eax, [ebp - 0x28c]
push eax
call esi
push edi
lea eax, [ebp - 0x28c]
jmp 0x101d360
push ebx
push eax
call esi
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x28c]
push eax
push 1
push 0
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x290]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x290]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01023881
leave
ret 8

Function at 0x101d3b9
Capabilities:
Delete registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x1029fe8]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], eax
push 0xef42
lea eax, [ebp - 0x84]
push eax
call fcn.01022733
lea eax, [ebp - 0x84]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
lea eax, [ebp - 0x44]
jne 0x101d404
push 0x1004610
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x101d40b
push eax
push esi
call fcn.0101d0f1
lea eax, [ebp - 0x88]
push eax
push 0xf003f
push 0
push 0x102cbe0
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x101d431
xor eax, eax
jmp 0x101d456
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x88]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp - 0x88]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
mov ecx, dword [ebp - 4]
pop esi
call fcn.01023881
leave
ret 4
Function at 0x101d518
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push str.SystemCurrentControlSetcontrolNlsCodepageEUDCCodeRange
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x101d543
xor eax, eax
jmp 0x101d584
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
add eax, eax
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0xc]
push eax
push 0
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x101d580
cmp byte [esi], 0
je 0x101d580
xor eax, eax
inc eax
jmp 0x101d582
xor eax, eax
pop edi
pop esi
leave
ret 0xc

Function at 0x101d58d
Capabilities:
Delete registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
lea eax, [ebp - 4]
push eax
push 0xf003f
push 0
mov edi, 0x102cbe0
push edi
mov esi, 0x80000001
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x101d5c9
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x101d5cc
xor eax, eax
inc eax
pop edi
pop esi
leave
ret
Function at 0x101d5f9
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x168
mov eax, dword [0x1029fe8]
mov ecx, dword [ebp + 8]
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ecx
xor esi, esi
push eax
mov dword [ebp - 0x160], ecx
mov dword [ebp - 0x168], eax
mov word [eax], si
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x158]
push eax
push 1
push esi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionFontSubstitutes
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x101d651
xor eax, eax
jmp 0x101d759
push edi
lea eax, [ebp - 0x154]
push eax
lea eax, [ebp - 0x14c]
push eax
lea eax, [ebp - 0x164]
push eax
push esi
lea eax, [ebp - 0x15c]
push eax
lea eax, [ebp - 0xa8]
push eax
push esi
push dword [ebp - 0x158]
mov dword [ebp - 0x150], esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov dword [ebp - 0x15c], 0x52
mov dword [ebp - 0x154], 0xa4
call esi
mov edi, 0x103
jmp 0x101d71c
test eax, eax
jne 0x101d722
push 0x2c
lea eax, [ebp - 0xa8]
push eax
call fcn.0101d5d5
push dword [ebp - 0x160]
lea eax, [ebp - 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x101d726
inc dword [ebp - 0x150]
lea eax, [ebp - 0x154]
push eax
lea eax, [ebp - 0x14c]
push eax
lea eax, [ebp - 0x164]
push eax
push 0
lea eax, [ebp - 0x15c]
push eax
lea eax, [ebp - 0xa8]
push eax
push dword [ebp - 0x150]
mov dword [ebp - 0x15c], 0x52
push dword [ebp - 0x158]
mov dword [ebp - 0x154], 0xa4
call esi
cmp eax, edi
jne 0x101d6a6
jmp 0x101d747
xor esi, esi
jmp 0x101d74a
push 0x2c
lea eax, [ebp - 0x14c]
push eax
call fcn.0101d5d5
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 0x168]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
xor esi, esi
inc esi
push dword [ebp - 0x158]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
mov ecx, dword [ebp - 4]
pop esi
call fcn.01023881
leave
ret 8
Function at 0x101f36e
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [eax]
push ebx
push esi
mov dword [ebp - 0x14], eax
mov ebx, ecx
push edi
mov eax, ebx
cdq
push 4
pop ecx
idiv ecx
xor eax, eax
cmp edx, eax
mov dword [ebp - 4], edx
je 0x101f396
sub ecx, edx
mov dword [ebp - 4], ecx
cmp ebx, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
jle 0x101f41f
mov esi, dword [ebp + 0x14]
cmp ebx, esi
jg 0x101f3b9
cmp dword [ebp - 4], 0
mov esi, ebx
je 0x101f3b9
mov dword [ebp - 0x10], 1
mov edi, dword [ebp + 0x10]
push esi
push edi
push dword [ebp - 8]
push dword [ebp - 0x14]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_GetFontData]
cmp eax, esi
jne 0x101f430
cmp dword [ebp - 0x10], 0
je 0x101f3ee
mov ecx, dword [ebp - 4]
mov edx, ecx
shr ecx, 2
add edi, ebx
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
add esi, edx
mov eax, dword [ebp + 0x10]
push esi
call fcn.0101f2ec
add dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 0x18]
push eax
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x101f430
cmp dword [ebp - 0x18], esi
jne 0x101f430
add dword [ebp - 8], esi
sub ebx, esi
test ebx, ebx
jg 0x101f3a3
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14
or eax, 0xffffffff
jmp 0x101f429

Function at 0x101f537
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
xor esi, esi
push esi
push esi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 4]
push eax
push 0xc
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101f592
cmp dword [ebp - 4], 0xc
jne 0x101f592
lea eax, [esi + 4]
push eax
call fcn.0101f25c
lea eax, [esi + 6]
push eax
call fcn.0101f25c
lea eax, [esi + 8]
push eax
call fcn.0101f25c
add esi, 0xa
push esi
call fcn.0101f25c
xor eax, eax
jmp 0x101f595
or eax, 0xffffffff
pop esi
leave
ret 8

Function at 0x101f629
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push 0
push 0
push 0xc
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xc
je 0x101f648
or eax, 0xffffffff
jmp 0x101f6a0
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
push 0
lea eax, [ebp - 4]
push eax
shl esi, 4
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101f69b
cmp dword [ebp - 4], esi
jne 0x101f69b
cmp dword [ebp + 0x10], 0
jle 0x101f697
lea esi, [edi + 8]
mov edi, dword [ebp + 0x10]
lea eax, [esi - 4]
push eax
call fcn.0101f27e
push esi
call fcn.0101f27e
lea eax, [esi + 4]
push eax
call fcn.0101f27e
add esi, 0x10
dec edi
jne 0x101f679
xor eax, eax
jmp 0x101f69e
or eax, 0xffffffff
pop edi
pop esi
leave
ret 0xc
Function at 0x101f6a9
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x1029fe8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
push esi
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push 0xc
push eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xc
je 0x101f6db
or eax, 0xffffffff
jmp 0x101f733
cmp dword [ebp + 0x10], esi
push edi
jle 0x101f730
dec dword [ebp + 0x10]
mov esi, ebx
lea edi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x10]
push eax
movsd dword es:[edi], dword [esi]
add ebx, 0x10
call fcn.0101f2ca
lea eax, [ebp - 0xc]
push eax
call fcn.0101f2ca
lea eax, [ebp - 8]
push eax
call fcn.0101f2ca
push 0
lea eax, [ebp - 0x18]
push eax
push 0x10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x101f741
cmp dword [ebp - 0x18], 0x10
jne 0x101f741
cmp dword [ebp + 0x10], 0
jg 0x101f6e1
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.01023881
leave
ret 0xc
or eax, 0xffffffff
jmp 0x101f732

Function at 0x101f809
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
push edi
push edi
push dword [esi + 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [esi + 8]
jne 0x101f86f
mov esi, dword [esi + 0xc]
mov ebx, dword [ebp + 0x14]
cmp ebx, esi
jge 0x101f835
mov esi, ebx
push edi
mov edi, dword [ebp + 0x10]
lea eax, [ebp + 0xc]
push eax
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101f86f
cmp dword [ebp + 0xc], esi
jne 0x101f86f
cmp esi, ebx
jae 0x101f86b
mov ecx, ebx
sub ecx, esi
mov edx, ecx
shr ecx, 2
add edi, esi
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, esi
jmp 0x101f872
or eax, 0xffffffff
pop edi
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x101f94e
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0
push 0
push dword [esi + 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [esi + 8]
jne 0x101f9a6
mov edi, dword [esi + 0xc]
cmp dword [ebp + 0x14], edi
jge 0x101f978
mov edi, dword [ebp + 0x14]
push 0
lea eax, [ebp + 0xc]
push eax
push edi
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x101f9a6
cmp dword [ebp + 0xc], edi
jne 0x101f9a6
push dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
call fcn.0101f2ec
mov dword [esi + 4], eax
mov eax, edi
jmp 0x101f9a9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
ret 0x10
Function at 0x101f9b4
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 1
xor esi, esi
push esi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, esi
mov dword [ebp - 0xc], eax
jl 0x101fa42
mov edi, dword [ebp + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
lea eax, [ebp - 4]
push eax
push edi
push dword [ebp + 0x10]
push dword [ebp + 8]
call ebx
test eax, eax
je 0x101fa42
cmp dword [ebp - 4], edi
jne 0x101fa42
mov eax, edi
push 4
cdq
pop ecx
idiv ecx
cmp edx, esi
je 0x101fa26
push ecx
pop esi
xor eax, eax
push eax
lea edi, [ebp - 8]
stosd dword es:[edi], eax
lea eax, [ebp - 4]
push eax
sub esi, edx
push esi
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call ebx
test eax, eax
je 0x101fa42
cmp dword [ebp - 4], esi
jne 0x101fa42
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 0xc]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x10]
push edi
mov dword [esi + 0xc], edi
call fcn.0101f2ec
mov dword [esi + 4], eax
xor eax, eax
jmp 0x101fa45
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x101fa75
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
add esi, 8
cmp eax, ebx
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
mov dword [esi], ebx
jle 0x101fb26
mov dword [ebp - 0xc], eax
mov ecx, dword [edi]
mov eax, 0x10047cc
cmp ecx, dword [eax]
jne 0x101faa7
mov ebx, edi
mov eax, dword [edi]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
call fcn.0101f27e
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
lea eax, [ecx + eax*2]
add eax, dword [edi + 0xc]
add edi, 0x10
add eax, dword [ebp - 8]
add dword [ebp - 4], eax
dec dword [ebp - 0xc]
jne 0x101fa9a
xor edi, edi
cmp ebx, edi
je 0x101fb26
mov eax, dword [ebp + 0xc]
push 0xc
call fcn.0101f2ec
add dword [ebp - 4], eax
push edi
push edi
push dword [ebx + 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebx + 8]
jne 0x101fb26
mov eax, 0xb1b0afba
sub eax, dword [ebp - 4]
push esi
mov dword [esi], eax
call fcn.0101f2ca
push edi
lea eax, [ebp + 0xc]
push eax
push 0x36
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x101fb26
cmp dword [ebp + 0xc], 0x36
jne 0x101fb26
xor eax, eax
jmp 0x101fb29
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x1020422
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov esi, 0x4000
push esi
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
xor eax, eax
cmp ebx, eax
pop ecx
je 0x102050c
mov edi, dword [ebp + 0x10]
and edi, 3
mov dword [ebp - 4], edi
je 0x102045b
push 4
pop ecx
sub ecx, edi
mov dword [ebp - 4], ecx
mov edi, ecx
cmp dword [ebp + 0x10], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
ja 0x1020484
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0xc]
push ebx
mov dword [eax], ecx
call dword [sym.imp.msvcrt.dll_free]
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10
mov esi, 0x4000
cmp dword [ebp + 0x10], esi
ja 0x1020497
test edi, edi
mov esi, dword [ebp + 0x10]
je 0x1020497
mov dword [ebp - 0x10], 1
push 0
lea eax, [ebp - 8]
push eax
push esi
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1020504
cmp dword [ebp - 8], esi
jne 0x1020504
cmp dword [ebp - 0x10], 0
je 0x10204d5
mov edx, dword [ebp + 0x10]
mov ecx, edi
lea edi, [ebx + edx]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
add esi, dword [ebp - 4]
rep stosb byte es:[edi], al
mov edi, dword [ebp - 4]
push esi
mov eax, ebx
call fcn.0101f2ec
add dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 8]
push eax
push esi
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1020504
cmp dword [ebp - 8], esi
jne 0x1020504
sub dword [ebp + 0x10], esi
jne 0x102047f
jmp 0x1020466
push ebx
call dword [sym.imp.msvcrt.dll_free]
pop ecx
or eax, 0xffffffff
jmp 0x1020478
Function at 0x1020519
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
mov eax, dword [edi]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
call fcn.0101f27e
mov eax, dword [ebp + 0x10]
mov esi, dword [eax + 8]
add esi, dword [ebp - 4]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push esi
push dword [ebp + 8]
call ebx
cmp eax, esi
jne 0x1020646
push 0
push 0
push esi
push dword [ebp + 0xc]
call ebx
cmp eax, esi
jne 0x1020646
mov eax, dword [ebp + 0x18]
lea esi, [edi + eax*4]
mov eax, dword [esi]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
call fcn.0101f27e
mov eax, dword [esi + 4]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
call fcn.0101f27e
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.01020422
test eax, eax
jne 0x1020646
mov edi, dword [ebp + 0x20]
test edi, edi
jle 0x10205fe
push 4
mov eax, edi
pop esi
cdq
mov ecx, esi
idiv ecx
test edx, edx
je 0x10205d9
sub esi, edx
mov edx, dword [ebp + 0x1c]
add edi, edx
mov ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
add dword [ebp + 0x20], esi
rep stosb byte es:[edi], al
mov edi, dword [ebp + 0x20]
push 0
lea eax, [ebp + 0x20]
push eax
push edi
push dword [ebp + 0x1c]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1020646
cmp dword [ebp + 0x20], edi
jne 0x1020646
mov eax, dword [ebp + 0x1c]
push edi
call fcn.0101f2ec
mov eax, dword [ebp + 0x10]
mov esi, dword [eax + 8]
add esi, dword [ebp - 8]
push 0
push 0
push esi
push dword [ebp + 8]
call ebx
cmp eax, esi
jne 0x1020646
mov ecx, dword [ebp + 0x14]
mov eax, dword [0x102ce08]
mov eax, dword [ecx + eax*4]
mov dword [ebp + 0x1c], eax
lea eax, [ebp + 0x1c]
push eax
call fcn.0101f27e
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp + 0x1c]
sub eax, dword [ebp - 8]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.01020422
test eax, eax
je 0x102064b
or eax, 0xffffffff
jmp 0x102069e
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 8]
mov esi, dword [ebp + 0x18]
mov ebx, dword [0x102ce08]
add eax, edi
mov dword [ebp + 0xc], eax
jmp 0x1020689
mov eax, dword [ebp + 0x14]
lea edi, [eax + esi*4]
mov eax, dword [edi]
mov dword [ebp + 0x20], eax
lea eax, [ebp + 0x20]
push eax
call fcn.0101f27e
mov eax, dword [ebp + 0xc]
add dword [ebp + 0x20], eax
lea eax, [ebp + 0x20]
push eax
call fcn.0101f2ca
mov eax, dword [ebp + 0x20]
mov dword [edi], eax
inc esi
cmp esi, ebx
jle 0x1020661
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0xc]
add ecx, eax
mov eax, dword [ebp + 0x10]
mov dword [eax + 0xc], ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x1c
Function at 0x1020e49
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x102ce04]
and dword [ebp - 0x10], 0
push ebx
push esi
push edi
push 0x10047fc
push dword [0x102ce00]
call fcn.0101f74b
mov edi, eax
test edi, edi
mov dword [ebp - 0xc], edi
je 0x1020f39
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x102ce14]
lea ebx, [ecx + eax*4]
mov eax, dword [ebx]
mov dword [ebp + 0xc], eax
lea eax, [ebp + 0xc]
push eax
call fcn.0101f27e
mov eax, dword [ebx + 4]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
call fcn.0101f27e
mov edi, dword [edi + 8]
add edi, dword [ebp + 0xc]
mov esi, dword [ebp - 8]
sub esi, dword [ebp + 0xc]
push 0
push 0
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, edi
jne 0x1020f39
push 2
xor edi, edi
push edi
push edi
push dword [0x102cde8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0xc]
sub eax, dword [ecx + 8]
mov dword [ebp + 0xc], eax
lea eax, [ebp + 0xc]
push eax
call fcn.0101f2ca
cmp esi, edi
mov eax, dword [ebp + 0xc]
mov dword [ebx], eax
je 0x1020f3e
push esi
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
cmp ebx, edi
pop ecx
je 0x1020f39
push edi
lea eax, [ebp - 4]
push eax
push esi
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1020f31
cmp dword [ebp - 4], esi
jne 0x1020f31
push edi
lea eax, [ebp - 4]
push eax
push esi
push ebx
push dword [0x102cde8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1020f31
cmp dword [ebp - 4], esi
je 0x1020f41
push ebx
call dword [sym.imp.msvcrt.dll_free]
pop ecx
or eax, 0xffffffff
jmp 0x1020f4b
mov ebx, dword [ebp - 0x10]
push ebx
call dword [sym.imp.msvcrt.dll_free]
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x1020f57
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push edi
mov edi, dword [ebp + 8]
cmp edi, dword [0x102ce08]
jl 0x1020f6e
or eax, 0xffffffff
jmp 0x1020fe5
mov eax, dword [0x102ce04]
push esi
push 0x10047fc
push dword [0x102ce00]
call fcn.0101f74b
mov esi, eax
test esi, esi
je 0x1020fdd
push 2
push 0
push 0
push dword [0x102cde8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub eax, dword [esi + 8]
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
call fcn.0101f2ca
mov esi, dword [ebp + 0x10]
test esi, esi
mov eax, dword [ebp + 8]
mov ecx, dword [0x102ce14]
mov dword [ecx + edi*4], eax
je 0x1020fe2
push 0
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 0xc]
push dword [0x102cde8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1020fdd
cmp dword [ebp - 4], esi
je 0x1020fe2
or eax, 0xffffffff
jmp 0x1020fe4
xor eax, eax
pop esi
pop edi
leave
ret 0xc