joyce8/EMBER2024-capa huggingface dataset:
Function at 0x462cf2
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x462d2a
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.00460da9
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00460d81
jmp 0x462d36
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4643e7
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 0x464429
call fcn.00469f57
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x464429
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x464420
xor eax, eax
jmp 0x464431
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00464437
pop edi
pop esi
pop ebx
ret 4

Function at 0x46a487
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x46a4b5
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x46a4d3
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0046a3ed
jmp 0x46a4d3
mov eax, dword [esi + 0x14]
test eax, eax
je 0x46a4d3
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0046a3ed
test edi, edi
mov eax, edi
jne 0x46a4bd
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x405400
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
movzx eax, word [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
push 2
push eax
push ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x40549d
mov cx, word [eax + 0xe]
cmp cx, 8
ja 0x40549d
push 1
pop esi
shl esi, cl
movzx edi, si
lea eax, [edi*4 + 8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [ebp + 8]
mov ebx, eax
mov eax, dword [ecx]
add eax, ecx
test ebx, ebx
je 0x40549d
test si, si
mov word [ebx], 0x300
mov word [ebx + 2], si
jbe 0x40548c
lea ecx, [ebx + 5]
mov dl, byte [eax + 2]
mov byte [ecx - 1], dl
mov dl, byte [eax + 1]
mov byte [ecx], dl
mov dl, byte [eax]
mov byte [ecx + 1], dl
and byte [ecx + 2], 0
add ecx, 4
add eax, 4
dec edi
jne 0x40546f
push ebx
call dword [sym.imp.GDI32.dll_CreatePalette]
push ebx
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40550c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push 2
push 0x76
push dword [0x4160d8]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x4055b0
push eax
push dword [0x4160d8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4055b0
push ebx
push edi
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_GetDC]
push 1
mov cl, byte [esi + 0xe]
pop edi
mov ebx, eax
push 0
push dword [0x4161f8]
shl edi, cl
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
call dword [sym.imp.GDI32.dll_RealizePalette]
mov ecx, dword [esi]
push 0
movzx eax, di
push esi
lea eax, [ecx + eax*4]
add eax, esi
push eax
push 4
push esi
push ebx
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
push eax
push 0
push 0x172
push 0x85
push dword [esp + 0x20]
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push ebx
mov esi, eax
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_ReleaseDC]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
pop edi
pop ebx
pop esi
ret

Function at 0x405654
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
mov ecx, eax
dec eax
test ecx, ecx
je 0x40568e
mov ecx, dword [ebp + 8]
push esi
lea edx, [eax + 1]
mov eax, dword [ebp + 0x10]
movzx esi, byte [ecx]
and eax, 0xff
xor eax, esi
mov esi, dword [0x41630c]
inc ecx
mov eax, dword [esi + eax*4]
mov esi, dword [ebp + 0x10]
shr esi, 8
xor esi, eax
dec edx
mov dword [ebp + 0x10], esi
jne 0x405668
pop esi
mov eax, dword [ebp + 0x10]
pop ebp
ret
Function at 0x405693
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
or dword [ebp - 0xc], 0xffffffff
cmp dword [ebp + 8], 0xffffffff
je 0x405711
push ebx
push esi
mov esi, 0x8000
push edi
xor ebx, ebx
push esi
mov dword [ebp - 4], ebx
call fcn.004081bf
pop ecx
mov dword [ebp - 8], eax
push ebx
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 4]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
push eax
push esi
push dword [ebp - 8]
push dword [ebp + 8]
call edi
test eax, eax
je 0x405705
cmp dword [ebp - 4], ebx
je 0x405705
push dword [ebp - 0xc]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00405654
add esp, 0xc
mov dword [ebp - 0xc], eax
lea eax, [ebp - 4]
push ebx
push eax
push esi
push dword [ebp - 8]
push dword [ebp + 8]
jmp 0x4056d8
push dword [ebp - 8]
call fcn.004081cd
pop ecx
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
not eax
leave
ret

Function at 0x405978
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
mov byte [ebp - 4], 0x13
mov byte [ebp - 3], 0x35
mov byte [ebp - 2], 0x86
mov byte [ebp - 1], 7
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
push ebx
call fcn.004081bf
mov esi, eax
pop ecx
test esi, esi
je 0x4059c6
xor edx, edx
test ebx, ebx
jbe 0x4059c6
sub edi, esi
mov eax, edx
lea ecx, [edx + esi]
and eax, 3
mov al, byte [ebp + eax - 4]
xor al, byte [edi + ecx]
inc edx
cmp edx, ebx
mov byte [ecx], al
jb 0x4059b0
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4059cd
Capabilities:
Get file size

