joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1003303a
Capabilities:
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
xor eax, eax
push ebx
mov ebx, edx
mov dword [ebp - 4], eax
push eax
lea edx, [ebp - 8]
mov dword [ebp - 8], eax
call fcn.10030a2b
test dword [ebp - 8], 0x8000
je 0x1003310f
push 7
push 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
call dword [sym.imp.ntdll.dll_NtQueryInformationFile]
test eax, eax
js 0x1003310f
mov eax, dword [ebp - 0xc]
cmp eax, 1
jbe 0x1003310f
push edi
lea edi, [eax*2 + 2]
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x1003310e
push esi
push 1
xor ecx, ecx
mov esi, eax
push ecx
push ecx
push ecx
push ecx
push edi
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
call dword [sym.imp.ntdll.dll_NtQueryEaFile]
test eax, eax
js 0x1003310d
test edi, edi
je 0x1003310d
mov ebx, esi
movzx eax, byte [esi + 5]
cmp byte [eax + esi + 8], 0
je 0x100330d8
mov byte [eax + esi + 8], 0
push 8
lea eax, [esi + 8]
push 0x10006884
push eax
call dword [sym.imp.msvcrt.dll__strnicmp]
add esp, 0xc
test eax, eax
je 0x100330fd
mov ecx, dword [ebp - 4]
mov edx, esi
call fcn.10032f19
mov dword [ebp - 4], eax
mov eax, dword [esi]
test eax, eax
je 0x1003310d
add esi, eax
mov eax, esi
sub eax, ebx
cmp eax, edi
jb 0x100330c8
pop esi
pop edi
mov eax, dword [ebp - 4]
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10033117
Capabilities:
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x10086084]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov edi, edx
push 0x40
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x228], eax
pop ebx
jmp 0x10033156
mov edi, dword [ebp - 0x21c]
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x224], esi
test esi, esi
je 0x100331a9
push 0x16
push ebx
push esi
lea eax, [ebp - 0x22c]
push eax
push edi
call dword [sym.imp.ntdll.dll_NtQueryInformationFile]
mov edi, eax
test edi, edi
jns 0x100331ae
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor ecx, ecx
add ebx, 0x20
mov esi, ecx
mov dword [ebp - 0x224], esi
jmp 0x100331b0
mov edi, 0xc0000017
xor ecx, ecx
cmp edi, 0x80000005
je 0x10033150
cmp edi, 0xc0000023
je 0x10033150
test edi, edi
js 0x100332f6
test esi, esi
je 0x10033309
mov edi, esi
mov esi, dword [ebp - 0x214]
mov ebx, dword [edi + 4]
cmp ebx, 2
jbe 0x100332d2
cmp word [edi + 0x18], cx
je 0x100332d2
push 0x208
push ecx
lea eax, [ebp - 0x210]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
shr ebx, 1
lea eax, [edi + 0x18]
mov edx, 0x104
lea ecx, [ebp - 0x210]
push ebx
push eax
call fcn.1001a4c2
or ebx, 0xffffffff
lea eax, [ebp - 0x210]
push ebx
push 0x10006910
push ebx
push eax
push 1
push 0x409
call dword [sym.imp.KERNEL32.dll_CompareStringW]
dec eax
sub eax, 1
je 0x100332a2
cmp dword [ebp + 0xc], 0
jne 0x10033265
push ebx
push 0x10006920
push ebx
lea eax, [ebp - 0x210]
push eax
push 1
push 0x409
call dword [sym.imp.KERNEL32.dll_CompareStringW]
dec eax
sub eax, 1
je 0x100332d2
mov eax, dword [edi + 4]
lea ecx, [ebp - 0x210]
shr eax, 1
mov edx, 0x104
sub eax, 7
push eax
lea eax, [edi + 0x1a]
push eax
call fcn.1001a4c2
mov eax, dword [edi + 8]
lea edx, [ebp - 0x210]
mov dword [ebp - 0x220], eax
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x220]
jmp 0x100332c8
test dword [ebp + 8], 0x400
je 0x100332d2
mov eax, dword [edi + 8]
mov edx, 0x100051e8
mov dword [ebp - 0x218], eax
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x214], eax
lea eax, [ebp - 0x218]
push eax
mov ecx, esi
call fcn.10033322
mov esi, eax
mov eax, dword [edi]
test eax, eax
je 0x100332de
add edi, eax
xor ecx, ecx
jmp 0x100332e2
xor ecx, ecx
mov edi, ecx
test edi, edi
jne 0x100331d8
mov dword [ebp - 0x214], esi
mov esi, dword [ebp - 0x224]
test esi, esi
je 0x10033309
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x214]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.10083b20
mov esp, ebp
pop ebp
ret 8
Function at 0x100335ea
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x10086084]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x14]
xor eax, eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x34], ecx
lea edi, [ebp - 0x30]
push 0xa
pop ecx
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x10033629
and eax, 0x3127
or eax, 0x80
mov dword [ebp - 0x10], eax
test ebx, ebx
je 0x10033638
mov eax, dword [ebx]
mov dword [ebp - 0x30], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x2c], eax
test esi, esi
je 0x10033647
mov eax, dword [esi]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x24], eax
test edx, edx
je 0x10033656
mov eax, dword [edx]
mov dword [ebp - 0x20], eax
mov eax, dword [edx + 4]
mov dword [ebp - 0x1c], eax
push 4
push 0x28
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.ntdll.dll_NtSetInformationFile]
test eax, eax
jns 0x1003367e
mov esi, eax
or esi, 0x10000000
cmp eax, 0xc000000d
jne 0x10033680
xor esi, esi
test esi, esi
jns 0x10033694
push esi
push 0x6c3
mov ecx, 0x1000694c
call fcn.1003a254
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10083b20
mov esp, ebp
pop ebp
ret 0x10
Function at 0x10034296
Capabilities:
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
xor esi, esi
mov ebx, edx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
push edi
test ecx, ecx
je 0x10034399
test ebx, ebx
je 0x10034399
push esi
push esi
lea eax, [ebp - 0x10]
push eax
push ecx
call dword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
test al, al
je 0x10034390
push 6
pop ecx
xor eax, eax
mov dword [ebp - 8], esi
push 0x4020
lea edi, [ebp - 0x30]
mov dword [ebp - 0x18], esi
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x18]
push 7
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0x18
push eax
push 0x120089
lea eax, [ebp - 8]
mov dword [ebp - 0x2c], esi
push eax
mov dword [ebp - 0x24], 0x40
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
call dword [sym.imp.ntdll.dll_NtOpenFile]
mov esi, eax
test esi, esi
js 0x10034388
push 0x28
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x15
push 0x28
mov edi, eax
lea eax, [ebp - 0x18]
push edi
push eax
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtQueryInformationFile]
mov esi, eax
test esi, esi
js 0x10034363
lea eax, [edi + 4]
mov edx, 0x104
push eax
mov ecx, ebx
call fcn.10015ac7
mov esi, eax
jmp 0x10034369
or esi, 0x10000000
test edi, edi
je 0x1003437d
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtClose]
jmp 0x10034395
or esi, 0x10000000
jmp 0x10034395
mov esi, 0x80070003
mov eax, esi
jmp 0x1003439e
mov eax, 0x80070057
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x100343a7
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push esi
push edi
mov edi, ecx
xor esi, esi
test edi, edi
je 0x10034402
cmp word [edi], si
je 0x10034402
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
push 0x6200000
push 3
push esi
push 7
push 0x10000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x100343ed
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
test esi, esi
jne 0x100343fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x100343fe
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
jmp 0x1003440c
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
ret
Function at 0x10034b21
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
xor eax, eax
mov dword [ebp - 8], ecx
push edi
push eax
push eax
mov esi, eax
mov dword [ebp - 0x20], eax
mov ebx, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x18]
mov edi, edx
push eax
push dword [ebp + 8]
mov dword [ebp - 0x10], edi
call dword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
test al, al
jne 0x10034b89
mov esi, 0x80070003
mov edi, 0x10006ca4
push esi
push 0x566
mov ecx, edi
call fcn.1003a254
mov edx, dword [ebp - 8]
xor ecx, ecx
push 0x567
push edi
push esi
push 0x10006b98
push dword [ebp + 8]
inc ecx
call fcn.1002fae3
jmp 0x10034cdd
push 0
push 0x2200000
push 3
push 0
push 7
push 0x1f0000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
mov edi, 0x80070000
cmp eax, 0xffffffff
jne 0x10034bf3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10034bc0
movzx eax, ax
or eax, edi
test eax, eax
jns 0x10034bd5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10034bdc
movzx esi, si
or esi, edi
jmp 0x10034bda
mov esi, 0x80004005
test esi, esi
jns 0x10034bf3
push esi
push 0x577
mov ecx, 0x10006ca4
call fcn.1003a254
jmp 0x10034cdd
movzx edi, word [ebp - 0x18]
add edi, 0x10
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x10034c88
push edi
push 0
push ebx
call sub.msvcrt.dll_memset
and dword [ebx + 4], 0
mov byte [ebx], 1
movzx eax, word [ebp - 0x18]
mov dword [ebx + 8], eax
movzx eax, word [ebp - 0x18]
push eax
push dword [ebp - 0x14]
lea eax, [ebx + 0xc]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x18
lea eax, [ebp - 0x20]
push 0xa
push edi
push ebx
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_NtSetInformationFile]
test eax, eax
jns 0x10034cce
mov esi, eax
mov edi, 0x10006ca4
or esi, 0x10000000
jge 0x10034c6c
push esi
push 0x592
mov ecx, edi
call fcn.1003a254
mov edx, dword [ebp - 8]
xor ecx, ecx
push 0x593
push edi
push esi
push 0x10006cbc
push dword [ebp - 0x10]
inc ecx
call fcn.1002fae3
jmp 0x10034cce
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10034c9c
movzx eax, ax
or eax, 0x80070000
test eax, eax
jns 0x10034cb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10034cbc
movzx esi, si
or esi, 0x80070000
jmp 0x10034cba
mov esi, 0x80004005
test esi, esi
jns 0x10034cce
push esi
push 0x599
mov ecx, 0x10006ca4
call fcn.1003a254
mov eax, dword [ebp - 0xc]
cmp eax, 0xffffffff
je 0x10034cdd
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], 0
je 0x10034cf7
push dword [ebp - 0x14]
mov eax, dword fs:[0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
test ebx, ebx
je 0x10034d0b
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x10035476
Capabilities:
Create directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x628
mov eax, dword [0x10086084]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov eax, ecx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x624], eax
mov esi, edx
inc edi
call fcn.100353cd
mov dword [ebp - 0x628], eax
test eax, eax
je 0x10035556
mov ecx, dword [ebp - 0x624]
or dword [ebp - 0x620], 0xffffffff
call fcn.100311e1
lea ecx, [ebp - 0x620]
mov edx, 0xc11d0131
push ecx
push dword [ebp - 0x628]
mov ecx, eax
push 0x10
push 0x204021
push 3
call fcn.1004bb0d
mov esi, eax
mov eax, dword [ebp - 0x620]
test ebx, ebx
je 0x100354f6
mov dword [ebx], eax
or eax, 0xffffffff
cmp eax, 0xffffffff
je 0x10035502
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jns 0x10035541
test esi, 0x10000000
je 0x10035527
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
cmp eax, 0x13d
je 0x10035538
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov esi, eax
jmp 0x10035538
mov eax, esi
and eax, 0x1fff0000
cmp eax, 0x70000
jne 0x10035538
movzx esi, si
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor edi, edi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10083b20
mov esp, ebp
pop ebp
ret 4
push 0x618
lea eax, [ebp - 0x61c]
push 0
push eax
call sub.msvcrt.dll_memset
pop ecx
pop ecx
mov ecx, dword [ebp - 0x624]
lea eax, [ebp - 0x61c]
push eax
mov edx, esi
call fcn.10033748
test eax, eax
je 0x10035589
lea esi, [ebp - 0x61c]
mov ecx, esi
call fcn.10080e5a
test eax, eax
jne 0x100355a2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, eax
test edi, edi
je 0x10035541
test ebx, ebx
je 0x10035541
push 0
push 0x2200000
push 3
push 0
push 7
push 0xc11d0131
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x1003553f
mov dword [ebx], eax
jmp 0x10035541

