joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1003ecc0
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003fca1
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x10070024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor esi, esi
cmp byte [0x100713f2], 0
je 0x1003edfd
call fcn.1003efe0
test ax, ax
je 0x1003ed18
mov eax, dword [0x100713f4]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x1003ed18
call eax
mov byte [0x100713f1], 1
call fcn.1003efe0
test ax, ax
je 0x1003edfd
mov eax, dword [0x100713f4]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x1003edfd
call eax
cmp byte [0x100713f1], 0
je 0x1003edfd
push 0x48
push dword [0x100713f4]
call fcn.10002a73
xor eax, eax
mov dword [0x100713f4], esi
mov ecx, 0x2710
mov edi, 0x10071400
rep stosd dword es:[edi], eax
mov ecx, dword [0x1007b050]
add esp, 8
test ecx, ecx
je 0x1003eda7
mov edx, dword [0x1007b04c]
test edx, edx
je 0x1003ed9b
mov eax, dword [ecx]
push edx
push ecx
call dword [eax + 0x50]
mov eax, dword [0x1007b04c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [0x1007b050]
mov dword [0x1007b04c], esi
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov dword [0x1007b050], esi
cmp dword [0x100708a0], esi
je 0x1003edda
cmp dword [0x100708a4], 8
mov eax, 0x10070890
cmovae eax, dword [0x10070890]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x1004631c
mov ecx, 0x10070890
call fcn.10001a10
cmp byte [0x100713f0], 0
mov byte [0x100713f2], 0
je 0x1003edfd
push dword [0x100713f8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov byte [0x100713f0], 0
call fcn.1003efe0
test ax, ax
je 0x1003ee73
mov eax, dword [0x100713f4]
mov eax, dword [eax + 8]
test eax, eax
je 0x1003ee73
call eax
cmp byte [0x100713f0], 0
movzx esi, ax
jne 0x1003ee65
lea ecx, [ebp - 0x28]
call fcn.100159c0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.10013b90
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x100713f8], eax
mov byte [0x100713f0], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.100017f0
mov byte [0x100713f1], 0
mov byte [0x100713f2], 1
mov ax, si
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10002a65
mov esp, ebp
pop ebp
ret
Function at 0x40825d
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
xor ebx, ebx
push esi
push edi
cmp dword [esp + 0x10], ebx
je 0x4082ac
push dword [esp + 0x10]
push 0x4081db
call dword [sym.imp.USER32.DLL_EnumWindows]
mov esi, dword [0x413634]
cmp esi, ebx
je 0x408300
mov edi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x4082a4
cmp byte [esi + 0x10], bl
je 0x4082a4
push 3
push ebx
push ebx
push ebx
push ebx
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
mov esi, edi
cmp edi, ebx
jne 0x408281
jmp 0x408300
mov esi, dword [0x413634]
cmp esi, ebx
je 0x408300
push ebp
mov ebp, dword [esi]
lea edi, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi], eax
jne 0x4082f9
cmp byte [esi + 0x11], bl
je 0x4082d6
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_EnableWindow]
cmp byte [esi + 0x10], bl
je 0x4082ec
push 3
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
push edi
push 0x413634
call fcn.0040f08d
pop ecx
pop ecx
mov esi, ebp
cmp ebp, ebx
jne 0x4082b7
pop ebp
pop edi
pop esi
pop ebx
ret 4
Function at 0x408b35
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
or dword [ebp - 4], 0xffffffff
push esi
push edi
mov edi, eax
mov eax, dword [ebp + 0x10]
xor esi, esi
test eax, eax
je 0x408b66
cmp byte [eax], 0
je 0x408b66
push eax
call fcn.0040ffc0
push eax
push edi
mov dword [ebp + 0x10], eax
call fcn.0040911d
pop ecx
pop ecx
mov esi, eax
jmp 0x408b78
cmp dword [edi + 8], esi
je 0x408c68
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 4]
mov esi, dword [ecx + eax*4]
test esi, esi
je 0x408c68
cmp dword [ebp + 0x14], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
je 0x408ba1
push dword [esi]
push 0
push dword [0x4134ac]
call ebx
mov dword [ebp + 8], eax
mov eax, dword [esi]
mov dword [ebp + 0xc], eax
cmp dword [ebp + 8], 0
je 0x408c67
mov eax, dword [ebp + 0xc]
cdq
cmp edx, dword [esi + 4]
jl 0x408c67
jg 0x408bc2
cmp eax, dword [esi]
jb 0x408c67
push 0
push 0
push dword [esi + 0x10]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 8]
cmp eax, dword [esi]
jne 0x408c07
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 4]
jne 0x408c07
push 0
lea eax, [ebp - 8]
push eax
push dword [esi]
push dword [ebp + 8]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 8]
mov eax, ecx
cdq
cmp dword [esi], eax
jne 0x408c67
cmp dword [esi + 4], edx
jne 0x408c67
mov dword [ebp - 4], ecx
jmp 0x408c67
push dword [esi + 8]
push 0
push dword [0x4134ac]
call ebx
mov ebx, eax
test ebx, ebx
je 0x408c67
push 0
lea eax, [ebp - 8]
push eax
push dword [esi + 8]
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 8]
cdq
cmp dword [esi + 8], eax
jne 0x408c58
cmp dword [esi + 0xc], edx
jne 0x408c58
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call fcn.00409281
cdq
add esp, 0xc
cmp eax, dword [esi]
jne 0x408c58
cmp edx, dword [esi + 4]
jne 0x408c58
mov eax, dword [esi]
mov dword [ebp - 4], eax
push ebx
push 0
push dword [0x4134ac]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop ebx
mov eax, dword [ebp + 0x14]
xor edi, edi
cmp eax, edi
je 0x408c9b
cmp dword [ebp - 4], 0xffffffff
jne 0x408c91
cmp dword [ebp + 8], edi
je 0x408c8c
push dword [ebp + 8]
push edi
push dword [0x4134ac]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], edi
jmp 0x408c9b
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ecx
mov ecx, dword [esi]
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
cmp eax, edi
pop edi
pop esi
je 0x408caf
cmp byte [eax], 0
je 0x408caf
push eax
call fcn.00410070
mov eax, dword [ebp - 4]
leave
ret
Function at 0x408d65
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
and dword [ebp - 8], 0
push ebx
push esi
push edi
push dword [ebp + 0x14]
call fcn.0040ffc0
mov esi, dword [ebp + 0x10]
lea ebx, [esi + 0x18]
push ebx
push 0
push dword [0x4134ac]
mov dword [ebp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp + 0x10], edi
test edi, edi
je 0x408e53
push 0
push 5
push ebx
push edi
push esi
push dword [ebp + 0xc]
call fcn.004092e9
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x408dc0
cmp ebx, esi
jge 0x408dc0
mov dword [ebp + 0xc], edi
jmp 0x408dc8
mov eax, dword [ebp + 0xc]
mov ebx, esi
mov dword [ebp + 0xc], eax
push dword [ebp + 0x14]
call sub.MSVCRT.dll_strlen
mov edi, dword [ebp + 8]
mov word [ebp - 0xc], ax
mov eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
cdq
mov dword [ebp - 0x1c], eax
pop ecx
mov dword [ebp - 0x18], edx
mov eax, ebx
cdq
push 0
mov dword [ebp - 0x14], eax
lea eax, [ebp - 4]
push eax
push 0x12
lea eax, [ebp - 0x1c]
push eax
push dword [edi]
mov dword [ebp - 0x10], edx
call esi
cmp dword [ebp - 4], 0x12
jne 0x408e3b
push 0
lea eax, [ebp - 4]
push eax
movsx eax, word [ebp - 0xc]
push eax
push dword [ebp + 0x14]
push dword [edi]
call esi
movsx eax, word [ebp - 0xc]
cmp eax, dword [ebp - 4]
jne 0x408e3b
push 0
lea eax, [ebp - 4]
push eax
push ebx
push dword [ebp + 0xc]
push dword [edi]
call esi
cmp ebx, dword [ebp - 4]
jne 0x408e3b
mov dword [ebp - 8], 1
push edi
call fcn.00408f75
pop ecx
push dword [ebp + 0x10]
push 0
push dword [0x4134ac]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp + 0x14]
call fcn.00410070
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x408fba
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 8], 0x40
cmp dword [esi + 4], ebx
jne 0x409119
push edi
push 0x100
push ebx
push dword [0x4134ac]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push ebx
push ebx
push 4
pop edi
push edi
push dword [esi]
mov dword [esi + 4], eax
mov dword [esi + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp + 8], edi
cmp dword [esi + 0x14], 0x706c7a31
push ebx
lea eax, [ebp - 4]
push eax
jne 0x409049
push 0x18
lea eax, [ebp - 0x34]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], 0x18
jne 0x409118
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
mov ax, word [ebp - 0x24]
mov word [ebp - 0xc], ax
jmp 0x409061
push 0x12
lea eax, [ebp - 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], 0x12
jne 0x409118
mov eax, dword [ebp - 8]
cmp dword [esi + 0xc], eax
jl 0x409087
add eax, 0x40
mov dword [ebp - 8], eax
shl eax, 2
push eax
push dword [esi + 4]
push 8
push dword [0x4134ac]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [esi + 4], eax
movsx eax, word [ebp - 0xc]
add eax, 0x19
push eax
push ebx
push dword [0x4134ac]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov eax, dword [ebp - 0x1c]
mov dword [edi], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 0xc], eax
push ebx
lea eax, [ebp - 4]
push eax
movsx eax, word [ebp - 0xc]
push eax
lea eax, [edi + 0x14]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movsx eax, word [ebp - 0xc]
mov ecx, dword [ebp + 8]
mov byte [eax + edi + 0x14], bl
cmp dword [esi + 0x14], 0x706c7a31
movsx eax, word [ebp - 0xc]
jne 0x4090e9
lea eax, [ecx + eax + 0x18]
jmp 0x4090f0
lea eax, [ecx + eax + 0x12]
mov dword [ebp + 8], eax
mov dword [edi + 0x10], eax
add eax, dword [ebp - 0x14]
mov ecx, dword [esi + 4]
push 1
mov dword [ebp + 8], eax
mov eax, dword [esi + 0xc]
mov dword [ecx + eax*4], edi
inc dword [esi + 0xc]
push ebx
push dword [ebp - 0x14]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x409001
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40ba80
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0xc
push ebx
push esi
push edi
call dword [sym.imp.USER32.DLL_GetFocus]
mov esi, dword [sym.imp.USER32.DLL_GetKeyState]
mov edi, eax
mov bl, pe_nt_image_headers32
test edi, edi
je 0x40bafc
push 9
call esi
test bl, al
je 0x40bafc
push 0x11
call esi
test bl, al
jne 0x40bafc
push 0x10
call esi
test bl, al
jne 0x40bafc
push 0x12
call esi
test bl, al
jne 0x40bafc
push 5
lea eax, [esp + 0x14]
push eax
push edi
call dword [sym.imp.USER32.DLL_GetClassNameA]
push 4
lea eax, [esp + 0x14]
push str.Rich
push eax
call sub.MSVCRT.dll_strncmp
add esp, 0xc
test eax, eax
jne 0x40bafc
push eax
push eax
push 0x44e
push edi
call dword [sym.imp.USER32.DLL_SendMessageA]
test eax, 0x800
jne 0x40bafc
xor eax, eax
jmp 0x40bb7e
push ebp
mov ebp, dword [esp + 0x20]
test ebp, ebp
je 0x40bb25
push 0x11
call esi
test bl, al
jne 0x40bb1d
push 0x10
call esi
test bl, al
jne 0x40bb1d
push 0x12
call esi
test bl, al
je 0x40bb25
push 1
push ebp
call fcn.0040ba39
mov esi, dword [sym.imp.USER32.DLL_GetPropA]
test edi, edi
je 0x40bb3b
push str.PB_Hotkey
push edi
call esi
test eax, eax
jne 0x40bb7b
push str.PB_WindowID
push ebp
call esi
mov esi, eax
test esi, esi
je 0x40bb7b
lea eax, [esp + 0x10]
push eax
push ebp
call dword [sym.imp.USER32.DLL_GetWindowThreadProcessId]
test eax, eax
je 0x40bb7b
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x10], eax
jne 0x40bb7b
dec esi
push esi
push dword [0x413bc0]
call fcn.0040e9ba
test eax, eax
je 0x40bb7b
mov eax, dword [eax + 8]
jmp 0x40bb7d
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret 4