Disassembly:
push esi
xor esi, esi
push edi
push esi
push 0x80
push 3
push esi
push 1
push 0xc0000000
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x405a4f
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
push esi
push esi
push 4
push esi
push edi
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebx, eax
cmp ebx, esi
je 0x405a47
push ebp
push esi
push esi
push esi
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
cmp ebp, esi
je 0x405a3f
push dword [esp + 0x18]
push dword [esp + 0x18]
push ebp
call fcn.00405a54
add esp, 0xc
mov esi, eax
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
mov eax, esi
pop edi
pop esi
ret
Function at 0x405c56
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x117]
mov byte [ebp - 0x118], bl
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x21b]
mov byte [ebp - 0x21c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.GetDiskFreeSpaceExA
push str.kernel32.dll
stosb byte es:[edi], al
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
mov cl, byte [eax]
cmp cl, 0x5c
jne 0x405ce7
cmp byte [eax + 1], cl
jne 0x405ce7
push eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x21c]
push 0x4151dc
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x405d03
mov al, byte [eax + 1]
mov byte [ebp - 0x118], cl
mov byte [ebp - 0x117], al
mov byte [ebp - 0x116], 0x5c
mov byte [ebp - 0x115], bl
cmp dword [ebp - 0x14], ebx
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
je 0x405d45
cmp byte [ebp - 0x21c], bl
lea eax, [ebp - 0x21c]
jne 0x405d22
lea eax, [ebp - 0x118]
push esi
push edi
push dword [ebp + 0xc]
push eax
call dword [ebp - 0x14]
cmp eax, ebx
mov dword [ebp + 8], eax
jne 0x405ddb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x405ddb
cmp byte [ebp - 0x21c], bl
je 0x405d6c
lea eax, [ebp - 0x118]
push 0x104
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.00405de3
add esp, 0xc
test eax, eax
je 0x405dde
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x405dc6
push dword [ebp - 0xc]
mov dword [edi + 4], ebx
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00405e71
push dword [ebp - 0x10]
mov dword [edi], eax
mov dword [esi + 4], ebx
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00405e71
mov dword [esi], eax
mov ecx, eax
mov eax, dword [ebp + 0xc]
add esp, 0x18
mov dword [eax], ecx
mov ecx, dword [esi + 4]
mov dword [eax + 4], ecx
cmp byte [ebp - 0x21c], bl
je 0x405ddb
lea eax, [ebp - 0x118]
push eax
call fcn.00405e9a
pop ecx
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4064ae
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x20]
push 0xfffffffffffffff4
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov edi, dword [sym.imp.USER32.dll_GetWindowLongA]
mov ebx, dword [eax]
mov esi, dword [eax + 0x30]
push ebx
mov dword [ebp - 4], esi
mov dword [ebp - 0x24], ebx
call edi
test esi, esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
je 0x406510
lea eax, [ebp - 0x24]
mov dword [ebp - 0x1c], 0xffffff37
push eax
push 0
push 0x4e
push dword [esi]
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [ebp - 0x18], 0
jne 0x406647
mov eax, dword [ebp - 4]
push 0
push dword [eax]
call dword [sym.imp.USER32.dll_ShowWindow]
xor eax, eax
cmp dword [esi], eax
jne 0x4065cf
push esi
push 0x4073b3
push ebx
mov dword [ebp - 0x14], eax
push dword [esi + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0x13d
mov dword [ebp - 8], 0xc1
push dword [esi + 8]
call fcn.0040605b
add esp, 0x14
mov dword [ebp + 0xc], eax
test eax, eax
je 0x40664a
push 0xfffffffffffffff0
push eax
call edi
and eax, 0x7b30ff7f
or eax, 0x40000000
push eax
push 0xfffffffffffffff0
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_SetWindowLongA]
push 0xffffffffffffffec
push dword [ebp + 0xc]
call edi
and ax, 0xfefe
push eax
push 0xffffffffffffffec
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_SetWindowLongA]
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_SetParent]
mov eax, dword [esi + 4]
and eax, 2
test al, al
jne 0x4065a9
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x10], 0x2c
mov dword [ebp - 8], 0x8f
lea eax, [ebp - 0x14]
push eax
push ebx
call dword [sym.imp.USER32.dll_MapDialogRect]
push 0x214
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x1c], 0xffffff38
push eax
push 0
push 0x4e
push dword [esi]
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [ebp - 0x18], 0xffffffff
je 0x406647
xor edi, edi
cmp dword [ebp - 0x18], edi
je 0x406602
push dword [ebp - 0x18]
push dword [ebp + 8]
call fcn.00406672
pop ecx
pop ecx
jmp 0x40664a
mov eax, dword [ebp + 8]
push 1
push edi
push ebx
mov dword [eax + 0x30], esi
call dword [sym.imp.USER32.dll_InvalidateRect]
push 5
push dword [esi]
call dword [sym.imp.USER32.dll_ShowWindow]
push ebx
call dword [sym.imp.USER32.dll_SetActiveWindow]
push edi
push edi
push dword [esi]
mov edi, dword [sym.imp.USER32.dll_GetNextDlgTabItem]
call edi
test eax, eax
jne 0x40663c
push eax
push eax
push ebx
call edi
test eax, eax
je 0x40663f
push eax
jmp 0x406641
push dword [esi]
call dword [sym.imp.USER32.dll_SetFocus]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4066c7
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
lea edi, [ebp - 0x18]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0xc], ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 8]
push 0xe
mov dword [ebp - 0x90], ebx
stosd dword es:[edi], eax
pop ecx
lea edi, [ebp - 0x8c]
push dword [ebp + 8]
rep stosd dword es:[edi], eax
call dword [sym.imp.USER32.dll_GetDC]
push 0xc
mov dword [ebp - 4], eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x53]
mov byte [ebp - 0x54], bl
rep stosd dword es:[edi], eax
push ebx
push ebx
push 0x31
push dword [ebp + 8]
stosb byte es:[edi], al
call dword [sym.imp.USER32.dll_SendMessageA]
lea ecx, [ebp - 0x90]
push ecx
push 0x3c
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
lea eax, [ebp - 0x90]
mov byte [ebp - 0x75], 0x20
push eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push dword [ebp - 4]
call edi
mov esi, dword [sym.imp.USER32.dll_GetDlgItem]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x54]
push 0x32
push eax
push 0x3ee
push dword [ebp + 8]
call esi
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.004075b0
pop ecx
push eax
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 4]
call dword [sym.imp.GDI32.dll_GetTextExtentPointA]
push dword [ebp - 0x20]
push dword [ebp - 4]
call edi
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [ebp - 4]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_ReleaseDC]
lea eax, [ebp - 0x1c]
push eax
push 0x3ed
push edi
call esi
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
lea eax, [ebp - 0x1c]
push eax
push edi
call dword [sym.imp.USER32.dll_ScreenToClient]
mov ecx, dword [ebp - 8]
push 0xfffffffffffffffe
mov eax, ecx
add ecx, 2
cdq
sub eax, edx
pop edx
sar eax, 1
sub edx, eax
mov eax, dword [ebp - 0xc]
add dword [ebp - 0x18], edx
push ebx
add eax, 5
push ecx
push eax
mov dword [ebp - 0x1c], ebx
push dword [ebp - 0x18]
push ebx
push 0x3ee
push edi
call esi
push eax
call dword [sym.imp.USER32.dll_MoveWindow]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402ac5
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
mov eax, dword [0x7a27f0]
or al, 8
xor ebx, ebx
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x402b59
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x402b16
cmp dword [ebp + 0x10], ebx
jne 0x402b4d
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.00402ac5
test eax, eax
jne 0x402b28
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402afd
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.00405c33
cmp eax, ebx
je 0x402b60
push ebx
push dword [0x7a27f0]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402b59
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp dword [0x7a27f0], ebx
jne 0x402b56
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x402b56
jmp 0x402b59
Function at 0x4051ba
Capabilities:
Create process on windows

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

