joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401fd0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405fb0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x409008]
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 esi, dword [ebp + 8]
mov edi, 7
mov dword [ebp - 0x14], 0
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
test esi, esi
je 0x40204c
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402030
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00402990
mov edi, dword [ebp - 0x14]
push str.__typedefault
lea ecx, [ebp - 0x28]
call fcn.004027d0
test eax, eax
je 0x402078
push str.__typenetrepair
lea ecx, [ebp - 0x28]
call fcn.004027d0
test eax, eax
je 0x402078
mov esi, 1
jmp 0x40215f
push str.3B8B90BA_5148_4122_AF83_A6895221A618
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebx + 8], eax
test eax, eax
jne 0x402096
or esi, 0xffffffff
jmp 0x40215f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4020ba
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 8], 0
xor esi, esi
jmp 0x40215f
mov edx, esi
mov dword [ebp - 0x30], 0
xor eax, eax
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4020e1
sub edx, ecx
lea ecx, [ebp - 0x40]
sar edx, 1
push edx
push esi
call fcn.00402990
mov byte [ebp - 4], 1
lea eax, [ebp - 0x40]
push eax
mov ecx, ebx
call fcn.004021e0
mov esi, eax
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x40214b
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402141
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402141
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00404a3f
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 4], 0xffffffff
cmp edi, 8
jb 0x40219f
mov ecx, dword [ebp - 0x28]
lea edx, [edi*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402195
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402195
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00404a3f
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov eax, esi
mov dword [ebp - 0x14], 7
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.004049fe
mov esp, ebp
pop ebp
ret 4
Function at 0x404610
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4064b8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x409008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x404646
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4046f6
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
lea edx, [ebp - 0x28]
mov ecx, esi
call fcn.00404900
test al, al
je 0x40469f
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4046e2
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4046d8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4046d8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00404a3f
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov eax, edi
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.004049fe
mov esp, ebp
pop ebp
ret
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
push str.bsafe_error:_strncpy___is_not_safe__use_bmidstr_instead._n
push 0x412680
call fcn.00406480
pop ecx
pop ecx
push 0xffffffffffffffff
call fcn.004063ab
Function at 0x403061
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x40f0bb
call fcn.00407440
sub esp, 0x418
push ebx
xor ebx, ebx
push edi
mov dword [ebp - 0x14], ebx
push 0x413340
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 2
call fcn.00401c0f
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x423]
mov byte [ebp - 0x424], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 3
push eax
push 0x20019
push ebx
mov dword [ebp - 0x18], 0x400
push dword [ebp + 0x14]
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403100
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x424]
push eax
push ebx
push ebx
push dword [ebp + 0x20]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4030f7
lea eax, [ebp - 0x424]
lea ecx, [ebp - 0x24]
push eax
call fcn.00401d74
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
call fcn.00401c73
mov dword [ebp - 0x14], 1
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call fcn.00401d53
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call fcn.00401d53
lea ecx, [ebp + 0x18]
mov byte [ebp - 4], bl
call fcn.00401d53
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x1c

Function at 0x403149
Capabilities:
Set registry value

Disassembly:
mov eax, 0x40f0d8
call fcn.00407440
push ecx
push ecx
lea eax, [ebp - 0x14]
and byte [ebp - 0xd], 0
push eax
push 0xf003f
push 0
mov dword [ebp - 4], 1
push dword [ebp + 0x10]
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4031a2
mov eax, dword [ebp + 0x24]
inc eax
push eax
push dword [ebp + 0x28]
push 1
push 0
push dword [ebp + 0x1c]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 0xd], 1
lea ecx, [ebp + 8]
call fcn.00401d53
and byte [ebp - 4], 0
lea ecx, [ebp + 0x14]
call fcn.00401d53
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x20]
call fcn.00401d53
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xd]
mov dword fs:[0], ecx
leave
ret 0x24

Function at 0x4031d3
Capabilities:
Delete registry value