Function at 0x40c9aa
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
cmp dword [ebp + 8], 0
je 0x40ca1a
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_strncpy
lea eax, [ebp - 0x108]
push eax
mov byte [ebp - 4], 0
call sub.MSVCRT.dll_strlen
add esp, 0x10
lea eax, [ebp + eax - 0x108]
jmp 0x40c9fc
mov dl, byte [eax - 1]
cmp dl, 0x20
je 0x40c9fb
cmp dl, 0x5c
je 0x40c9fb
cmp dl, 0x2f
jne 0x40ca06
dec eax
lea ecx, [ebp - 0x108]
cmp eax, ecx
ja 0x40c9e9
mov byte [eax], 0
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x40ca1c
xor eax, eax
leave
ret 4

Function at 0x40caf0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 4], eax
cmp dword [esi + 0x14], eax
jne 0x40cb25
mov ecx, dword [esi + 8]
sub ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push eax
lea eax, [esp + 8]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esi + 8]
mov eax, dword [esp + 4]
mov dword [esi + 0xc], ecx
pop esi
pop ecx
ret 4
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43000c
nop
nop
nop
pop eax
nop
nop
nop
add eax, 0x403daa
sub eax, 0x403d50
nop
nop
nop
nop
nop
mov ebx, dword [eax]
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
cmp ebx, ecx
nop
nop
jl 0x430030
nop
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
jne 0x43001e
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp loc.00401219
Function at 0x403376
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
cmp eax, esi
jl 0x4033a1
mov ecx, dword [0x429ab8]
push esi
add eax, ecx
push esi
push eax
mov dword [0x420ef4], eax
push dword [0x40a01c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
call fcn.0040347e
cmp eax, esi
jl 0x403478
lea eax, [ebp + 8]
push 4
push eax
push dword [0x40a01c]
call fcn.004061f5
test eax, eax
je 0x403468
push dword [ebp + 8]
add dword [0x420ef4], 4
call fcn.0040347e
mov ebx, eax
cmp ebx, esi
jl 0x403476
cmp dword [ebp + 0x10], esi
jne 0x403444
cmp dword [ebp + 8], esi
jle 0x403476
mov esi, 0x414ef0
cmp dword [ebp + 8], 0x4000
mov eax, dword [ebp + 8]
jl 0x403406
mov eax, 0x4000
push eax
push esi
push dword [0x40a01c]
mov dword [ebp - 4], eax
call fcn.004061f5
test eax, eax
je 0x403468
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call fcn.00406224
test eax, eax
je 0x403440
mov eax, dword [ebp - 4]
sub dword [ebp + 8], eax
add dword [0x420ef4], eax
add ebx, eax
cmp dword [ebp + 8], 0
jg 0x4033f5
jmp 0x403476
push 0xfffffffffffffffe
jmp 0x40346a
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x40344f
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 4]
push esi
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x40a01c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40346d
push 0xfffffffffffffffd
pop eax
jmp 0x403478
mov ebx, dword [ebp - 4]
add dword [0x420ef4], ebx
mov eax, ebx
pop esi
pop ebx
leave
ret 0x10
Function at 0x405c65
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x425f50], 0x44
push eax
xor eax, eax
push 0x425f50
push eax
push eax
push 0x4000000
push eax
push eax
push eax
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x405ca4
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x405ca8
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 4]
push eax
and dword [eax + 0x24], 0
mov dword [eax], 0x3c
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
ret 4

