joyce8/EMBER2024-capa huggingface dataset:
Function at 0x493330
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4c1868
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, dword [esp + 0x40]
push esi
lea ecx, [esp + 0x20]
call fcn.004b56b6
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0xc]
push eax
push ecx
mov dword [esp + 0x40], 0
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
sub eax, esi
sub ecx, edx
mov edx, dword [esp + 0x4c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x44]
push edx
push eax
lea edx, [esp + 0xc]
push ecx
lea eax, [esp + 0x28]
push edx
push eax
call fcn.00493200
add esp, 0x14
lea ecx, [esp + 0x1c]
mov esi, eax
mov dword [esp + 0x38], 0xffffffff
call fcn.004b5728
mov ecx, dword [esp + 0x30]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret

Function at 0x493c90
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 0x1c], ecx
mov eax, 1
test eax, eax
je 0x493d75
mov dword [ebp - 0x18], 0
mov dword [ebp - 0xc], 0
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
mov edx, dword [ebp - 0x18]
and edx, 0xe
test edx, edx
je 0x493ce2
push 0
push 0x405
mov ecx, dword [ebp - 0x1c]
call fcn.00493537
cmp dword [ebp - 0xc], 0
jne 0x493ced
jmp 0x493d75
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x1c]
add eax, 0x40
push eax
lea ecx, [ebp - 0x14]
push ecx
push 1
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x493d59
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x493d57
push 1
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x1c]
add eax, 0x40
push eax
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x493d57
mov eax, dword [ebp - 4]
and eax, 0xff
push eax
push 0x408
mov ecx, dword [ebp - 0x1c]
call fcn.00493537
jmp 0x493d70
mov ecx, dword [ebp - 4]
and ecx, 0xff
push ecx
push 0x408
mov ecx, dword [ebp - 0x1c]
call fcn.00493537
jmp 0x493c99
mov esp, ebp
pop ebp
ret
Function at 0x493d79
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 8], ecx
mov dword [ebp - 4], 0
mov eax, dword [ebp - 8]
mov dword [eax + 0x48], 0
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x4c], 0
push 0xf
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x8c], 1
mov ecx, dword [ebp - 8]
add ecx, 0x78
call fcn.004944b0
test eax, eax
jle 0x493e43
mov edx, dword [ebp - 8]
add edx, 0x40
push edx
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 8]
add ecx, 0x78
call fcn.004944b0
push eax
mov ecx, dword [ebp - 8]
add ecx, 0x78
call fcn.00494480
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x493e43
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x493e36
push 1
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 8]
add ecx, 0x40
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x493e34
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x8c], 0
jmp 0x493e43
mov edx, dword [ebp - 8]
mov dword [edx + 0x8c], 0
mov ecx, dword [ebp - 8]
add ecx, 0x68
call fcn.00494460
mov esp, ebp
pop ebp
ret

Function at 0x494650
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
push esi
mov esi, ecx
call fcn.004ae84f
lea eax, [esp + 4]
mov dword [esi], method.CWnd.virtual_0
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
neg eax
sbb eax, eax
mov dword [esi + 0x44], 0x4d12
inc eax
mov dword [esi + 0x40], 0xffffffff
mov dword [esi + 0x3c], eax
mov eax, esi
pop esi
add esp, 0x190
ret

Function at 0x494800
Capabilities:
Resolve dns

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0x10]
test esi, esi
je 0x494887
cmp byte [esi], 0
je 0x494887
mov ebx, dword [esp + 0xc]
xor eax, eax
mov ecx, ebx
mov edx, dword [esp + 0x14]
push edx
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
call dword [sym.imp.WS2_32.dll_htons]
push esi
mov word [ebx + 2], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x494875
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x494887
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
push edi
lea edi, [ebx + 4]
mov esi, dword [edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ax, word [eax + 8]
pop edi
mov word [ebx], ax
pop esi
mov eax, 1
pop ebx
ret 0xc
mov dword [ebx + 4], eax
mov word [ebx], 2
pop esi
mov eax, 1
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc
Function at 0x494c63
Capabilities:
Connect socket

Disassembly:
sub esp, 0x10
push esi
mov esi, ecx
mov eax, dword [esi]
call dword [eax + 0xbc]
test eax, eax
je 0x494cd2
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push ecx
lea eax, [esp + 8]
push edx
push eax
mov ecx, esi
call fcn.00494800
test eax, eax
je 0x494cd2
mov edx, dword [esi + 0x40]
lea ecx, [esp + 4]
push 0x10
push ecx
push edx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x494ccb
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x40]
push 0x21
push 0x8078
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
cmp eax, 0xffffffff
je 0x494ccb
mov eax, 1
mov dword [esi + 0x48], eax
pop esi
add esp, 0x10
ret 8
mov ecx, esi
call fcn.00494c30
xor eax, eax
pop esi
add esp, 0x10
ret 8