Function at 0x40527f
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push ebx
mov ebx, dword [ebp + 8]
push esi
push ebx
call fcn.00405521
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], eax
test cl, 8
je 0x4052b5
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x7a27c8], eax
jmp 0x40543a
mov dword [ebp + 8], ecx
push edi
and dword [ebp + 8], 1
je 0x4052d0
test eax, eax
je 0x4053e5
test cl, 2
je 0x4053e5
mov esi, 0x79fd58
push ebx
push esi
call fcn.0040594d
cmp dword [ebp + 8], 0
je 0x4052ef
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x4052f5
push ebx
call fcn.00405487
push 0x409010
push ebx
call sub.KERNEL32.dll_lstrcatA
push ebx
call sub.KERNEL32.dll_lstrlenA
mov edi, eax
lea eax, [ebp - 0x148]
push eax
push esi
add edi, ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x4053db
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.0040546b
cmp byte [eax], 0
je 0x405346
cmp byte [ebp - 0x18], 0
je 0x405346
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x40535c
mov al, byte [esi + 1]
test al, al
je 0x4053ba
cmp al, 0x2e
jne 0x40535c
cmp byte [esi + 2], 0
je 0x4053ba
push esi
push edi
call fcn.0040594d
test byte [ebp - 0x148], 0x10
je 0x405381
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4053ba
push dword [ebp + 0xc]
push ebx
call fcn.0040527f
jmp 0x4053ba
push ebx
call fcn.00405605
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4053b2
test byte [ebp + 0xc], 4
je 0x4053aa
push ebx
push 0xfffffffffffffff1
call fcn.00404d01
push 0
push ebx
call fcn.0040569b
jmp 0x4053ba
inc dword [0x7a27c8]
jmp 0x4053ba
push ebx
push 0xfffffffffffffff2
call fcn.00404d01
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405324
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x4053e5
and byte [edi - 1], 0
xor esi, esi
pop edi
cmp dword [ebp + 8], esi
je 0x40543a
cmp dword [ebp - 8], esi
jne 0x4053fa
inc dword [0x7a27c8]
jmp 0x40543a
push ebx
call fcn.00405bf5
test eax, eax
je 0x40543a
push ebx
call fcn.00405440
push ebx
call fcn.00405605
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x405432
test byte [ebp + 0xc], 4
je 0x4053f2
push ebx
push 0xfffffffffffffff1
call fcn.00404d01
push esi
push ebx
call fcn.0040569b
jmp 0x40543a
push ebx
push 0xffffffffffffffe5
call fcn.00404d01
pop esi
pop ebx
leave
ret 8
Function at 0x405521
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x7a0158
push esi
call fcn.0040594d
push esi
call fcn.004054d4
mov edi, eax
test edi, edi
jne 0x405542
xor eax, eax
jmp 0x405594
push edi
call fcn.00405b5c
test byte [0x7a2750], 0x80
je 0x40555b
mov al, byte [edi]
test al, al
je 0x40553e
cmp al, 0x5c
je 0x40553e
sub edi, esi
jmp 0x405573
call fcn.00405bf5
test eax, eax
je 0x40556d
test byte [eax], 0x10
je 0x40553e
push esi
call fcn.00405487
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x40555f
call fcn.00405440
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405621
and al, 0xfe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x405624
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
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_CreateFileA]
ret 0xc