Function at 0x405d46
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.0040614d
mov edi, eax
cmp edi, 0xffffffff
je 0x405d87
test byte [esp + 0x10], 1
push esi
je 0x405d69
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x405d6f
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x405d78
xor eax, eax
inc eax
jmp 0x405d89
test byte [esp + 0x10], 4
jne 0x405d87
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x405d8e
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, ebx
and eax, 4
push edi
mov dword [ebp - 4], eax
call fcn.00406059
test bl, 8
mov dword [ebp - 8], eax
je 0x405dcd
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x429ae8], eax
jmp 0x405f4a
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x405de7
test eax, eax
je 0x405ef8
test bl, 2
je 0x405ef8
mov esi, 0x424f50
push edi
push esi
call fcn.00406682
cmp dword [ebp + 8], 0
je 0x405e06
push str..
push esi
call sub.KERNEL32.dll_lstrcatW
jmp 0x405e0c
push edi
call fcn.00405f9d
cmp word [edi], 0
jne 0x405e1c
cmp word [0x424f50], 0x5c
jne 0x405e27
push 0x40a014
push edi
call sub.KERNEL32.dll_lstrcatW
push edi
call sub.KERNEL32.dll_lstrlenW
lea ebx, [edi + eax*2]
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405eed
cmp word [ebp - 0x22c], 0x2e
jne 0x405e71
cmp word [ebp - 0x22a], 0
je 0x405ed0
cmp word [ebp - 0x22a], 0x2e
jne 0x405e71
cmp word [ebp - 0x228], 0
je 0x405ed0
lea eax, [ebp - 0x22c]
push eax
push ebx
call fcn.00406682
test byte [ebp - 0x258], 0x10
je 0x405e9c
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405ed0
push dword [ebp + 0xc]
push edi
call fcn.00405d8e
jmp 0x405ed0
push dword [ebp - 4]
push edi
call fcn.00405d46
test eax, eax
jne 0x405ec8
cmp dword [ebp - 4], eax
je 0x405ec0
push edi
push 0xfffffffffffffff1
call fcn.00405707
push 0
push edi
call fcn.00406442
jmp 0x405ed0
inc dword [0x429ae8]
jmp 0x405ed0
push edi
push 0xfffffffffffffff2
call fcn.00405707
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405e49
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405ef8
and word [ebx - 2], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x405f4a
cmp dword [ebp - 8], esi
jne 0x405f0c
inc dword [0x429ae8]
jmp 0x405f4a
push edi
call fcn.004069df
test eax, eax
je 0x405f4a
push edi
call fcn.00405f51
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.00405d46
test eax, eax
jne 0x405f42
cmp dword [ebp - 4], esi
je 0x405f04
push edi
push 0xfffffffffffffff1
call fcn.00405707
push esi
push edi
call fcn.00406442
jmp 0x405f4a
push edi
push 0xffffffffffffffe5
call fcn.00405707
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x406059
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x425750
push esi
call fcn.00406682
push esi
call fcn.00405ffc
mov edi, eax
test edi, edi
jne 0x40607a
xor eax, eax
jmp 0x4060d2
push edi
call fcn.00406930
test byte [0x429a78], 0x80
je 0x406097
mov ax, word [edi]
test ax, ax
je 0x406076
cmp ax, 0x5c
je 0x406076
sub edi, esi
sar edi, 1
jmp 0x4060b1
call fcn.004069df
test eax, eax
je 0x4060ab
test byte [eax], 0x10
je 0x406076
push esi
call fcn.00405f9d
push esi
call sub.KERNEL32.dll_lstrlenW
cmp eax, edi
push esi
jg 0x40609d
call fcn.00405f51
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x40614d
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40616c
and al, 0xfe
push eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, esi
pop esi
ret 4