Disassembly:
mov eax, 0x40f0ec
call fcn.00407440
push ecx
push ebx
lea eax, [ebp - 0x10]
xor ebx, ebx
push eax
push 0xf003f
push ebx
mov dword [ebp - 4], ebx
push dword [ebp + 0x10]
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403217
push dword [ebp + 0x1c]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov bl, 1
lea ecx, [ebp + 8]
call fcn.00401d53
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x14]
call fcn.00401d53
mov ecx, dword [ebp - 0xc]
mov al, bl
pop ebx
mov dword fs:[0], ecx
leave
ret 0x18
Function at 0x4049e1
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x40f563
call fcn.00407440
push ecx
and dword [ebp - 0x10], 0
push esi
push edi
push 1
xor esi, esi
cmp dword [ebp + 0x10], esi
pop edi
mov dword [ebp - 4], edi
jle 0x404a1d
mov eax, dword [ebp + 0x14]
lea ecx, [eax + esi]
mov al, byte [eax + esi]
mov dl, al
shr dl, 4
shl al, 4
or dl, al
xor dl, 0xfe
inc esi
mov byte [ecx], dl
cmp esi, dword [ebp + 0x10]
jl 0x4049ff
mov ecx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
call fcn.00401c73
mov dword [ebp - 0x10], edi
and byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
call fcn.00401d53
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 0x10

Function at 0x404a4b
Capabilities:
Check internet connectivity via wininet