Function at 0x495498
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
sub esp, 0x1b8
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
jne 0x4954e2
lea eax, [esp + 0x38]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
neg eax
sbb eax, eax
inc eax
cmp eax, 1
mov dword [esi + 4], eax
jne 0x4954d0
push str.icmp.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 8], eax
jmp 0x4954d7
mov dword [esi + 8], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x49557a
mov eax, dword [esi + 8]
test eax, eax
je 0x49557a
mov edi, dword [0x4e8078]
push str.IcmpCreateFile
push eax
call edi
mov ecx, dword [esi + 8]
push str.IcmpSendEcho
push ecx
mov ebx, eax
call edi
mov edx, dword [esi + 8]
push str.IcmpCloseHandle
push edx
mov ebp, eax
call edi
test ebx, ebx
mov dword [esp + 0x10], eax
je 0x49557a
test ebp, ebp
je 0x49557a
test eax, eax
je 0x49557a
mov esi, dword [esp + 0x1cc]
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, eax
cmp edi, 0xffffffff
jne 0x49554c
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x49557a
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edi, dword [ecx]
call ebx
mov edx, dword [esp + 0x1d0]
mov esi, eax
push edx
lea eax, [esp + 0x18]
push 0x24
push eax
push 0
push 0
push 0
push edi
push esi
mov dword [esp + 0x3c], 0xffffffff
call ebp
test eax, eax
push esi
jne 0x49558a
call dword [esp + 0x14]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1b8
ret 8
call dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1b8
ret 8
Function at 0x4a7a82
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4f9181
cmp edx, dword [eax]
je 0x4a7aa4
add eax, 8
inc ecx
cmp eax, 0x4f9211
jl 0x4a7a95
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4f9181]
jne 0x4a7bd2
mov eax, dword [0x508729]
cmp eax, 1
je 0x4a7bac
test eax, eax
jne 0x4a7ad5
cmp dword [0x50872d], 1
je 0x4a7bac
cmp edx, 0xfc
je 0x4a7bd2
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4a7b0c
lea eax, [ebp - 0x1a4]
push 0x4d4d24
push eax
call fcn.004a6620
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0049e320
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4a7b4f
lea eax, [ebp - 0x1a4]
push eax
call fcn.0049e320
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4ec089
push edi
call fcn.0049d7e0
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x4d4d08
push eax
call fcn.004a6620
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004a6630
lea eax, [ebp - 0xa0]
push 0x4d4d04
push eax
call fcn.004a6630
push dword [esi + 0x4f9185]
lea eax, [ebp - 0xa0]
push eax
call fcn.004a6630
push 0x12010
lea eax, [ebp - 0xa0]
push 0x4d4cdc
push eax
call fcn.004aa257
add esp, 0x2c
pop edi
jmp 0x4a7bd2
lea eax, [ebp + 8]
lea esi, [esi + 0x4f9185]
push 0
push eax
push dword [esi]
call fcn.0049e320
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret

Function at 0x4af61f
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4af657
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004b22ab
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004b2283
jmp 0x4af663
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4b0d14
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4b0d56
call fcn.004b9132
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4b0d56
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4b0d4d
xor eax, eax
jmp 0x4b0d5e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004b0d64
pop edi
pop esi
pop ebx
ret 4
Function at 0x4b2547
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
mov eax, ebx
push edi
mov edi, ecx
shr eax, 0x10
test ax, ax
mov dword [edi + 0x40], ebx
jne 0x4b2569
cmp dword [edi + 0x3c], 0
jne 0x4b2569
movzx eax, bx
mov dword [edi + 0x3c], eax
call fcn.004b9132
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
mov ecx, edi
push dword [esp + 0x18]
push eax
call fcn.004b2596
pop edi
pop esi
pop ebx
ret 8
Function at 0x4030fa
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
test edi, edi
jne 0x40311a
mov dword [ebp - 8], 0x8000
and dword [ebp - 4], 0
mov ebx, edi
test edi, edi
jne 0x403129
mov ebx, 0x4226a0
mov eax, dword [ebp + 8]
test eax, eax
jl 0x40313e
mov ecx, dword [0x470278]
add ecx, eax
push ecx
call fcn.004032f5
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.004032df
test eax, eax
je 0x403296
test byte [ebp + 0x17], 0x80
je 0x40327f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x41e610
mov dword [ebp - 0xc], eax
call fcn.00406787
and dword [ebp + 0x14], 0x7fffffff
mov eax, dword [ebp + 0x14]
mov dword [ebp + 8], eax
jle 0x4032d5
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x40318e
mov esi, dword [ebp + 0x14]
mov edi, 0x41e6a0
push esi
push edi
call fcn.004032df
test eax, eax
je 0x403296
sub dword [ebp + 0x14], esi
mov dword [0x41e628], edi
mov dword [0x41e62c], esi
mov eax, dword [ebp - 8]
mov ecx, 0x41e610
mov dword [0x41e630], ebx
mov dword [0x41e634], eax
call fcn.004067a7
test eax, eax
mov dword [ebp - 0x10], eax
jl 0x403277
mov esi, dword [0x41e630]
sub esi, ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x4702d4], 1
mov edi, eax
je 0x403236
sub eax, dword [ebp - 0xc]
cmp eax, 0xc8
ja 0x4031fd
cmp dword [ebp + 0x14], 0
jne 0x403236
mov eax, dword [ebp + 8]
push dword [ebp + 8]
sub eax, dword [ebp + 0x14]
push 0x64
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
lea eax, [ebp - 0x90]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x90]
push eax
push 0
call fcn.004052b0
mov dword [ebp - 0xc], edi
test esi, esi
je 0x40326b
cmp dword [ebp + 0x10], 0
jne 0x403253
push esi
push ebx
push dword [ebp + 0xc]
call fcn.00405df0
test eax, eax
je 0x40327b
add dword [ebp - 4], esi
jmp 0x40325f
add dword [ebp - 4], esi
sub dword [ebp - 8], esi
mov ebx, dword [0x41e630]
cmp dword [ebp - 0x10], 1
jne 0x4031b1
jmp 0x4032d5
cmp dword [ebp + 0x14], 0
jg 0x403181
jmp 0x4032d5
push 0xfffffffffffffffc
jmp 0x403298
push 0xfffffffffffffffe
jmp 0x403298
test edi, edi
je 0x4032ca
cmp dword [ebp + 0x14], esi
jge 0x40328b
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.004032df
test eax, eax
jne 0x4032d2
push 0xfffffffffffffffd
pop eax
jmp 0x4032d8
mov esi, dword [ebp - 8]
cmp dword [ebp + 0x14], esi
jge 0x4032a6
mov esi, dword [ebp + 0x14]
mov edi, 0x41e6a0
push esi
push edi
call fcn.004032df
test eax, eax
je 0x403296
push esi
push edi
push dword [ebp + 0xc]
call fcn.00405df0
test eax, eax
je 0x40327b
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x40329b
jmp 0x4032d5
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x40577f
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, 0x4083f0
and byte [ebp - 0x1f], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
and dword [ebp - 0x14], 0
and dword [ebp - 4], 0
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push esi
push eax
mov byte [ebp - 0x20], 1
push dword [ebp + 8]
mov word [ebp - 0x1e], 4
mov dword [ebp - 0x10], 0x4083e0
mov dword [ebp - 0xc], 0xc
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4057d0
xor eax, eax
jmp 0x4057f7
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
jne 0x4057f7
lea eax, [ebp - 0x20]
push eax
push 0x80000007
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x4057cc
call esi
pop esi
leave
ret 4

