joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1007597a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x1018bda8]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x100759c0
cmp word [ebx], dx
jne 0x100759c0
or byte [eax + edi + 0x28], 4
jmp 0x100759c5
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x10075b28
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x10075b08
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x10075a06
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x10075a3c
cmp eax, edx
jae 0x10075a4a
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x100759e1
jmp 0x10075b28
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10075b03
cmp dword [ebp - 0x18], 0
je 0x10075b03
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x1018bda8]
test byte [eax + edi + 0x28], 0x48
je 0x10075ad9
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x10075a9d
mov word [esi], cx
jmp 0x10075ad4
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x1018bda8]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x1018bda8]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x1018bda8]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x10075b28
pop eax
cmp word [ebp - 4], ax
jne 0x10075ae9
cmp esi, ebx
jne 0x10075ae9
mov word [esi], ax
jmp 0x10075b25
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10070756
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x10075b28
push 0xd
pop eax
jmp 0x10075ae4
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x1018bda8]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x10075b22
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x10075b28
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x100796eb
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10097674
push 0x1009766c
push str.FlsAlloc
push 0x1f
call fcn.10079556
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1007971f
push dword [ebp + 8]
mov ecx, esi
call dword [0x1008b3b0]
call esi
jmp 0x10079725
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10079769
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10097684
push 0x1009767c
push str.FlsGetValue
push 0x21
call fcn.10079556
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100797a0
push dword [ebp + 8]
mov ecx, esi
call dword [0x1008b3b0]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x100797a8
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1009768c
push 0x10097684
push str.FlsSetValue
push 0x22
call fcn.10079556
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100797e2
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x1008b3b0]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1007d488
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.1007d404
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x1007d5f7
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x1007d5f7
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x1007d5ac
jg 0x1007d4e4
test eax, eax
je 0x1007d5a2
push 1
push 0x1000
call fcn.10079254
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1007d507
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x1007d599
push 0x8000
push ebx
call fcn.1007cf01
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x1007d530
jg 0x1007d52b
cmp ecx, 0x1000
jb 0x1007d530
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.10076a97
add esp, 0x10
cmp eax, 0xffffffff
je 0x1007d575
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x1007d52b
jl 0x1007d55c
test ecx, ecx
jne 0x1007d51d
push dword [ebp - 0xc]
push ebx
call fcn.1007cf01
push esi
call fcn.10077259
add esp, 0xc
xor ebx, ebx
jmp 0x1007d605
cmp byte [edi + 0x24], 0
je 0x1007d58c
cmp dword [edi + 0x20], 5
jne 0x1007d58c
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x1007d597
mov ebx, dword [edi + 0x18]
jmp 0x1007d599
xor ebx, ebx
push esi
call fcn.10077259
pop ecx
jmp 0x1007d605
test ecx, ecx
jg 0x1007d56e
jl 0x1007d5ac
test eax, eax
jae 0x1007d56e
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10070756
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1007d5cc
cmp byte [edi + 0x1c], 0
je 0x1007d56e
jmp 0x1007d5fd
push ebx
call fcn.1007d39a
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1007d56e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x1007d605
cmp byte [edi + 0x1c], 0
je 0x1007d602
mov ebx, dword [edi + 0x18]
jmp 0x1007d605
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10070756
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1007fabe
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x1007fb5b
push ebx
push esi
call fcn.1007fa87
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.1007cd59
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1007fb08
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1007fb5a
push edi
push eax
call fcn.10077293
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1007fb28
call fcn.10077259
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1007fb59
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1007cd59
add esp, 0x20
test eax, eax
jne 0x1007fb47
push edi
call fcn.10077259
jmp 0x1007fb4f
push ebx
call fcn.10077259
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x1007fb5e
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x1007fb6f
pop esi
ret
push ebx
push edi
push esi
call fcn.1007fa87
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.10077293
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x1007fb97
push ebx
push esi
push edi
call fcn.10060af0
add esp, 0xc
push 0
call fcn.10077259
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x1007ff67
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1007fbac