Function at 0x406172
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
ret 0xc

Function at 0x4061a1
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
mov eax, dword [0x40a5a8]
dec edi
mov dword [ebp - 8], eax
mov eax, dword [0x40a5ac]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
xor edx, edx
pop ecx
div ecx
push esi
lea eax, [ebp - 8]
push 0
push eax
push dword [ebp + 0xc]
add word [ebp - 4], dx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x4061f1
test edi, edi
jne 0x4061ae
and word [esi], di
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x4061eb
Function at 0x4062c8
Capabilities:
Get file size

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
test esi, esi
mov dword [0x4265e8], 0x55004e
mov dword [0x4265ec], 0x4c
mov edi, 0x400
mov ebp, 0x4265e8
je 0x40631e
push 1
push 0
push esi
call fcn.00406172
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x40643d
cmp eax, edi
jg 0x40643d
mov esi, 0x426de8
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x40643d
cmp eax, edi
jg 0x40643d
push esi
push ebp
push str._ls_ls_r_n
push 0x4261e8
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x429a70]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.004066bf
push 4
push 0xc0000000
push esi
call fcn.00406172
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x18], ebp
je 0x40643d
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x406436
push edi
push esi
push ebp
call fcn.004061f5
test eax, eax
je 0x406436
push str._Rename__r_n
push esi
call fcn.004060d7
test eax, eax
jne 0x4063d4
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x406409
add eax, 0xa
push 0x40a5b0
push eax
call fcn.004060d7
mov ebp, eax
test ebp, ebp
je 0x406405
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x4063f6
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x4063f0
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x18]
jmp 0x40640b
mov ebp, dword [esp + 0x18]
mov eax, edi
push ebx
add eax, esi
push 0x4261e8
push eax
call fcn.0040612d
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add edi, ebx
push edi
push esi
push ebp
call fcn.00406224
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x406442
Capabilities:
Move file

Disassembly:
push 5
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x406465
push dword [esp + 8]
push dword [esp + 8]
call fcn.004062c8
pop ecx
pop ecx
inc dword [0x429af0]
ret 8