joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100ef2b
Capabilities:
Get disk information via ioctl

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
xor edi, edi
xor esi, esi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
cmp dword [ebp + 8], edi
jne 0x100ef53
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x100efd4
lea eax, [ebp - 8]
push eax
call fcn.0100ffe4
push edi
push 0x80
push 3
push edi
push 3
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x100efc9
push ebx
push eax
call fcn.0100eaed
mov esi, eax
cmp esi, edi
je 0x100efda
xor ebx, ebx
inc ebx
cmp dword [ebp + 0x10], edi
jne 0x100efa2
cmp dword [esi], ebx
je 0x100efa2
push dword [ebp + 8]
call fcn.0100ebae
test eax, eax
je 0x100efa5
mov dword [ebp - 4], ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
cmp dword [ebp - 4], edi
jne 0x100efc9
cmp esi, edi
je 0x100efc9
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
push edi
push dword [ebp - 8]
call fcn.01010080
mov eax, esi
pop edi
pop esi
leave
ret 0xc
push 0x38
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, edi
je 0x100efa5
push edi
lea eax, [ebp + 0x10]
push eax
push 0xc
lea eax, [ebp - 0x14]
push eax
push edi
push edi
push 0x2d1080
push dword [ebp + 8]
xor ebx, ebx
inc ebx
mov dword [ebp + 0x10], edi
mov dword [esi], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x100efa5
mov eax, dword [ebp - 0x10]
mov dword [esi + 8], eax
cmp dword [ebp + 0xc], edi
je 0x100efa2
cmp dword [ebp - 0xc], edi
jbe 0x100efa5
push edi
push eax
call fcn.0100ee53
cmp eax, edi
je 0x100efa5
xor edx, edx
cmp dword [eax + 4], edi
jbe 0x100f080
lea ecx, [eax + 0x38]
cmp dword [ebp - 4], edi
jne 0x100f080
mov ebx, dword [ebp - 0xc]
cmp ebx, dword [ecx + 0x10]
jne 0x100f074
mov ebx, dword [ecx]
mov dword [esi + 0x10], ebx
mov ebx, dword [ecx + 4]
mov dword [esi + 0x14], ebx
mov ebx, dword [ecx + 8]
mov dword [esi + 0x18], ebx
mov ebx, dword [ecx + 0xc]
mov dword [ebp - 4], 1
mov dword [esi + 0x1c], ebx
inc edx
add ecx, 0x90
cmp edx, dword [eax + 4]
jb 0x100f049
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x100efa5
Function at 0x100f735
Capabilities:
Create directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x101908c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
cmp esi, ebx
je 0x100f8c9
xor eax, eax
cmp ax, word [esi]
je 0x100f8c9
lea eax, [ebp - 0x14]
push eax
push esi
call fcn.0100f533
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x100f8b2
push edi
lea ecx, [ebp - 0xc]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
push eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x1c], ebx
call fcn.0100f515
cmp eax, ebx
jl 0x100f846
cmp dword [ebp - 0x1c], 1
jne 0x100f811
mov eax, dword [ebp - 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x100f7ab
mov ecx, dword [ebp - 0x14]
sub eax, edx
sar eax, 1
lea esi, [ecx + eax*2]
cmp dword [ebp - 0xc], ebx
je 0x100f7d5
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x5c
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
mov esi, eax
pop ecx
push dword [ebp - 8]
cmp esi, ebx
je 0x100f886
xor eax, eax
mov word [esi], ax
call fcn.0100fb35
test eax, eax
jne 0x100f807
push ebx
push dword [ebp - 8]
call edi
push 0x5c
pop eax
mov word [esi], ax
inc esi
inc esi
jmp 0x100f7db
mov esi, dword [ebp - 0x14]
movzx eax, word [esi]
cmp ax, 0x61
jb 0x100f823
cmp ax, 0x7a
jbe 0x100f82f
cmp ax, 0x41
jb 0x100f7d5
cmp ax, 0x5a
ja 0x100f7d5
push 0x3a
pop eax
cmp ax, word [esi + 2]
jne 0x100f7d5
push 0x5c
pop eax
cmp ax, word [esi + 4]
jne 0x100f7d5
add esi, 8
jmp 0x100f7d5
movzx eax, ax
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x10044b0
push 0x3000000
push 0x1019504
mov dword [ebp - 0x10], eax
call fcn.0100dc59
add esp, 0x14
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
jmp 0x100f8bb
call fcn.0100fb35
xor esi, esi
inc esi
cmp eax, esi
je 0x100f8ad
push ebx
push dword [ebp - 8]
call edi
cmp eax, esi
je 0x100f8ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x20]
push 0x1004450
jmp 0x100f85d
mov dword [ebp - 0x18], esi
jmp 0x100f872
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x18]
jmp 0x100f8d3
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0100d691
leave
ret 4
Function at 0x100f948
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push edi
xor edi, edi
push edi
push dword [ebp + 8]
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
call fcn.0100f533
mov ebx, eax
cmp ebx, edi
je 0x100fa29
push esi
push 0x2000
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x100f9f5
mov eax, dword [ebp + 0xc]
and al, 1
movsx eax, al
push edi
push 0x2200000
neg eax
push 3
sbb eax, eax
push edi
and eax, 0xfffffff9
add eax, 7
push eax
push 0x10000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x100f9e4
push 0xd
push 1
lea eax, [ebp + 0xb]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
mov byte [ebp + 0xb], 1
call dword [sym.imp.ntdll.dll_NtSetInformationFile]
cmp eax, edi
jge 0x100f9d4
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov dword [ebp - 4], eax
jmp 0x100f9db
mov dword [ebp - 8], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100fa19
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
push 0x1004760
jmp 0x100fa04
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
push 0x10046d8
push 0x3000000
push 0x1019504
mov dword [ebp - 4], eax
call fcn.0100dc59
add esp, 0x14
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 8]
pop edi
pop ebx
leave
ret 8