Function at 0x1008214a
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.100776b4
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x100821b9
cmp esi, dword [ebp - 4]
je 0x100821b4
cmp dword [ebp + 0xc], 0
je 0x100821b4
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10082191
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.10081c9c
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x100821bb
xor eax, eax
inc eax
jmp 0x100821bb
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x10082220
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x100b5540]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.100776b4
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.100776b4
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x10082297
cmp word [ecx], dx
je 0x10082297
mov eax, dword [0x1009c1bc]
push edi
dec eax
push eax
push 0x1009c0a8
call fcn.100821bf
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x1008230a
cmp word [eax], dx
je 0x1008230a
mov eax, dword [edi]
test eax, eax
je 0x100822bb
cmp word [eax], dx
je 0x100822bb
lea eax, [ebp - 0x10]
push eax
call fcn.10081ba2
jmp 0x100822c4
lea eax, [ebp - 0x10]
push eax
call fcn.10081c3d
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x10082334
mov eax, dword [0x1009c0a4]
push dword [ebp - 0x14]
dec eax
push eax
push 0x1009bd98
call fcn.100821bf
add esp, 0xc
test al, al
je 0x10082334
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x100822ff
cmp word [eax], di
je 0x100822ff
lea eax, [ebp - 0x10]
push eax
call fcn.10081ba2
pop ecx
jmp 0x10082336
lea eax, [ebp - 0x10]
push eax
call fcn.10081c3d
jmp 0x100822fc
mov eax, dword [edi]
test eax, eax
je 0x10082321
cmp word [eax], dx
je 0x10082321
lea eax, [ebp - 0x10]
push eax
call fcn.10081b57
pop ecx
jmp 0x10082334
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x100823ff
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.10082044
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x100823ff
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x100823ff
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x100823ff
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1008238c
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.100798e8
test ebx, ebx
je 0x100823fa
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.100798e8
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x100823ff
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x100823ff
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.1006ec80
add esp, 0x10
xor eax, eax
inc eax
jmp 0x10082401
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005f68b
leave
ret
Function at 0x10087990
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x100879bd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x100879bd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x403bd0
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
mov eax, dword [0x51b7bc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
cmp dword [ebx], 0
jne 0x403c91
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.004647d0
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x403c7b
push edi
push 0x104
lea edi, [ebx + 4]
push 0
push edi
call fcn.004647d0
add esp, 0xc
lea eax, [ebp - 0x108]
push edi
push 0
push 0x4e7860
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x4e7864
push edi
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x80
push 4
push 0
push 7
push 0xc01200a0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebx], eax
pop edi
cmp dword [ebx], 0
jne 0x403c91
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00458638
mov esp, ebp
pop ebp
ret
push 0x208
lea eax, [ebp - 0x310]
push 0
push eax
call fcn.004647d0
add esp, 0xc
mov dword [ebp - 0x314], 0
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
lea eax, [ebp - 0x310]
push 0x207
push eax
call fcn.00403d60
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.0047fbc0
or ecx, 0xffffffff
add esp, 0x1c
test eax, eax
cmovs eax, ecx
test eax, eax
js 0x403cf1
cmp eax, 0x207
ja 0x403cf1
jne 0x403cf8
mov byte [ebp - 0x109], 0
lea ecx, [ebp - 0x310]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403d01
push 0
lea eax, [ebp - 0x314]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x310]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00458638
mov esp, ebp
pop ebp
ret
Function at 0x4047d0
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2024
call fcn.00458a60
mov eax, dword [0x51b7bc]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
test esi, esi
jne 0x404800
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00458638
mov esp, ebp
pop ebp
ret
push 0x2000
xorps xmm0, xmm0
mov dword [ebp - 0x200c], 0
lea eax, [ebp - 0x2004]
movq qword [ebp - 0x2014], xmm0
push 0
movups xmmword [ebp - 0x2024], xmm0
push eax
mov word [ebp - 0x2008], 0
mov dword [ebp - 0x2020], 3
call fcn.004647d0
push 0x1000
lea eax, [ebp - 0x2004]
push esi
push eax
call fcn.00480f25
lea eax, [ebp - 0x2004]
add esp, 0x18
mov dword [ebp - 0x201c], eax
mov eax, 0x614
mov word [ebp - 0x2014], ax
lea eax, [ebp - 0x2024]
push eax
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov ecx, dword [ebp - 4]
mov eax, 1
xor ecx, ebp
pop esi
call fcn.00458638
mov esp, ebp
pop ebp
ret
Function at 0x404890
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x668
mov eax, dword [0x51b7bc]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x404aa3
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x404aa3
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4048c3
sub ecx, edx
sar ecx, 1
cmp ecx, 3
jbe 0x404aa3
push ebx
push edi
push 0x208
lea eax, [ebp - 0x20c]
mov edi, 1
push 0
push eax
call fcn.004647d0
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.004647d0
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x414]
add esp, 0x18
push esi
push eax
call ebx
push 0x4e791c
lea eax, [ebp - 0x414]
push eax
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404944
test al, 1
je 0x404944
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x668], eax
cmp eax, 0xffffffff
je 0x404a89
lea ecx, [ebp - 0x664]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x404a7d
nop dword [eax]
test byte [ebp - 0x664], 0x10
je 0x4049f8
cmp word [ebp - 0x638], 0x2e
jne 0x4049b7
mov ax, word [ebp - 0x636]
test ax, ax
je 0x404a62
cmp ax, 0x2e
jne 0x4049b7
cmp word [ebp - 0x634], 0
je 0x404a62
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004647d0
add esp, 0xc
lea eax, [ebp - 0x20c]
push esi
push eax
call ebx
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x20c]
push eax
call ebx
lea eax, [ebp - 0x20c]
push eax
call fcn.00404890
add esp, 4
jmp 0x404a60
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004647d0
add esp, 0xc
lea eax, [ebp - 0x20c]
push esi
push eax
call ebx
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x20c]
push eax
call ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404a4f
test al, 1
je 0x404a4f
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
and edi, eax
lea eax, [ebp - 0x664]
push eax
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x404980
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
and eax, edi
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00458638
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.00458638
mov esp, ebp
pop ebp
ret
Function at 0x404ac0
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x404b18
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x404b18
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x404af8
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x404b18
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404b13
test al, 0x10
je 0x404b13
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x404b18
xor eax, eax
pop esi
pop ebp
ret
mov eax, 1
pop esi
pop ebp
ret
Function at 0x405600
Capabilities:
Check if file exists
Delete file
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40562f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.delete__s_failed__error_d
call fcn.00421630
add esp, 0xc
mov eax, 1
pop esi
pop ebp
ret
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405627
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x405655
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x405612
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
xor eax, eax
pop esi
pop ebp
ret
Function at 0x405670
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d9f46
mov eax, dword fs:[0]
push eax
sub esp, 0x880
mov eax, dword [0x51b7bc]
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, dword [ebp + 8]
test ebx, ebx
jne 0x4056ac
xor eax, eax
jmp 0x4058b2
cmp word [ebx], 0
je 0x4056a5
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4056b7
sub ecx, edx
sar ecx, 1
cmp ecx, 0x104
jge 0x4056a5
push 0x410
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.004647d0
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x4e799c
push ebx
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x405712
test al, 1
je 0x405712
and eax, 0xfffffffe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, 0x5c
mov dword [ebp - 0x428], 0
mov word [ebp - 0x42c], ax
mov dword [ebp - 0x424], 0
lea eax, [ebp - 0x420]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x884]
call fcn.00404b20
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x405862
cmp dword [ebp - 0x424], 0
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
je 0x4057c1
mov eax, dword [ebp - 0x884]
shr eax, 4
and eax, 1
je 0x4057c1
cmp word [ebp - 0x858], 0x2e
jne 0x4057c1
mov ax, word [ebp - 0x856]
test ax, ax
je 0x40579c
cmp ax, 0x2e
jne 0x4057c1
cmp word [ebp - 0x854], 0
jne 0x4057c1
mov eax, dword [ebp - 0x428]
test eax, eax
je 0x4058ce
lea ecx, [ebp - 0x884]
push ecx
push eax
call edi
mov edi, eax
mov dword [ebp - 0x424], edi
jmp 0x405854
lea eax, [ebp - 0x888]
push eax
lea ecx, [ebp - 0x884]
call fcn.00404dc0
cmp dword [ebp - 0x424], 0
mov byte [ebp - 4], 1
je 0x4057fc
mov eax, dword [ebp - 0x884]
shr eax, 4
and eax, 1
je 0x4057fc
mov esi, dword [ebp - 0x888]
push esi
call fcn.00405670
jmp 0x405808
mov esi, dword [ebp - 0x888]
push esi
call fcn.00405600
mov eax, dword [ebp - 0x428]
add esp, 4
test eax, eax
jne 0x405819
xor edi, edi
jmp 0x405838
cmp dword [ebp - 0x424], 0
jne 0x405826
xor edi, edi
jmp 0x405838
lea ecx, [ebp - 0x884]
push ecx
push eax
call edi
mov edi, eax
mov dword [ebp - 0x424], edi
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x405854
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
jne 0x405759
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x428]
mov dword [ebp - 0x424], 0
test eax, eax
je 0x405888
cmp eax, 0xffffffff
je 0x405888
push eax
call esi
mov dword [ebp - 0x428], 0
push ebx
call fcn.004047d0
mov eax, dword [ebp - 0x428]
add esp, 4
mov dword [ebp - 0x424], 0
test eax, eax
je 0x4058ad
cmp eax, 0xffffffff
je 0x4058ad
push eax
call esi
mov eax, 1
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.00458638
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp - 0x424], 0
jmp 0x405888