Function at 0x1003574f
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
xor esi, esi
mov edi, edx
push esi
lea edx, [ebp - 4]
mov dword [ebp - 4], esi
call fcn.10030a2b
push dword [ebp + 0x10]
mov ebx, 0x10000000
push dword [ebp + 0xc]
test dword [ebp - 4], ebx
je 0x10035787
mov edx, dword [ebp + 8]
mov ecx, edi
call fcn.1004bca6
mov esi, eax
jmp 0x100357b5
push dword [ebp + 8]
lea eax, [ebp - 8]
mov dword [ebp - 8], esi
push eax
push edi
mov dword [ebp - 4], esi
call dword [sym.imp.ntdll.dll_NtSetInformationFile]
test eax, eax
jns 0x100357b5
mov esi, eax
or esi, ebx
jge 0x100357b5
push esi
push 0x925
mov ecx, 0x10006df8
call fcn.1003a254
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x100357c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
test byte [edx + 0x10], 0x10
push ebx
push esi
mov ebx, ecx
jne 0x100357d0
mov edx, dword [edx + 0x80]
mov esi, dword [edx + 0x80]
test esi, esi
jne 0x100357de
xor eax, eax
jmp 0x1003582f
push edi
call fcn.1003a43a
mov edi, eax
test edi, edi
jne 0x100357f1
mov eax, 0x80070002
jmp 0x1003582e
mov edx, esi
mov ecx, ebx
call fcn.100357c0
test eax, eax
js 0x1003582e
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10035820
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1003582e
movzx eax, ax
or eax, 0x80070000
jmp 0x1003582e
and eax, 0x400
neg eax
sbb eax, eax
and eax, 0x800702e5
pop edi
pop esi
pop ebx
ret