Function at 0x100fa40
Capabilities:
Delete directory
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
cmp esi, edi
je 0x100fb20
xor eax, eax
cmp ax, word [esi]
je 0x100fb20
push ebx
push edi
push esi
call fcn.0100f533
mov dword [ebp + 8], eax
cmp eax, edi
je 0x100fad7
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, 0x3000000
mov edi, 0x1019504
test eax, eax
jne 0x100faae
call esi
push eax
push dword [ebp + 8]
mov dword [ebp - 4], eax
push 0x10048b8
push ebx
push edi
call fcn.0100dc59
add esp, 0x14
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov dword [ebp - 8], eax
test eax, eax
jne 0x100faf9
cmp dword [ebp - 4], eax
jne 0x100fac8
call esi
mov dword [ebp - 4], eax
call esi
push eax
push dword [ebp + 8]
push 0x1004838
push ebx
push edi
jmp 0x100faf1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x10047c0
push 0x3000000
mov dword [ebp - 4], eax
push 0x1019504
call fcn.0100dc59
add esp, 0x14
cmp dword [ebp + 8], 0
pop ebx
je 0x100fb12
push dword [ebp + 8]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 8]
jmp 0x100fb2a
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
leave
ret 4
Function at 0x100fb35
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
xor ebx, ebx
cmp eax, esi
je 0x100fba6
xor ecx, ecx
cmp cx, word [eax]
je 0x100fba6
push edi
push esi
push eax
call fcn.0100f533
mov edi, eax
cmp edi, esi
je 0x100fba1
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100fb6f
test al, 0x10
je 0x100fb6f
inc ebx
jmp 0x100fb8a
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x100fb82
mov esi, 0x10b
cmp esi, 2
jne 0x100fb8a
push 3
pop esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
pop edi
jmp 0x100fbb0
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
pop ebx
pop ebp
ret 4

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
je 0x100fc19
xor ecx, ecx
cmp cx, word [eax]
je 0x100fc19
push esi
push ebx
push eax
call fcn.0100f533
mov esi, eax
cmp esi, ebx
je 0x100fc14
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100fbf3
test eax, 0x400
je 0x100fbf3
inc ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, ebx
pop esi
jmp 0x100fc23
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebx
pop ebp
ret 4

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push edi
xor edi, edi
xor ebx, ebx
cmp eax, edi
je 0x100fdad
xor ecx, ecx
cmp cx, word [eax]
je 0x100fdad
push esi
push edi
push eax
call fcn.0100f533
mov esi, eax
test esi, esi
je 0x100fd99
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100fd7f
test al, 0x10
je 0x100fd7a
push 2
pop edi
jmp 0x100fd87
xor ebx, ebx
inc ebx
jmp 0x100fd87
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x100fda1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
pop esi
jmp 0x100fdb7
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop ebx
pop ebp
ret 4
Function at 0x100ff15
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0xc
push esi
xor esi, esi
cmp eax, esi
jne 0x100ff31
mov eax, 0x80070057
jmp 0x100ffda
push ebx
push edi
push esi
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 4], eax
lea eax, [ebp - 0xc]
push eax
push 0x100fee8
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp + 8], eax
cmp eax, esi
je 0x100ffa5
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x100ff69
mov esi, dword [ebp - 0xc]
jmp 0x100ff9a
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov edi, 0xffff
mov esi, 0x80070000
test eax, eax
jle 0x100ff85
and eax, edi
or eax, esi
test eax, eax
jge 0x100ff95
call ebx
test eax, eax
jle 0x100ff91
and eax, edi
or eax, esi
mov esi, eax
jmp 0x100ff9a
mov esi, 0x80004005
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100ffd6
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov edi, 0xffff
mov esi, 0x80070000
test eax, eax
jle 0x100ffc1
and eax, edi
or eax, esi
test eax, eax
jge 0x100ffd1
call ebx
test eax, eax
jle 0x100ffcd
and eax, edi
or eax, esi
mov esi, eax
jmp 0x100ffd6
mov esi, 0x80004005
pop edi
mov eax, esi
pop ebx
pop esi
leave
ret 8
Function at 0x1010836
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x101908c]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
xor eax, eax
lea edi, [ebp - 0x21c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 1
lea eax, [ebp - 0x220]
push eax
push 0x1010276
push 0x1010779
xor edi, edi
push ebx
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x218], esi
mov dword [ebp - 0x210], edx
mov dword [ebp - 0x214], ecx
call fcn.010103d6
push esi
push ebx
mov dword [ebp - 0x224], eax
call fcn.0101023c
test eax, eax
jne 0x10108bc
inc dword [ebp - 0x21c]
cmp dword [ebp - 0x220], edi
jne 0x10108bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x220], eax
cmp dword [ebp - 0x21c], edi
jbe 0x1010969
push 0x204
lea eax, [ebp - 0x208]
push edi
push eax
mov dword [ebp - 0x20c], edi
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x1010900
mov word [ebp - 0x20c], ax
xor eax, eax
lea ecx, [ebp - 0x20c]
cmp ax, word [ebp - 0x20c]
jne 0x1010916
mov ecx, 0x10050f0
cmp dword [ebp - 0x21c], 1
mov eax, 0x10050ec
jne 0x1010929
mov eax, 0x1003e6c
push ecx
push dword [ebp - 0x220]
push ebx
push eax
push dword [ebp - 0x21c]
push 0x1005028
push 0x4000000
push 0x1019504
call fcn.0100dc59
add esp, 0x20
cmp dword [ebp - 0x220], edi
je 0x1010963
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x224], edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x224]
xor ecx, ebp
pop edi
call fcn.0100d691
leave
ret