Function at 0x405831
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x45e6f0], 0x44
push eax
xor eax, eax
push 0x45e6f0
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 0x405870
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x405874
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 0x405912
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00405d19
mov edi, eax
cmp edi, 0xffffffff
je 0x405953
test byte [esp + 0x10], 1
push esi
je 0x405935
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x40593b
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x405944
xor eax, eax
inc eax
jmp 0x405955
test byte [esp + 0x10], 4
jne 0x405953
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x40595a
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.00405c25
test bl, 8
mov dword [ebp - 8], eax
je 0x405999
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x4702a8], eax
jmp 0x405b16
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x4059b3
test eax, eax
je 0x405ac4
test bl, 2
je 0x405ac4
mov esi, 0x4566f0
push edi
push esi
call fcn.0040624c
cmp dword [ebp + 8], 0
je 0x4059d2
push str..
push esi
call sub.KERNEL32.dll_lstrcatW
jmp 0x4059d8
push edi
call fcn.00405b69
cmp word [edi], 0
jne 0x4059e8
cmp word [0x4566f0], 0x5c
jne 0x4059f3
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 0x405ab9
cmp word [ebp - 0x22c], 0x2e
jne 0x405a3d
cmp word [ebp - 0x22a], 0
je 0x405a9c
cmp word [ebp - 0x22a], 0x2e
jne 0x405a3d
cmp word [ebp - 0x228], 0
je 0x405a9c
lea eax, [ebp - 0x22c]
push eax
push ebx
call fcn.0040624c
test byte [ebp - 0x258], 0x10
je 0x405a68
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405a9c
push dword [ebp + 0xc]
push edi
call fcn.0040595a
jmp 0x405a9c
push dword [ebp - 4]
push edi
call fcn.00405912
test eax, eax
jne 0x405a94
cmp dword [ebp - 4], eax
je 0x405a8c
push edi
push 0xfffffffffffffff1
call fcn.004052b0
push 0
push edi
call fcn.00406012
jmp 0x405a9c
inc dword [0x4702a8]
jmp 0x405a9c
push edi
push 0xfffffffffffffff2
call fcn.004052b0
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405a15
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405ac4
and word [ebx - 2], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x405b16
cmp dword [ebp - 8], esi
jne 0x405ad8
inc dword [0x4702a8]
jmp 0x405b16
push edi
call fcn.0040658f
test eax, eax
je 0x405b16
push edi
call fcn.00405b1d
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.00405912
test eax, eax
jne 0x405b0e
cmp dword [ebp - 4], esi
je 0x405ad0
push edi
push 0xfffffffffffffff1
call fcn.004052b0
push esi
push edi
call fcn.00406012
jmp 0x405b16
push edi
push 0xffffffffffffffe5
call fcn.004052b0
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x405c25
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x45a6f0
push esi
call fcn.0040624c
push esi
call fcn.00405bc8
mov edi, eax
test edi, edi
jne 0x405c46
xor eax, eax
jmp 0x405c9e
push edi
call fcn.004064e0
test byte [0x47021c], 0x80
je 0x405c63
mov ax, word [edi]
test ax, ax
je 0x405c42
cmp ax, 0x5c
je 0x405c42
sub edi, esi
sar edi, 1
jmp 0x405c7d
call fcn.0040658f
test eax, eax
je 0x405c77
test byte [eax], 0x10
je 0x405c42
push esi
call fcn.00405b69
push esi
call sub.KERNEL32.dll_lstrlenW
cmp eax, edi
push esi
jg 0x405c69
call fcn.00405b1d
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 0x405d19
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 0x405d38
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 0x405d3e
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 0x405d6d
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 [0x40a558]
dec edi
mov dword [ebp - 8], eax
mov eax, dword [0x40a55c]
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 0x405dbd
test edi, edi
jne 0x405d7a
and word [esi], di
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x405db7
Function at 0x405e98
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 [0x45ed88], 0x55004e
mov dword [0x45ed8c], 0x4c
mov edi, 0x400
mov ebp, 0x45ed88
je 0x405eee
push 1
push 0
push esi
call fcn.00405d3e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x40600d
cmp eax, edi
jg 0x40600d
mov esi, 0x45f588
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x40600d
cmp eax, edi
jg 0x40600d
push esi
push ebp
push str._ls_ls_r_n
push 0x45e988
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x470214]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.0040626e
push 4
push 0xc0000000
push esi
call fcn.00405d3e
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x18], ebp
je 0x40600d
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 0x406006
push edi
push esi
push ebp
call fcn.00405dc1
test eax, eax
je 0x406006
push str._Rename__r_n
push esi
call fcn.00405ca3
test eax, eax
jne 0x405fa4
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x405fd9
add eax, 0xa
push 0x40a560
push eax
call fcn.00405ca3
mov ebp, eax
test ebp, ebp
je 0x405fd5
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x405fc6
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x405fc0
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x18]
jmp 0x405fdb
mov ebp, dword [esp + 0x18]
mov eax, edi
push ebx
add eax, esi
push 0x45e988
push eax
call fcn.00405cf9
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.00405df0
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 0x406012
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 0x406035
push dword [esp + 8]
push dword [esp + 8]
call fcn.00405e98
pop ecx
pop ecx
inc dword [0x4702b0]
ret 8
Function at 0x40611a
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
mov dword [ebp - 4], 0x4000
and eax, 0x100
or eax, 0x20019
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004060b9
mov esi, dword [ebp + 0x14]
test eax, eax
jne 0x40618a
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp + 0xc]
push esi
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp + 0x18]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and word [esi + 0x3ffe], 0
test edi, edi
pop edi
jne 0x40618a
cmp dword [ebp + 0xc], 1
je 0x40618e
cmp dword [ebp + 0xc], 2
je 0x40618e
and word [esi], 0
pop esi
leave
ret 0x14