Disassembly:
push esi
push edi
mov edi, ecx
xor eax, eax
push eax
lea esi, [edi + 0x88]
mov byte [edi + 1], al
push esi
mov dword [esi], eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
je 0x404a78
mov ecx, dword [esi]
push 1
pop eax
and ecx, eax
cmp cl, al
jne 0x404a7a
mov byte [edi + 1], al
jmp 0x404a7a
xor al, al
pop edi
pop esi
ret
Function at 0x40512b
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
mov eax, 0x40f6a4
call fcn.00407440
sub esp, 0x428
push ebx
push esi
push edi
mov edi, ecx
mov esi, 0x413340
xor ebx, ebx
lea ecx, [edi + 0x10]
push esi
mov dword [ebp - 4], ebx
mov byte [ebp - 0xd], bl
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], ebx
call fcn.00401d74
lea ecx, [edi + 0x1c]
push esi
call fcn.00401d74
push 7
lea eax, [ebp - 0x34]
push ebx
push eax
lea ecx, [ebp + 8]
call fcn.0040215d
mov esi, str.http:__
mov ecx, eax
push esi
mov byte [ebp - 4], 1
call fcn.004020d2
lea ecx, [ebp - 0x34]
mov byte [ebp - 0xe], al
mov byte [ebp - 4], bl
call fcn.00401d53
cmp byte [ebp - 0xe], bl
je 0x4051c4
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x34]
push esi
push eax
call fcn.0040228d
add esp, 0xc
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.00401de9
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], bl
call fcn.00401d53
cmp dword [ebp + 0x14], ebx
jne 0x4051d0
mov dword [ebp + 0x14], 0x7fffffff
push ebx
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [ebp - 0x28], eax
je 0x4052e6
push ebx
push 0x80000000
push ebx
push ebx
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
cmp eax, ebx
mov dword [ebp - 0x20], eax
je 0x4052dd
lea ecx, [ebp - 0x24]
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
push ecx
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x434]
push ecx
push 0x16
push eax
call esi
mov eax, dword [ebp - 0x14]
inc eax
push eax
call fcn.004075b5
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
inc ecx
push ecx
push ebx
push eax
call fcn.00406fc0
add esp, 0x10
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
push 0x16
push dword [ebp - 0x20]
call esi
cmp eax, ebx
je 0x4052cb
cmp dword [ebp - 0x14], ebx
jbe 0x4052cb
push dword [ebp - 0x18]
lea ecx, [edi + 0x10]
call fcn.00401d74
mov esi, 0x400
push esi
lea eax, [ebp - 0x434]
push ebx
push eax
call fcn.00406fc0
mov eax, dword [ebp + 0x14]
add esp, 0xc
cmp eax, esi
jb 0x40527f
mov eax, esi
lea ecx, [ebp - 0x1c]
push ecx
push eax
lea eax, [ebp - 0x434]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, ebx
je 0x4052bd
push dword [ebp - 0x1c]
lea eax, [ebp - 0x434]
push eax
lea eax, [edi + 0x1c]
push eax
call fcn.004010d5
mov eax, dword [ebp - 0x1c]
add esp, 0xc
sub dword [ebp + 0x14], eax
cmp eax, ebx
jbe 0x4052bd
cmp dword [ebp + 0x14], ebx
jg 0x405265
cmp dword [edi + 0x14], ebx
jle 0x4052cb
cmp dword [edi + 0x20], ebx
jle 0x4052cb
mov byte [ebp - 0xd], 1
push dword [ebp - 0x18]
call fcn.004075aa
pop ecx
push dword [ebp - 0x20]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0x28]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.00401d53
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xd]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10
Function at 0x40b7c1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x412d78
cmp edx, dword [eax]
je 0x40b7e3
add eax, 8
inc ecx
cmp eax, 0x412e08
jl 0x40b7d4
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x412d78]
jne 0x40b911
mov eax, dword [0x4133c0]
cmp eax, 1
je 0x40b8eb
test eax, eax
jne 0x40b814
cmp dword [0x412918], 1
je 0x40b8eb
cmp edx, 0xfc
je 0x40b911
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x40b84b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0040a490
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004068b0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40b88e
lea eax, [ebp - 0x1a4]
push eax
call fcn.004068b0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4105e8
push edi
call section..text
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0040a490
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040a4a0
lea eax, [ebp - 0xa0]
push 0x4105c8
push eax
call fcn.0040a4a0
push dword [esi + 0x412d7c]
lea eax, [ebp - 0xa0]
push eax
call fcn.0040a4a0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040d294
add esp, 0x2c
pop edi
jmp 0x40b911
lea eax, [ebp + 8]
lea esi, [esi + 0x412d7c]
push 0
push eax
push dword [esi]
call fcn.004068b0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
pop esi
leave
ret
Function at 0x1001efa
Capabilities:
Parse url

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x808
mov eax, dword [0x1007084]
push edi
mov edi, ecx
test edi, edi
mov dword [ebp - 4], eax
jne 0x1001f23
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1002025
push esi
push 0x1264
call sub.cmutil.dll_CmMalloc
mov esi, eax
test esi, esi
je 0x1002024
lea eax, [esi + 0x3c]
mov dword [esi + 4], eax
push ebx
lea eax, [esi + 0x5c]
mov dword [esi + 0x10], eax
lea eax, [esi + 0x15d]
mov dword [esi + 0x1c], eax
push esi
push dword [ebp + 8]
mov eax, 0x81
mov dword [esi + 0x20], eax
mov dword [esi + 0x28], eax
lea eax, [esi + 0x25f]
mov dword [esi + 0x2c], eax
mov eax, 0x801
push 0
lea ecx, [esi + 0x1de]
lea ebx, [esi + 0xa60]
push edi
mov dword [esi], 0x3c
mov dword [esi + 8], 0x20
mov dword [esi + 0x14], 0x101
mov dword [esi + 0x24], ecx
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], eax
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
jne 0x1001fae
push esi
call sub.cmutil.dll_CmFree
xor eax, eax
jmp 0x1002023
mov al, byte [ebx]
xor edi, edi
test al, al
je 0x1002021
mov ecx, ebx
cmp al, 0x20
jne 0x1001fbd
inc edi
inc ecx
mov al, byte [ecx]
test al, al
jne 0x1001fb8
test edi, edi
je 0x1002021
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [eax + edi*2]
cmp eax, 0x800
ja 0x1001fa4
xor eax, eax
mov ecx, 0x200
lea edi, [ebp - 0x808]
rep stosd dword es:[edi], eax
mov cl, byte [ebx]
test cl, cl
stosb byte es:[edi], al
je 0x1002013
mov edx, ebx
lea eax, [ebp - 0x808]
cmp cl, 0x20
jne 0x1002009
mov byte [eax], 0x25
inc eax
mov byte [eax], 0x32
inc eax
mov byte [eax], 0x30
jmp 0x100200b
mov byte [eax], cl
inc edx
mov cl, byte [edx]
inc eax
test cl, cl
jne 0x1001ff7
lea eax, [ebp - 0x808]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, esi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
pop edi
call fcn.01004f75
leave
ret 4
Function at 0x1002349
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [esi + 0x1c]
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push dword [eax + 0x2c]
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [esi + 0x148]
cmp dword [ecx], edi
mov dword [ebp - 0xc], eax
jne 0x100247e
cmp eax, 0xffffffff
je 0x100248d
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esi + 0x148]
mov dword [esi + 0x140], eax
cmp dword [ecx], edi
jne 0x100247e
cmp eax, 0xffffffff
je 0x100247e
push ebx
mov ebx, 0x2000
push ebx
call sub.cmutil.dll_CmMalloc
cmp eax, edi
mov dword [ebp - 0x10], eax
je 0x100247d
push edi
lea ecx, [ebp - 8]
push ecx
push ebx
push eax
jmp 0x1002448
cmp dword [ebp - 4], edi
je 0x1002475
cmp dword [ebp - 8], edi
je 0x1002464
push edi
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 8]
push dword [ebp - 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x148]
cmp dword [eax], edi
jne 0x1002475
cmp dword [ebp - 4], edi
je 0x1002475
mov ecx, dword [ebp - 0x14]
cmp dword [ebp - 8], ecx
jne 0x100246d
lea eax, [esi + 0x13c]
add dword [eax], ecx
mov ecx, dword [esi + 0x134]
cmp ecx, edi
mov eax, dword [eax]
je 0x1002435
push dword [esi + 0x138]
push dword [esi + 0x140]
push eax
call ecx
mov eax, dword [esi + 0x148]
cmp dword [eax], edi
jne 0x1002475
push edi
lea eax, [ebp - 8]
push eax
push ebx
push dword [ebp - 0x10]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x148]
cmp dword [eax], edi
je 0x10023d2
jmp 0x1002475
mov dword [ebp - 4], 1
jmp 0x1002475
push 0x70
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x10]
call sub.cmutil.dll_CmFree
pop ebx
cmp dword [ebp - 0xc], 0xffffffff
je 0x100248d
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop edi
leave
ret 4
Function at 0x1002997
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x258
mov eax, dword [0x1007084]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0x254], ebx
je 0x1002b50
cmp byte [ebx], 0
je 0x1002b50
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
inc eax
cmp eax, 0x104
ja 0x1002b50
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebx
lea eax, [ebp - 0x10c]
push eax
call edi
lea eax, [ebp - 0x10c]
push eax
call fcn.01004dd7
cmp al, 0x5c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x1002a0f
push 0x1001310
lea eax, [ebp - 0x10c]
push eax
call esi
push 0x10014ac
lea eax, [ebp - 0x10c]
push eax
call esi
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x250], eax
je 0x1002b45
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
call ebx
lea ecx, [ebp - 0x220]
push ecx
mov dword [ebp - 0x258], eax
call ebx
mov ecx, dword [ebp - 0x258]
lea eax, [ecx + eax + 1]
cmp eax, 0x104
ja 0x1002b18
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push 0x10014a8
lea eax, [ebp - 0x220]
push eax
call ebx
test eax, eax
je 0x1002b18
push 0x10014a4
lea eax, [ebp - 0x220]
push eax
call ebx
test eax, eax
je 0x1002b18
mov ebx, dword [ebp - 0x254]
push ebx
lea eax, [ebp - 0x10c]
push eax
call edi
lea eax, [ebp - 0x10c]
push eax
call fcn.01004dd7
cmp al, 0x5c
je 0x1002ac9
push 0x1001310
lea eax, [ebp - 0x10c]
push eax
call esi
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x10c]
push eax
call esi
test byte [ebp - 0x24c], 1
je 0x1002af9
mov eax, dword [ebp - 0x24c]
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test byte [ebp - 0x24c], 0x10
lea eax, [ebp - 0x10c]
push eax
je 0x1002b10
call fcn.01002997
jmp 0x1002b1e
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x1002b1e
mov ebx, dword [ebp - 0x254]
lea eax, [ebp - 0x24c]
push eax
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x1002a40
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop edi
pop esi
jmp 0x1002b5d
push 0xa1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 4]
pop ebx
call fcn.01004f75
leave
ret 4
Function at 0x1002e10
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
or dword [ebp - 8], 0xffffffff
push ebx
push esi
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x1002eb8
cmp esi, 0xffffffff
je 0x1002eb8
push edi
push ebx
mov byte [ebp - 4], bl
xor eax, eax
push ebx
lea edi, [ebp - 3]
stosw word es:[edi], ax
push ebx
push esi
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 0xc]
push eax
push 3
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
pop edi
je 0x1002eb8
cmp dword [ebp - 0xc], 3
jb 0x1002eb8
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push 0x10014b4
lea eax, [ebp - 4]
push eax
call esi
test eax, eax
jne 0x1002e80
mov dword [ebp - 8], ebx
jmp 0x1002eb8
push 0x10014b0
lea eax, [ebp - 4]
push eax
call esi
test eax, eax
je 0x1002eb8
xor eax, eax
xor ecx, ecx
mov dl, byte [ebp + ecx - 4]
cmp dl, 0x30
jl 0x1002eb1
cmp dl, 0x39
jg 0x1002eb1
movsx edx, dl
inc ecx
cmp ecx, 3
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x30]
jl 0x1002e93
cmp eax, ebx
je 0x1002eb8
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
pop esi
pop ebx
leave
ret
Function at 0x10038c2
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1dc
mov eax, dword [0x1007084]
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push edi
mov dword [ebp - 0x1b0], eax
mov eax, dword [ebp + 0xc]
push 0x3f
push ebx
mov dword [ebp - 0x1b4], eax
call sub.cmutil.dll_CmStrchrA
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
jne 0x1003902
push 0x1001524
jmp 0x1003911
push ebx
call esi
cmp byte [eax + ebx - 1], 0x26
je 0x1003918
push 0x1001520
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x1dc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push 0x25
pop ecx
xor eax, eax
lea edi, [ebp - 0x1ac]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x1ac]
push eax
mov dword [ebp - 0x1ac], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x19c], 1
movzx eax, word [ebp - 0x1a0]
je 0x100395f
mov eax, dword [ebp - 0x1a0]
push 0x1001510
push eax
push dword [ebp - 0x1a4]
push dword [ebp - 0x1a8]
push 0x800
call dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
push eax
push dword [ebp - 0x19c]
movzx eax, word [ebp - 0x1dc]
push eax
push 0x10014dc
push ebx
call esi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
add eax, ebx
push eax
call edi
mov eax, dword [ebp - 0x1b0]
add esp, 0x24
test eax, eax
je 0x10039c1
cmp byte [eax], 0
je 0x10039c1
push eax
push 0x10014d0
push ebx
call esi
add eax, ebx
push eax
call edi
add esp, 0xc
mov eax, dword [ebp - 0x1b4]
test eax, eax
je 0x1003a53
cmp byte [eax], 0
je 0x1003a53
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10039d7
and dword [ebp - 0x1b0], 0
sub eax, edx
test eax, eax
mov dword [ebp - 0x1b8], eax
mov byte [ebp - 0x118], cl
mov byte [ebp - 0x13], cl
jle 0x1003a3c
mov eax, dword [ebp - 0x1b4]
mov ecx, dword [ebp - 0x1b0]
mov al, byte [eax + ecx]
cmp al, 0x20
jne 0x1003a14
push 0x10014cc
jmp 0x1003a1b
mov byte [ebp - 0x14], al
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
inc dword [ebp - 0x1b0]
mov eax, dword [ebp - 0x1b0]
cmp eax, dword [ebp - 0x1b8]
jl 0x10039fa
lea eax, [ebp - 0x118]
push eax
push 0x10014c4
push ebx
call esi
add eax, ebx
push eax
call edi
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.01004f75
leave
ret 8