Function at 0x1010cd7
Capabilities:
Connect network resource

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, dword [ebp + 8]
push edi
xor edi, edi
cmp ebx, edi
je 0x1010da3
cmp dword [ebp + 0xc], edi
je 0x1010da3
cmp dword [ebp + 0x10], edi
je 0x1010da3
cmp dword [ebp + 0x14], edi
je 0x1010da3
push esi
push ebx
call fcn.01010c1a
mov esi, eax
cmp esi, edi
jl 0x1010d9e
push 8
xor eax, eax
pop ecx
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
xor ecx, ecx
cmp cx, word [eax]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], edi
mov ecx, 0x1003e6c
je 0x1010d46
mov ecx, 0x1001df4
push dword [ebp + 0x10]
push ecx
push eax
lea eax, [ebp + 0xc]
push 0x1004028
push eax
call fcn.0100e8f9
mov esi, eax
add esp, 0x14
cmp esi, edi
jl 0x1010d9e
push edi
push dword [ebp + 0xc]
lea eax, [ebp - 0x20]
push dword [ebp + 0x14]
push eax
call sub.MPR.dll_WNetAddConnection2W
cmp eax, edi
jne 0x1010d7a
xor esi, esi
jmp 0x1010d88
jle 0x1010d86
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
cmp dword [ebp + 0xc], edi
je 0x1010d9e
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
pop esi
jmp 0x1010da8
mov eax, 0x80070057
pop edi
pop ebx
leave
ret 0x10
Function at 0x4015fe
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
test esi, esi
je 0x401628
movzx ecx, byte [edi]
movzx eax, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x434f00]
inc edi
sub esi, 1
jne 0x401610
pop edi
mov eax, edx
pop esi
ret 0xc