Function at 0x10035aaa
Capabilities:
Create directory
Delete directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x10086084]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 0x208
lea eax, [ebp - 0x214]
mov edi, edx
push 0
push eax
mov ebx, ecx
call sub.msvcrt.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x214]
mov edx, 0x104
push dword [ebp + 8]
call fcn.10015ac7
mov esi, eax
test esi, esi
js 0x10035b93
mov edx, 0x104
lea ecx, [ebp - 0x214]
call fcn.10036ede
mov esi, eax
test esi, esi
js 0x10035b93
push 0
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x10035b3d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10035b93
movzx esi, si
or esi, 0x80070000
jmp 0x10035b93
lea eax, [ebp - 0x214]
push eax
push ecx
push ecx
mov ecx, ebx
call fcn.100825dc
test eax, eax
je 0x10035b71
push ebx
push ecx
push ecx
mov ecx, edi
call fcn.100825dc
test eax, eax
je 0x10035b71
push edi
push ecx
push ecx
lea ecx, [ebp - 0x214]
call fcn.100825dc
test eax, eax
jne 0x10035b86
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10035b86
movzx esi, si
or esi, 0x80070000
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10083b20
mov esp, ebp
pop ebp
ret 4

Function at 0x10035ba8
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x10086084]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x24]
rep stosd dword es:[edi], eax
push 0x10
lea eax, [ebp - 0x24]
push eax
push 0x10006e30
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x28], eax
pop edi
test eax, eax
je 0x10035c08
cmp eax, 0x10
ja 0x10035c08
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push 0x10004540
push eax
call dword [sym.imp.msvcrt.dll_swscanf_s]
add esp, 0xc
test eax, eax
jle 0x10035c08
cmp dword [ebp - 0x28], 0
je 0x10035c08
xor eax, eax
inc eax
jmp 0x10035c0a
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10083b20
mov esp, ebp
pop ebp
ret
Function at 0x10036069
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x10086084]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push 0x208
lea eax, [ebp - 0x20c]
mov esi, ecx
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
xor eax, eax
mov word [esi], ax
mov ebx, 0x104
lea eax, [ebp - 0x20c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x100360cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10036106
movzx esi, si
or esi, 0x80070000
jmp 0x10036106
push edi
mov edx, 0x100072b8
lea ecx, [ebp - 0x20c]
call fcn.10080125
mov edi, eax
test edi, edi
jne 0x100360e9
mov esi, 0x8007000e
jmp 0x10036105
push edi
mov edx, ebx
mov ecx, esi
call fcn.10015ac7
mov esi, eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.10083b20
mov esp, ebp
pop ebp
ret

Function at 0x1003712b
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov eax, ecx
mov ebx, edx
xor esi, esi
mov dword [ebp - 0x10], ebx
and dword [ebp - 8], esi
xor edi, edi
push eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100371c4
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100371c4
mov ecx, dword [ebp - 0xc]
lea edx, [ebp - 8]
call fcn.100370ec
mov ebx, dword [ebp - 8]
test eax, eax
js 0x10037199
mov ecx, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.100370ec
mov edi, dword [ebp - 4]
test eax, eax
js 0x10037199
push edi
push ebx
call dword [sym.imp.msvcrt.dll__wcsicmp]
mov esi, eax
neg esi
pop ecx
sbb esi, esi
pop ecx
inc esi
jmp 0x1003719c
xor esi, esi
inc esi
test ebx, ebx
je 0x100371b0
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
je 0x100371c4
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10037387
Capabilities:
Clear file content
Delete file

Disassembly:
push 0x18
push 0x10084f60
call fcn.1008405c
mov esi, edx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], ecx
xor edi, edi
test esi, esi
je 0x100373ab
cmp esi, 0xffffffff
je 0x100373ab
mov ebx, dword [ebp + 8]
jmp 0x100373b6
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x100374d4
test ebx, ebx
je 0x100374ae
push 8
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x1c], eax
or edx, 0xffffffff
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x100373de
mov edx, dword [ecx]
cmp edx, 0xfeedf002
jne 0x100374a8
test eax, eax
je 0x100374a8
mov ecx, ebx
call fcn.10036382
mov ecx, dword [ebp - 0x1c]
mov dword [ecx], eax
test eax, eax
je 0x100374ac
test esi, esi
je 0x1003740f
cmp esi, 0xffffffff
jne 0x10037430
push edi
push 0x80
push 3
push edi
push 7
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x100374a3
mov esi, eax
mov dword [ebp - 0x24], eax
push edi
push edi
push edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x100374a3
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x100374a3
mov ecx, dword [ebp - 0x20]
call fcn.10031475
mov ebx, eax
mov dword [ebp - 0x28], ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], edi
mov ecx, dword [ebp - 0x20]
call fcn.10031433
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 4], eax
mov edx, ecx
mov ecx, dword [ebp - 0x20]
call fcn.10031452
mov dword [ebp - 4], 0xfffffffe
call fcn.1003749b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
mov ebx, edi
jmp 0x100374ae
mov edi, dword [ebp - 0x1c]
jmp 0x100374ae
mov edi, eax
jmp 0x100374ae
mov edi, ecx
test esi, esi
je 0x100374be
cmp esi, 0xffffffff
je 0x100374be
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x100374c9
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test edi, edi
je 0x100374d4
mov ecx, edi
call fcn.100374dc
call fcn.100840a1
ret 4
Function at 0x10039af9
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], edi
mov esi, edi
mov ebx, edi
test ecx, 0x20000
jne 0x10039c17
push 0x100866cc
push edi
mov edx, 0x10039aa0
mov ecx, 0x10039a40
call fcn.1004fb8b
mov esi, eax
test esi, esi
jns 0x10039b49
push esi
push 0x60
mov ecx, 0x1000762c
call fcn.1003a254
jmp 0x10039c17
push dword [0x100866d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x10039b83
push 2
call dword [sym.imp.ntdll.dll_RtlImpersonateSelf]
mov ebx, eax
test ebx, ebx
jns 0x10039b7c
mov esi, ebx
or esi, 0x10000000
jge 0x10039c17
push esi
push 0x72
jmp 0x10039bf9
mov dword [ebp - 8], 1
lea eax, [esi + 1]
push eax
push dword [0x100866d0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x10039ba3
call fcn.10039aaf
mov esi, eax
mov dword [ebp - 4], esi
jmp 0x10039ba8
mov esi, edi
mov dword [ebp - 4], edi
test esi, esi
jns 0x10039bbb
push esi
push 0x7b
mov ecx, 0x1000762c
call fcn.1003a254
jmp 0x10039c07
test ebx, ebx
js 0x10039be9
mov esi, dword [ebp - 0xc]
cmp edi, dword [ebp + 8]
jae 0x10039be2
lea eax, [esi + 4]
lea eax, [eax + edi*8]
push eax
push 1
push 1
push dword [esi + edi*8]
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
mov ebx, eax
inc edi
test ebx, ebx
jns 0x10039bc2
mov esi, dword [ebp - 4]
test ebx, ebx
jns 0x10039c03
mov esi, ebx
or esi, 0x10000000
jge 0x10039c17
push esi
push 0x8b
mov ecx, 0x1000762c
call fcn.1003a254
test esi, esi
jns 0x10039c17
cmp dword [ebp - 8], 0
je 0x10039c17
mov ecx, dword [ebp - 0xc]
mov edx, edi
call fcn.10039c22
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x10039c22
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov edi, edi
push ebx
push esi
push edi
push dword [0x100866d0]
mov ebx, edx
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test ebx, ebx
je 0x10039c5b
add edi, 4
cmp byte [edi], 0
jne 0x10039c53
push edi
push 0
push 0
push dword [edi - 4]
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
add edi, 8
sub ebx, 1
jne 0x10039c40
dec esi
push esi
push dword [0x100866d0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x10039c72
call fcn.10039aaf
pop edi
test esi, esi
pop esi
pop ebx
jne 0x10039c7f
jmp dword [sym.imp.ADVAPI32.dll_RevertToSelf]
ret