joyce8/EMBER2024-capa huggingface dataset:
Function at 0x12f82610
Capabilities:
Enumerate files on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x660
test edx, edx
jne 0x12f82639
push 0x57
mov dword [0x131c8d28], 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add esp, 0x660
ret
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0x103
xor eax, eax
lea edi, [esp + 0x25e]
mov word [esp + 0x25c], bp
rep stosd dword es:[edi], eax
push 0x1312b580
push edx
stosw word es:[edi], ax
push 0x130c4e18
lea eax, [esp + 0x268]
push 0x207
push eax
mov dword [0x131c8d28], 0
call fcn.12f5d990
mov ecx, 0x93
xor eax, eax
lea edi, [esp + 0x24]
mov dword [esp + 0x20], ebp
rep stosd dword es:[edi], eax
add esp, 0x14
lea ecx, [esp + 0xc]
lea edx, [esp + 0x25c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x12f8270c
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ebp, 1
cmp word [esp + 0x38], 0x2e
jne 0x12f826f7
mov ax, word [esp + 0x3a]
test ax, ax
je 0x12f826d8
cmp ax, 0x2e
jne 0x12f826f7
cmp word [esp + 0x3c], 0
jne 0x12f826f7
lea eax, [esp + 0xc]
push eax
push esi
call edi
test eax, eax
jne 0x12f826b8
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
mov eax, ebp
pop esi
pop ebp
add esp, 0x660
ret
push esi
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
mov eax, ebp
pop esi
pop ebp
add esp, 0x660
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x131c8d28], eax
je 0x12f82722
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, ebp
pop esi
pop ebp
add esp, 0x660
ret
Function at 0x12f82940
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x210]
test ebx, ebx
jne 0x12f8295c
xor eax, eax
pop ebx
add esp, 0x208
ret
push ebp
push esi
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
push 0x207
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x14]
push ebx
push eax
mov ebp, 1
call fcn.12f5c9d0
lea ecx, [esp + 0x1c]
push 0x5c
push ecx
call fcn.12f5cb20
mov esi, eax
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jbe 0x12f829e0
cmp byte [esp + 0x10], 0x5c
jne 0x12f829e0
cmp byte [esp + 0x11], 0x5c
jne 0x12f829e0
lea edx, [esp + 0x12]
push 0x5c
push edx
call fcn.12f5cb20
add esp, 8
test eax, eax
je 0x12f82a5e
inc eax
push 0x5c
push eax
call fcn.12f5cb20
add esp, 8
mov esi, eax
test esi, esi
je 0x12f82a5e
lea eax, [esp + 0x10]
mov byte [esi], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
mov edi, ebx
and edi, 0x10
jne 0x12f82a22
test bl, 1
je 0x12f82a11
mov ecx, ebx
lea edx, [esp + 0x10]
and ecx, 0xfffffffe
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, eax
test ebp, ebp
je 0x12f82a94
cmp ebx, 0xffffffff
je 0x12f82a2b
test edi, edi
jne 0x12f82a3a
lea ecx, [esp + 0x10]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
test ebp, ebp
je 0x12f82a94
mov byte [esi], 0x5c
inc esi
push 0x5c
push esi
call fcn.12f5cb20
mov esi, eax
add esp, 8
test esi, esi
jne 0x12f829e4
test ebp, ebp
je 0x12f82a94
mov ebx, dword [esp + 0x21c]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x12f82a89
test al, 0x10
jne 0x12f82a94
test al, 1
je 0x12f82a7c
and al, 0xfe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, eax
test ebp, ebp
je 0x12f82a94
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
Function at 0x12f82ab0
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x410
push ebx
mov ebx, dword [esp + 0x418]
test ebx, ebx
jne 0x12f82acc
xor eax, eax
pop ebx
add esp, 0x410
ret
push ebp
push esi
push edi
mov ecx, 0x103
xor eax, eax
lea edi, [esp + 0x12]
mov word [esp + 0x10], 0
push 0x207
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x14]
push ebx
push eax
mov ebp, 1
call fcn.12f5c57b
mov edi, 0x5c
lea ecx, [esp + 0x1c]
push edi
push ecx
call fcn.12f5d099
lea edx, [esp + 0x24]
mov esi, eax
push edx
call fcn.12f5c51d
add esp, 0x18
cmp eax, 2
jbe 0x12f82b51
cmp word [esp + 0x10], di
jne 0x12f82b51
cmp word [esp + 0x12], di
jne 0x12f82b51
lea eax, [esp + 0x14]
push edi
push eax
call fcn.12f5d099
add esp, 8
test eax, eax
je 0x12f82bd9
add eax, 2
push edi
push eax
call fcn.12f5d099
add esp, 8
mov esi, eax
test esi, esi
je 0x12f82bd9
lea ecx, [esp + 0x10]
mov word [esi], 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
mov edi, ebx
and edi, 0x10
jne 0x12f82b99
test bl, 1
je 0x12f82b88
mov edx, ebx
lea eax, [esp + 0x10]
and edx, 0xfffffffe
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebp, eax
test ebp, ebp
je 0x12f82c0f
cmp ebx, 0xffffffff
je 0x12f82ba2
test edi, edi
jne 0x12f82bb1
lea edx, [esp + 0x10]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebp, eax
test ebp, ebp
je 0x12f82c0f
mov word [esi], 0x5c
add esi, 2
push 0x5c
push esi
call fcn.12f5d099
mov esi, eax
add esp, 8
test esi, esi
jne 0x12f82b59
test ebp, ebp
je 0x12f82c0f
mov ebx, dword [esp + 0x424]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x12f82c04
test al, 0x10
jne 0x12f82c0f
test al, 1
je 0x12f82bf7
and al, 0xfe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebp, eax
test ebp, ebp
je 0x12f82c0f
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebp, eax
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x410
ret
Function at 0x12f83000
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x410
push ebx
mov ebx, dword [esp + 0x418]
push ebp
push esi
test ebx, ebx
push edi
jne 0x12f83034
push 0x57
mov dword [0x131c8d28], 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x410
ret
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x12f8305b
test al, 0x10
jne 0x12f831cd
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x12f831cd
mov ecx, 0x103
lea edi, [esp + 0x12]
mov word [esp + 0x10], ax
push 0x207
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x14]
push ebx
push eax
mov ebp, 1
call fcn.12f5c57b
mov edi, 0x5c
lea ecx, [esp + 0x1c]
push edi
push ecx
call fcn.12f5d099
lea edx, [esp + 0x24]
mov esi, eax
push edx
call fcn.12f5c51d
add esp, 0x18
cmp eax, 2
jbe 0x12f830ea
cmp word [esp + 0x10], di
jne 0x12f830ea
cmp word [esp + 0x12], di
jne 0x12f830ea
lea eax, [esp + 0x14]
push edi
push eax
call fcn.12f5d099
add esp, 8
test eax, eax
je 0x12f83172
add eax, 2
push edi
push eax
call fcn.12f5d099
add esp, 8
mov esi, eax
test esi, esi
je 0x12f83172
lea ecx, [esp + 0x10]
mov word [esi], 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
mov edi, ebx
and edi, 0x10
jne 0x12f83132
test bl, 1
je 0x12f83121
mov edx, ebx
lea eax, [esp + 0x10]
and edx, 0xfffffffe
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebp, eax
test ebp, ebp
je 0x12f831aa
cmp ebx, 0xffffffff
je 0x12f8313b
test edi, edi
jne 0x12f8314a
lea edx, [esp + 0x10]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebp, eax
test ebp, ebp
je 0x12f831aa
mov word [esi], 0x5c
add esi, 2
push 0x5c
push esi
call fcn.12f5d099
mov esi, eax
add esp, 8
test esi, esi
jne 0x12f830f2
test ebp, ebp
je 0x12f831aa
mov ebx, dword [esp + 0x424]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x12f8319b
test al, 0x10
jne 0x12f831a6
test al, 1
je 0x12f83190
and al, 0xfe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x12f831aa
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebp, eax
test ebp, ebp
jne 0x12f831cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x131c8d28], eax
je 0x12f831c0
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x410
ret
mov eax, dword [esp + 0x428]
test eax, eax
je 0x12f831e0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x410
ret
Function at 0x12f83300
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x154
push ebx
mov ebx, dword [esp + 0x15c]
push ebp
mov ebp, dword [esp + 0x164]
push esi
mov esi, dword [esp + 0x16c]
mov eax, 0x1f3
push esi
sub eax, ebp
push ebx
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x12f83349
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x154
ret
push edi
mov dword [esp + 0x10], 1
mov eax, dword [esi]
test al, 0x10
mov dword [esp + 0x14], eax
je 0x12f834b1
mov al, byte [esi + 0x2c]
lea edx, [esi + 0x2c]
cmp al, 0x2e
jne 0x12f83384
mov al, byte [esi + 0x2d]
test al, al
je 0x12f834d9
cmp al, 0x2e
jne 0x12f83384
mov al, byte [esi + 0x2e]
test al, al
je 0x12f834d9
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x20]
not ecx
dec ecx
mov dword [esp + 0x1c], ecx
inc ecx
cmp eax, ecx
jb 0x12f834d9
add ebp, ebx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
mov byte [ebp - 1], 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x174]
and ecx, 3
test dl, 0x10
rep movsb byte es:[edi], byte [esi]
je 0x12f833fc
mov eax, dword [esp + 0x17c]
mov ecx, dword [esp + 0x14]
push eax
push ecx
push 0
push ebx
call dword [esp + 0x188]
mov edx, dword [esp + 0x174]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x12f83468
test dl, 0x40
jne 0x12f83468
mov esi, dword [esp + 0x1c]
mov ecx, 0x4f
xor eax, eax
lea edi, [esp + 0x28]
mov dword [esp + 0x24], 0
mov byte [esi + ebp - 1], 0x5c
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x17c]
mov ecx, dword [esp + 0x178]
push eax
mov eax, dword [esp + 0x170]
push ecx
push edx
lea edx, [esp + 0x30]
lea ecx, [esi + eax + 1]
push edx
push ecx
mov byte [esi + ebp], 0x2a
push ebx
mov byte [esi + ebp + 1], 0
call fcn.12f83300
mov edx, dword [esp + 0x18c]
add esp, 0x18
mov dword [esp + 0x10], eax
jmp 0x12f8346c
mov esi, dword [esp + 0x1c]
test dl, 0x20
je 0x12f83499
mov eax, dword [esp + 0x10]
test eax, eax
je 0x12f83499
mov edx, dword [esp + 0x17c]
mov eax, dword [esp + 0x14]
push edx
push eax
push 0
push ebx
mov byte [esi + ebp - 1], 0
call dword [esp + 0x188]
mov dword [esp + 0x10], eax
mov esi, dword [esp + 0x170]
mov byte [ebp - 1], 0x2a
mov byte [ebp], 0
mov ebp, dword [esp + 0x16c]
jmp 0x12f834d9
mov ecx, dword [esp + 0x17c]
lea edx, [esi + 0x2c]
push ecx
push eax
push edx
push ebx
mov byte [ebx + ebp - 2], 0
call dword [esp + 0x188]
mov byte [ebx + ebp - 2], 0x5c
mov dword [esp + 0x10], eax
mov byte [ebx + ebp - 1], 0x2a
mov edi, dword [esp + 0x10]
test edi, edi
je 0x12f834f5
mov eax, dword [esp + 0x18]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x12f83352
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x154
ret
Function at 0x12f83610
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x25c
push ebx
mov ebx, dword [esp + 0x26c]
push ebp
mov ebp, dword [esp + 0x26c]
push esi
mov esi, dword [esp + 0x26c]
mov eax, 0x1f3
push ebx
sub eax, ebp
push esi
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x12f83659
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x25c
ret
push edi
mov edi, 1
mov eax, dword [ebx]
test al, 0x10
mov dword [esp + 0x14], eax
je 0x12f837c9
cmp word [ebx + 0x2c], 0x2e
lea ecx, [ebx + 0x2c]
jne 0x12f83695
mov ax, word [ebx + 0x2e]
test ax, ax
je 0x12f83799
cmp ax, 0x2e
jne 0x12f83695
cmp word [ebx + 0x30], 0
je 0x12f83799
push ecx
call fcn.12f5c51d
mov ecx, dword [esp + 0x1c]
mov ebx, eax
add esp, 4
lea eax, [ebx + 1]
cmp ecx, eax
jb 0x12f83792
mov ecx, dword [esp + 0x278]
mov word [esi + ebp*2 - 2], 0
lea eax, [ecx + 0x2c]
push eax
push esi
call fcn.12f5c935
mov al, byte [esp + 0x284]
add esp, 8
test al, 0x10
je 0x12f836ee
mov edx, dword [esp + 0x284]
mov eax, dword [esp + 0x14]
push edx
push eax
push 0
push esi
call dword [esp + 0x290]
mov edi, eax
test edi, edi
je 0x12f83755
test byte [esp + 0x27c], 0x40
jne 0x12f83755
lea ecx, [ebx + ebp]
lea edi, [esp + 0x20]
mov dword [esp + 0x1c], 0
lea edx, [ebx + ebp + 1]
lea eax, [esi + ecx*2]
mov ecx, 0x93
mov word [eax - 2], 0x5c
mov word [eax], 0x2a
xor eax, eax
mov word [esi + edx*2], 0
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x284]
mov ecx, dword [esp + 0x280]
push eax
mov eax, dword [esp + 0x280]
push ecx
lea ecx, [esp + 0x24]
push eax
push ecx
push edx
push esi
call fcn.12f83610
add esp, 0x18
mov edi, eax
test byte [esp + 0x27c], 0x20
je 0x12f83785
test edi, edi
je 0x12f83785
mov edx, dword [esp + 0x284]
mov eax, dword [esp + 0x14]
push edx
add ebx, ebp
push eax
push 0
push esi
mov word [esi + ebx*2 - 2], 0
call dword [esp + 0x290]
mov edi, eax
mov word [esi + ebp*2 - 2], 0x2a
mov word [esi + ebp*2], 0
mov ebx, dword [esp + 0x278]
test edi, edi
je 0x12f837b1
mov eax, dword [esp + 0x10]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x12f8365f
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret
mov ecx, dword [esp + 0x284]
lea edx, [ebx + 0x2c]
push ecx
push eax
push edx
push esi
mov word [esi + ebp*2 - 4], 0
call dword [esp + 0x290]
mov word [esi + ebp*2 - 4], 0x5c
mov edi, eax
mov word [esi + ebp*2 - 2], 0x2a
jmp 0x12f83799
Function at 0x12f84a10
Capabilities:
Delete directory
Get file attributes
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x12f84a2f
push 0x57
mov dword [0x131c8d28], 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
ret
push 0
push 0x12f84880
push 0x20
push esi
call fcn.12f83510
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov esi, eax
test esi, esi
jne 0x12f84a75
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x131c8d28], eax
je 0x12f84a75
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop esi
ret