Function at 0x401ee0
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x1050
call fcn.00415490
push ebx
mov ebx, dword [esp + 0x105c]
push ebp
push edi
mov edi, ecx
and dword [edi + 0x1034], 0
cmp byte [edi + 0x30], 0
jne 0x401f0c
test bl, 4
jne 0x401f0c
xor al, al
jmp 0x401f0e
mov al, 1
push esi
mov esi, ebx
shr esi, 1
not esi
and esi, 1
inc esi
shl esi, 0x1e
test bl, 1
je 0x401f27
or esi, 0x40000000
shr ebx, 3
not ebx
and ebx, 1
test al, al
je 0x401f36
or ebx, 2
lea ecx, [esp + 0x18]
call fcn.00401b85
cmp byte [edi + 0x24], 0
je 0x401f4b
or esi, 0x100
push 0
push 0x8000000
push 3
push 0
push ebx
push esi
push dword [esp + 0x107c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x401fbb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x18]
push 0x800
push eax
push dword [esp + 0x106c]
call fcn.004035e5
test al, al
je 0x401fc8
push 0
push 0x8000000
push 3
push 0
push ebx
push esi
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x401fc3
mov dword [esp + 0x10], eax
jmp 0x401fc3
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
cmp ebp, 0xffffffff
jne 0x401fd9
cmp dword [esp + 0x10], 2
jne 0x401fd9
mov dword [edi + 0x1034], 1
cmp byte [edi + 0x24], 0
pop esi
je 0x401fff
cmp ebp, 0xffffffff
je 0x401fff
or dword [esp + 0xc], 0xffffffff
lea eax, [esp + 0xc]
or dword [esp + 0x10], 0xffffffff
push 0
push eax
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
xor eax, eax
cmp ebp, 0xffffffff
mov byte [edi + 0x1c], al
mov dword [edi + 0x10], eax
setne bl
mov byte [edi + 0x15], al
je 0x40202e
push 0x800
push dword [esp + 0x1064]
lea ecx, [edi + 0x32]
mov dword [edi + 8], ebp
push ecx
call fcn.0040694c
mov byte [edi + 0x25], 0
pop edi
pop ebp
mov al, bl
pop ebx
add esp, 0x1050
ret 8
Function at 0x40251a
Capabilities:
Write file on windows