Function at 0x405653
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
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 byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x405697
test edi, edi
jne 0x40565e
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x405691
Function at 0x40569b
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 1
call fcn.00405c33
test eax, eax
mov esi, dword [esp + 0x18]
je 0x4056bf
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x4057f8
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x7a0ee0], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x7a0ee0
je 0x405703
push 1
push 0
push esi
call fcn.00405624
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x4057fe
cmp eax, edi
jg 0x4057fe
mov esi, 0x7a0958
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x4057fe
cmp eax, edi
jg 0x4057fe
push esi
push ebp
push str._s_s_r_n
push 0x7a0558
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x7a2748]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.0040596f
push 4
push 0xc0000000
push esi
call fcn.00405624
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x4057f8
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 0x4057f1
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4057f1
cmp edi, dword [esp + 0x18]
jne 0x4057f1
push str._Rename__r_n
push esi
call fcn.00405599
test eax, eax
jne 0x405805
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.0040594d
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x7a0558
push eax
call fcn.004055e5
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x18]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x7a27d0]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x409388
push eax
call fcn.00405599
test eax, eax
je 0x4057bc
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x40582c
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x405821
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x4057be
Function at 0x405834
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
mov esi, dword [ebp + 0x14]
and eax, 0x100
or eax, 0x20019
mov byte [esi], bl
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4058a5
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x400
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405894
cmp dword [ebp + 0x14], 1
je 0x405896
cmp dword [ebp + 0x14], 2
je 0x405896
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14