Function at 0x12f84ec0
Capabilities:
Delete directory
Get file attributes
Set file attributes

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
test esi, esi
push edi
jne 0x12f84ee5
push 0x57
mov dword [0x131c8d28], 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov bl, byte [esp + 0x18]
mov edx, 0x20
test bl, 3
je 0x12f84ef5
xor edx, edx
test bl, 2
je 0x12f84efd
or edx, 0x40
mov edi, dword [esp + 0x1c]
xor eax, eax
mov ecx, 0x12f84ff0
push edi
push eax
push ecx
push eax
push edx
push esi
call fcn.12f83890
add esp, 0x18
mov ebp, eax
test edi, edi
jne 0x12f84fe5
test bl, 5
jne 0x12f84fe5
push esi
call fcn.12f5c51d
mov ebx, eax
add esp, 4
cmp ebx, 0x104
jb 0x12f84fa4
push 4
push 0x130b9230
push esi
call fcn.12f5e383
add esp, 0xc
test eax, eax
je 0x12f84fa4
lea eax, [ebx + ebx + 0xa]
push eax
call fcn.12f5c05b
mov edi, eax
add esp, 4
test edi, edi
jne 0x12f84f80
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x131c8d28], eax
je 0x12f84f79
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push 4
push 0x130b9230
push edi
call fcn.12f5c57b
push ebx
lea ecx, [edi + 8]
push esi
push ecx
call fcn.12f5c57b
add esp, 0x18
mov word [edi + ebx*2 + 8], 0
mov esi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ebp, eax
test ebp, ebp
jne 0x12f84fd8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x131c8d28], eax
je 0x12f84fd8
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
je 0x12f84fe5
push edi
call fcn.12f5c050
add esp, 4
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
ret
Function at 0x12f88050
Capabilities:
Get file size

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x1306faa8
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov eax, dword [esi + 0x20]
xor edi, edi
xor ebp, ebp
cmp eax, ebx
je 0x12f88082
call fcn.13005df0
mov ebp, eax
mov eax, dword [esi + 0x18]
mov ecx, 0xc0000000
cmp eax, ebx
je 0x12f88093
mov ecx, SysReAllocStringLen
mov eax, dword [esi + 0x24]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
cmp dword [eax - 8], ebx
je 0x12f880e8
push ebx
push 0x80
push 3
push ebp
push 3
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
je 0x12f880ce
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x14], eax
cmp dword [esi + 4], 0xffffffff
je 0x12f88214
cmp dword [esp + 0x18], ebx
jne 0x12f880e8
cmp dword [esp + 0x14], ebx
je 0x12f88214
mov eax, dword [esi + 0x18]
mov edi, 4
cmp eax, ebx
je 0x12f880f9
mov edi, 2
lea ebx, [esi + 0x28]
lea ecx, [esp + 0x10]
push ebx
call fcn.12f41540
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x24], 0
test eax, eax
je 0x12f8813f
mov edx, dword [ebx]
mov eax, dword [edx - 8]
test eax, eax
je 0x12f8813f
call fcn.12f9c600
test eax, eax
je 0x12f8813f
push str.Global_
lea ecx, [esp + 0x14]
call fcn.12f421d0
push ebx
lea ecx, [esp + 0x14]
call fcn.12f42be0
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 8]
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [esi + 4]
push eax
mov eax, dword [esi + 0x10]
push eax
push 0
push edi
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [esi + 8], eax
je 0x12f881ee
mov edx, dword [esi + 0x18]
mov ecx, 6
test edx, edx
je 0x12f8817b
mov ecx, 4
mov edx, dword [esi + 0x10]
push edx
mov edx, dword [esi + 0x14]
push edx
push 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
mov dword [esi + 0xc], eax
je 0x12f881ee
mov eax, dword [esi + 0x10]
mov ebp, 1
test eax, eax
jne 0x12f881c9
mov eax, dword [esi + 4]
or ebx, 0xffffffff
cmp eax, ebx
je 0x12f881cc
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x14]
mov eax, dword [esp + 0x18]
xor edi, edi
sub ecx, edx
sbb eax, edi
test eax, eax
jle 0x12f881c4
mov dword [esi + 0x10], ebx
jmp 0x12f881cc
mov dword [esi + 0x10], ecx
jmp 0x12f881cc
or ebx, 0xffffffff
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], ebx
call fcn.12f41f70
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 0xffffffff
call fcn.12f41f70
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
mov ecx, dword [esp + 0x1c]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0x12f88792
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
lea ebp, [esi + 0x42c]
lea edi, [esi + 0x2c]
mov ecx, 0x100
xor eax, eax
push ebx
mov dword [esi], ebx
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [ebp], ebx
push 0x80
push 3
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x20]
push ebx
lea edi, [esi + 0xc]
push 7
push SysReAllocStringLen
push eax
mov dword [esi + 8], ebx
mov dword [edi], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], 1
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
je 0x12f88822
cmp eax, ebx
je 0x12f88822
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esi + 4]
mov dword [esi + 8], eax
push ebx
push ebp
lea eax, [esi + 0x2c]
push 0x400
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x12f8882a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret 4
Function at 0x12f889d5
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x12f88b27
xor edx, edx
cmp eax, edx
je 0x12f88b27
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x14], edx
lea eax, [ebx + ecx]
cmp eax, ebx
jb 0x12f88a0a
cmp eax, ecx
jb 0x12f88a0a
xor ecx, ecx
jmp 0x12f88a0f
mov ecx, 1
mov edi, dword [esi + 0xc]
mov dword [esp + 0x14], ecx
cmp ecx, edi
jl 0x12f88a29
jg 0x12f88b27
cmp eax, dword [esi + 8]
ja 0x12f88b27
cmp ecx, edx
jne 0x12f88a43
cmp eax, dword [esi + 0x42c]
ja 0x12f88a43
lea eax, [ebx + esi + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8
mov ebp, dword [esi + 0x1c]
cmp ebp, edx
je 0x12f88a88
mov ecx, dword [esi + 0x28]
mov dword [esp + 0x1c], edx
mov edx, dword [esi + 0x24]
lea edi, [edx + ecx]
cmp edi, ecx
jb 0x12f88a63
cmp edi, edx
jb 0x12f88a63
xor edx, edx
jmp 0x12f88a68
mov edx, 1
cmp ecx, ebx
ja 0x12f88a88
cmp dword [esp + 0x14], edx
jg 0x12f88a88
jl 0x12f88a78
cmp eax, edi
ja 0x12f88a88
mov eax, ebp
pop edi
sub eax, ecx
pop esi
add eax, ebx
pop ebp
pop ebx
add esp, 0x10
ret 8
mov eax, dword [esp + 0x28]
mov ecx, esi
push eax
call fcn.12f88b40
test eax, eax
je 0x12f88b27
cmp ebx, 0x7fffffff
push 0
push 0
jbe 0x12f88ad6
mov ecx, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push SysReAllocString
push ecx
call edi
cmp eax, 0xffffffff
je 0x12f88b17
mov eax, dword [esi + 4]
push 1
lea edx, [ebx - 0x7fffffff]
push 0
push edx
push eax
call edi
cmp eax, 0xffffffff
je 0x12f88b17
jmp 0x12f88ae6
mov ecx, dword [esi + 4]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x12f88b17
mov ebp, dword [esp + 0x28]
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 4]
lea edi, [esi + 0x24]
push 0
push edi
push ebp
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12f88b17
cmp dword [edi], ebp
jne 0x12f88b17
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x28], ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8
xor eax, eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8