Disassembly:
push ecx
push ecx
push ebp
push esi
mov esi, dword [esp + 0x18]
mov ebp, ecx
test esi, esi
jne 0x40252f
mov al, 1
jmp 0x40264a
cmp dword [ebp + 0x10], 1
lea ecx, [ebp + 8]
mov dword [esp + 0xc], ecx
jne 0x40254b
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ecx, [ebp + 8]
mov dword [ecx], eax
jmp 0x40254f
mov dword [esp + 0xc], ecx
push ebx
push edi
and dword [esp + 0x10], 0
xor bl, bl
cmp dword [ebp + 0x10], 0
je 0x4025a3
xor edi, edi
test esi, esi
je 0x4025c4
mov eax, esi
sub eax, edi
cmp eax, 0x4000
jb 0x402574
mov eax, 0x4000
push 0
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [esp + 0x28]
add eax, edi
push eax
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
sete bl
jne 0x4025c0
mov ecx, dword [esp + 0x14]
add edi, 0x4000
cmp edi, esi
jb 0x402564
jmp 0x4025c0
push 0
lea eax, [esp + 0x14]
push eax
push esi
push dword [esp + 0x28]
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ebx, [eax - 1]
neg ebx
sbb bl, bl
inc bl
test bl, bl
jne 0x402642
cmp byte [ebp + 0x1e], 0
je 0x402642
cmp dword [ebp + 0x10], 0
jne 0x402642
push 0
lea edi, [ebp + 0x32]
mov ecx, 0x45ad9c
push edi
call fcn.004017d2
test al, al
je 0x402635
mov ecx, dword [esp + 0x14]
cmp dword [esp + 0x10], esi
jae 0x402551
cmp dword [esp + 0x10], 0
jbe 0x402551
mov edi, dword [ebp]
push 0
mov esi, dword [edi + 0x14]
mov ecx, esi
call dword [0x42922c]
mov ecx, ebp
call esi
sub eax, dword [esp + 0x14]
mov ecx, dword [edi + 0x10]
sbb edx, 0
push edx
push eax
call dword [0x42922c]
mov ecx, ebp
call dword [edi + 0x10]
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
jmp 0x402551
push edi
push 0
mov ecx, 0x45ad9c
call fcn.00401ac9
pop edi
mov al, bl
mov byte [ebp + 0xc], 1
pop ebx
pop esi
pop ebp
pop ecx
pop ecx
ret 8

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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.00415490
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4027d7
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.004035e5
test al, al
je 0x4027d7
lea eax, [ebp - 0x1000]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
mov eax, esi
pop esi
leave
ret 4
Function at 0x402810
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.00415490
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.004038fd
movzx eax, word [eax]
cmp eax, 0x2e
je 0x402841
cmp eax, 0x20
je 0x402841
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x402874
push esi
call fcn.00402780
test al, al
jne 0x402887
push 0x800
lea eax, [ebp - 0x1000]
push eax
push esi
call fcn.004035e5
test al, al
je 0x402887
push 0
lea eax, [ebp - 0x1000]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x402887
cmp byte [ebp + 0xc], 0
je 0x402883
push dword [ebp + 0x10]
push esi
call fcn.00402a4b
xor eax, eax
jmp 0x40289f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
push 2
pop eax
cmp ecx, eax
je 0x40289f
xor eax, eax
cmp ecx, 3
sete al
inc eax
pop esi
leave
ret 0xc

Function at 0x402a4b
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.00415490
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne bl
test eax, eax
jne 0x402a9b
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.004035e5
test al, al
je 0x402a9b
push dword [ebp + 0xc]
lea eax, [ebp - 0x1000]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne bl
mov al, bl
pop ebx
leave
ret 8
Function at 0x402c15
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1250
call fcn.00415490
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x250]
push edi
or edi, 0xffffffff
mov ebx, 0x800
push eax
cmp esi, edi
jne 0x402ca1
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, edi
jne 0x402cbc
push ebx
lea eax, [ebp - 0x1250]
push eax
push dword [ebp + 0xc]
call fcn.004035e5
test al, al
je 0x402c78
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x1250]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, edi
jne 0x402cbc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x402c91
cmp eax, 3
je 0x402c91
cmp eax, 0x12
je 0x402c91
mov al, 1
jmp 0x402c93
xor al, al
mov edi, dword [ebp + 0x10]
mov byte [edi + 0x1044], al
jmp 0x402d7e
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x402cbc
mov esi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
setne al
jmp 0x402c93
mov edi, dword [ebp + 0x10]
push ebx
push dword [ebp + 0xc]
push edi
call fcn.0040694c
push ebx
lea eax, [ebp - 0x224]
push eax
push edi
call fcn.004039d4
mov ecx, dword [ebp - 0x234]
xor eax, eax
add eax, dword [ebp - 0x230]
mov dword [edi + 0x1000], eax
mov eax, dword [ebp - 0x250]
adc ecx, 0
mov dword [edi + 0x1008], eax
mov eax, dword [ebp - 0x24c]
mov dword [edi + 0x1004], ecx
mov ecx, dword [ebp - 0x248]
mov dword [edi + 0x1028], eax
mov eax, dword [ebp - 0x244]
mov dword [edi + 0x102c], ecx
mov ecx, dword [ebp - 0x240]
mov dword [edi + 0x1030], eax
mov eax, dword [ebp - 0x23c]
mov dword [edi + 0x1034], ecx
mov ecx, dword [ebp - 0x238]
mov dword [edi + 0x1038], eax
lea eax, [ebp - 0x23c]
mov dword [edi + 0x103c], ecx
lea ecx, [edi + 0x1010]
push eax
call fcn.0040739d
lea eax, [ebp - 0x24c]
push eax
lea ecx, [edi + 0x1018]
call fcn.0040739d
lea eax, [ebp - 0x244]
push eax
lea ecx, [edi + 0x1020]
call fcn.0040739d
and dword [edi + 0x1040], 0
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0xc