joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41f3a4
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x41f5d4
push SysFreeString
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
je 0x41f427
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x41f5d4
push SysFreeString
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
je 0x41f427
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x41f5f0
push SysFreeString
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x41f4b0
xor eax, eax
push ebp
push 0x41f4a9
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.0041f1ec
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegQueryValueExA
test eax, eax
je 0x41f48e
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x41f610
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegQueryValueExA
test eax, eax
je 0x41f48e
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41f4b0
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.KERNEL32.DLL_GetThreadLocale
push eax
call sub.KERNEL32.DLL_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x41f5ca
cmp byte [ebp - 0xd], 0
jne 0x41f4f7
cmp byte [ebp - 0x12], 0
je 0x41f5ca
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x41f510
dec ebx
cmp byte [ebx], 0x2e
je 0x41f51f
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x41f50f
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x41f5ca
inc ebx
cmp byte [ebp - 0x12], 0
je 0x41f55c
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x41f5ca
cmp byte [ebp - 0xd], 0
je 0x41f5ca
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x41f5ca
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x41f8c0
Capabilities:
Accept command line arguments

Disassembly:
sub dword [0x435a6c], 1
jae 0x41f946
mov byte [0x4317fc], 2
mov dword [0x4354bc], 0x42c886
mov dword [0x4354c0], 0x42c89e
mov byte [0x4354fa], 2
mov dword [0x4354a8], 0x41e9dc
call fcn.0041d180
test al, al
je 0x41f903
call fcn.0041d1b0
call fcn.0041d274
mov word [0x435500], 0xd7b0
mov word [0x4356cc], 0xd7b0
mov word [0x435898], 0xd7b0
call fcn.0041e8d0
call sub.KERNEL32.DLL_GetCommandLineA
mov dword [0x4354ec], eax
call fcn.0041b1ec
mov dword [0x4354e8], eax
call sub.KERNEL32.DLL_GetCurrentThreadId
mov dword [0x4354e0], eax
ret

Function at 0x421708
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x421724
call fcn.00422bb0
pop ebx
pop ebp
ret
test byte [ebp + 0xc], 2
je 0x421740
test bl, 1
je 0x421740
call fcn.00426928
mov dword [eax], 5
or eax, 0xffffffff
pop ebx
pop ebp
ret
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x421924
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
call fcn.0042274c
test byte [ebp + 0xd], 0xc0
jne 0x421948
mov eax, dword [0x432640]
mov edx, dword [eax]
and edx, 0xc000
or dword [ebp + 0xc], edx
test byte [ebp + 0xd], 0x80
jne 0x421955
or dword [ebp + 0xc], 0x4000
mov ecx, dword [ebp + 0xc]
and ecx, 0x700
cmp ecx, 0x500
jg 0x421982
je 0x421994
sub ecx, 0x100
je 0x4219a2
sub ecx, 0x100
je 0x4219a9
sub ecx, 0x100
je 0x42199b
jmp 0x4219b0
sub ecx, 0x600
je 0x4219a9
sub ecx, 0x100
je 0x421994
jmp 0x4219b0
mov edi, 1
jmp 0x4219b5
mov edi, 2
jmp 0x4219b5
mov edi, 4
jmp 0x4219b5
mov edi, 5
jmp 0x4219b5
mov edi, 3
test byte [ebp + 0xd], 1
je 0x4219dc
lea eax, [ebp + 0x10]
add eax, 4
mov eax, dword [eax - 4]
and eax, dword [0x4320b8]
test al, 0x80
je 0x4219d5
mov ebx, 0x80
jmp 0x4219ee
mov ebx, 1
jmp 0x4219ee
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x4219ee
xor ebx, ebx
mov eax, dword [ebp + 0xc]
and eax, 3
sub eax, 1
jb 0x421a00
je 0x421a09
dec eax
je 0x421a12
jmp 0x421a1b
mov dword [ebp - 4], SysFreeString
jmp 0x421a2a
mov dword [ebp - 4], 0x40000000
jmp 0x421a2a
mov dword [ebp - 4], 0xc0000000
jmp 0x421a2a
push 1
call fcn.00422b44
pop ecx
mov ebx, eax
jmp 0x421b1a
mov eax, dword [ebp + 0xc]
and eax, 0x70
sub eax, 0x10
je 0x421a46
sub eax, 0x10
je 0x421a4d
sub eax, 0x10
je 0x421a56
sub eax, 0x10
je 0x421a5f
jmp 0x421a5f
xor edx, edx
mov dword [ebp - 8], edx
jmp 0x421a66
mov dword [ebp - 8], 1
jmp 0x421a66
mov dword [ebp - 8], 2
jmp 0x421a66
mov dword [ebp - 8], 3
mov dword [ebp - 0x14], 0xc
xor ecx, ecx
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x14]
mov eax, dword [ebp + 0xc]
and eax, 0x80
cmp eax, 1
sbb edx, edx
neg edx
mov dword [ebp - 0xc], edx
push 0
push ebx
push edi
push ecx
mov eax, dword [ebp - 8]
push eax
mov edx, dword [ebp - 4]
push edx
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
cmp eax, 0xffffffff
jne 0x421ad3
call sub.KERNEL32.DLL_GetLastError
mov ebx, eax
and ebx, 0xffff
cmp ebx, 0x6e
jne 0x421ac8
test byte [ebp + 0xd], 1
je 0x421ac3
mov ebx, 0x50
jmp 0x421ac8
mov ebx, 2
push ebx
call fcn.00422b44
pop ecx
mov ebx, eax
jmp 0x421b1a
mov edi, esi
push edi
call fcn.00421888
pop ecx
test eax, eax
je 0x421ae7
or dword [ebp + 0xc], 0x2000
test bl, 1
jne 0x421af3
or dword [ebp + 0xc], 0x100
and dword [ebp + 0xc], 0xfffff8ff
mov eax, dword [ebp + 0xc]
push eax
push edi
call fcn.0042286c
add esp, 8
mov ebx, eax
inc eax
jne 0x421b1a
push 4
call fcn.00422b44
pop ecx
push esi
call sub.KERNEL32.DLL_CloseHandle
call fcn.00422780
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4268c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
test eax, eax
je 0x426922
call fcn.00426870
mov esi, eax
lea eax, [ebp - 4]
push 0
push eax
push esi
call fcn.0042058c
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push edi
call fcn.0042058c
pop ecx
push eax
push edi
push ebx
call sub.KERNEL32.DLL_WriteFile
push ebx
call sub.KERNEL32.DLL_CloseHandle
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret

Function at 0x4269a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff7c
cmp dword [0x4335e0], 0
push ebx
push esi
mov esi, dword [ebp + 8]
jne 0x426a7a
cmp dword [0x4335dc], 0
jne 0x426a7a
cmp dword [0x4337c0], 0
je 0x426a34
push 0x80
lea eax, [ebp - 0x84]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x5c
lea edx, [ebp - 0x84]
push edx
call fcn.00426770
add esp, 8
mov ebx, eax
test eax, eax
jne 0x426a1a
push 0x3a
lea edx, [ebp - 0x84]
push edx
call fcn.00426770
add esp, 8
mov ebx, eax
test eax, eax
jne 0x426a1a
lea ebx, [ebp - 0x84]
jmp 0x426a1b
inc ebx
call fcn.0042695c
or eax, 0x10010
push eax
push ebx
push esi
push 0
call sub.USER32.DLL_MessageBoxA
jmp 0x426ab5
push 0xfffffffffffffff4
call sub.KERNEL32.DLL_GetStdHandle
mov ebx, eax
lea eax, [ebp - 4]
push 0
push eax
push 2
push 0x4335e4
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push esi
call fcn.0042058c
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea ecx, [ebp - 4]
push ecx
push 2
push 0x4335e7
push ebx
call sub.KERNEL32.DLL_WriteFile
jmp 0x426ab5
cmp dword [0x4335dc], 0
je 0x426a94
cmp dword [0x4335dc], 0xffffffff
je 0x426ab5
push esi
call dword [0x4335dc]
pop ecx
mov eax, dword [0x4335e0]
test eax, eax
je 0x426ab5
cmp dword [0x4335e0], 0xffffffff
je 0x426ab5
cmp byte [eax], 0
je 0x426ab5
push esi
push eax
call fcn.004268c0
add esp, 8
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4272b0
Capabilities:
Query environment variable

Disassembly:
push ebx
push esi
push edi
push ebp
push ecx
cmp dword [0x436410], 0
jne 0x427331
cmp dword [0x436430], 0
jne 0x4272e0
call sub.KERNEL32.DLL_GetEnvironmentStrings
mov dword [0x436430], eax
test eax, eax
jne 0x4272e0
push str.GetEnvironmentStrings_failed
call fcn.00426acc
pop ecx
xor ebp, ebp
xor esi, esi
mov ebx, dword [0x436430]
jmp 0x4272f4
lea eax, [edi + 1]
inc esi
add ebp, eax
add ebx, eax
push ebx
call fcn.0042058c
pop ecx
mov edi, eax
test eax, eax
jne 0x4272ec
lea edi, [ebp + 1]
push edi
call fcn.0041fe70
pop ecx
mov ebx, eax
mov dword [0x436414], ebx
test ebx, ebx
jne 0x42731e
xor eax, eax
jmp 0x4273f4
push edi
mov edx, dword [0x436430]
push edx
push ebx
call fcn.0042043c
add esp, 0xc
jmp 0x427351
xor esi, esi
mov ebx, dword [0x436410]
jmp 0x42734b
push eax
call fcn.0042058c
pop ecx
test eax, eax
jne 0x427347
dec esi
inc esi
add ebx, 4
mov eax, dword [ebx]
test eax, eax
jne 0x42733b
lea ebx, [esi + 4]
push 4
mov dword [0x436418], ebx
inc ebx
push ebx
call fcn.0041f948
add esp, 8
test eax, eax
mov dword [esp], eax
jne 0x427374
xor eax, eax
jmp 0x4273f4
cmp dword [0x436410], 0
jne 0x4273a5
xor esi, esi
mov ebx, dword [0x436414]
mov eax, dword [esp]
mov ebp, eax
jmp 0x427396
mov dword [ebp], ebx
add ebp, 4
inc esi
inc edi
add ebx, edi
push ebx
call fcn.0042058c
pop ecx
mov edi, eax
test eax, eax
jne 0x42738c
jmp 0x4273d6
xor esi, esi
mov ebx, dword [0x436410]
mov eax, dword [esp]
mov edi, eax
jmp 0x4273d0
push eax
call fcn.0042058c
pop ecx
test eax, eax
je 0x4273c5
mov eax, dword [ebx]
mov dword [edi], eax
jmp 0x4273c9
dec esi
add edi, 0xfffffffc
add edi, 4
inc esi
add ebx, 4
mov eax, dword [ebx]
test eax, eax
jne 0x4273b4
mov eax, dword [0x436410]
test eax, eax
je 0x4273e6
push eax
call fcn.0041fe80
pop ecx
mov edx, dword [esp]
mov eax, 1
mov dword [0x436410], edx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x402ebd
Capabilities:
Check for time delay via gettickcount
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
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 0x402eda
mov dword [ebp - 8], 0x8000
and dword [ebp - 4], 0
mov ebx, edi
test edi, edi
jne 0x402ee9
mov ebx, 0x40f0f8
mov eax, dword [ebp + 8]
test eax, eax
jl 0x402efe
mov ecx, dword [0x424398]
add ecx, eax
push ecx
call fcn.004030ec
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.004030ba
test eax, eax
je 0x403065
test byte [ebp + 0x17], 0x80
je 0x40304e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x40b028
mov dword [ebp - 0xc], eax
call fcn.00405d7b
and dword [ebp + 0x14], 0x7fffffff
mov eax, dword [ebp + 0x14]
mov dword [ebp + 8], eax
jle 0x4030b0
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x402f4e
mov esi, dword [ebp + 0x14]
mov edi, 0x40b0f8
push esi
push edi
call fcn.004030ba
test eax, eax
je 0x403065
sub dword [ebp + 0x14], esi
mov dword [0x40b040], edi
mov dword [0x40b044], esi
mov eax, dword [ebp - 8]
mov ecx, 0x40b028
mov dword [0x40b048], ebx
mov dword [0x40b04c], eax
call fcn.00405d9b
test eax, eax
mov dword [ebp - 0x14], eax
jl 0x403046
mov esi, dword [0x40b048]
sub esi, ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x4092a0], 1
mov edi, eax
je 0x402ff0
sub eax, dword [ebp - 0xc]
cmp eax, 0xc8
ja 0x402fbd
cmp dword [ebp + 0x14], 0
jne 0x402ff0
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 - 0x54]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x54]
push eax
push 0
call fcn.00404d4c
mov dword [ebp - 0xc], edi
xor eax, eax
cmp esi, eax
je 0x40303b
cmp dword [ebp + 0x10], eax
jne 0x403019
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40304a
cmp dword [ebp - 0x10], esi
jne 0x40304a
add dword [ebp - 4], esi
jmp 0x40302f
sub dword [ebp - 8], esi
add dword [ebp - 4], esi
cmp dword [ebp - 8], 1
mov ebx, dword [0x40b048]
jl 0x4030b0
cmp dword [ebp - 0x14], 1
jne 0x402f71
jmp 0x4030b0
cmp dword [ebp + 0x14], eax
jg 0x402f41
jmp 0x4030b0
push 0xfffffffffffffffc
jmp 0x403067
push 0xfffffffffffffffe
jmp 0x403067
test edi, edi
je 0x4030a5
cmp dword [ebp + 0x14], esi
jge 0x40305a
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.004030ba
test eax, eax
jne 0x4030ad
push 0xfffffffffffffffd
pop eax
jmp 0x4030b3
mov esi, dword [ebp - 8]
cmp dword [ebp + 0x14], esi
jge 0x403075
mov esi, dword [ebp + 0x14]
mov edi, 0x40b0f8
push esi
push edi
call fcn.004030ba
test eax, eax
je 0x403065
lea eax, [ebp + 0x10]
push 0
push eax
push esi
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40304a
cmp esi, dword [ebp + 0x10]
jne 0x40304a
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x40306a
jmp 0x4030b0
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x405231
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push dword [ebp + 0xc]
mov dword [0x422940], 0x44
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
je 0x405255
test al, 0x10
jne 0x405258
mov dword [ebp + 0xc], ecx
lea eax, [ebp - 0x10]
push eax
push 0x422940
push dword [ebp + 0xc]
push ecx
push ecx
push ecx
push ecx
push ecx
push dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405283
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 8
Function at 0x4052eb
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.0040558a
test byte [ebp + 0xc], 8
mov dword [ebp - 8], eax
je 0x40531f
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x4243c8], eax
jmp 0x4054a4
push ebx
mov ebx, dword [ebp + 0xc]
and ebx, 1
mov dword [ebp - 4], ebx
je 0x40533d
test eax, eax
je 0x405455
test byte [ebp + 0xc], 2
je 0x405455
mov esi, 0x421940
push edi
push esi
call fcn.0040599d
test ebx, ebx
je 0x40535a
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x405360
push edi
call fcn.004054f1
push 0x409010
push edi
call sub.KERNEL32.dll_lstrcatA
push edi
call sub.KERNEL32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x148]
push eax
push esi
add ebx, edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x40544b
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.004054d5
cmp byte [eax], 0
je 0x4053b1
cmp byte [ebp - 0x18], 0
je 0x4053b1
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x4053c7
mov al, byte [esi + 1]
test al, al
je 0x40542a
cmp al, 0x2e
jne 0x4053c7
cmp byte [esi + 2], 0
je 0x40542a
push esi
push ebx
call fcn.0040599d
mov eax, dword [ebp - 0x148]
test al, 0x10
je 0x4053ed
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x40542a
push dword [ebp + 0xc]
push edi
call fcn.004052eb
jmp 0x40542a
and al, 0xfe
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x405422
test byte [ebp + 0xc], 4
je 0x40541a
push edi
push 0xfffffffffffffff1
call fcn.00404d4c
push 0
push edi
call fcn.004056e5
jmp 0x40542a
inc dword [0x4243c8]
jmp 0x40542a
push edi
push 0xfffffffffffffff2
call fcn.00404d4c
lea eax, [ebp - 0x148]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40538f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 4], 0
je 0x405455
and byte [ebx - 1], 0
xor esi, esi
pop ebx
cmp dword [ebp - 4], esi
je 0x4054a4
cmp dword [ebp - 8], esi
jne 0x40546a
inc dword [0x4243c8]
jmp 0x4054a4
push edi
call fcn.00405c72
test eax, eax
je 0x4054a4
push edi
call fcn.004054aa
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x40549c
test byte [ebp + 0xc], 4
je 0x405462
push edi
push 0xfffffffffffffff1
call fcn.00404d4c
push esi
push edi
call fcn.004056e5
jmp 0x4054a4
push edi
push 0xffffffffffffffe5
call fcn.00404d4c
pop edi
pop esi
leave
ret 8
Function at 0x40558a
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x421d40
push esi
call fcn.0040599d
push esi
call fcn.0040553d
mov edi, eax
test edi, edi
jne 0x4055ab
xor eax, eax
jmp 0x4055fd
push edi
call fcn.00405bd9
test byte [0x424350], 0x80
je 0x4055c4
mov al, byte [edi]
test al, al
je 0x4055a7
cmp al, 0x5c
je 0x4055a7
sub edi, esi
jmp 0x4055dc
call fcn.00405c72
test eax, eax
je 0x4055d6
test byte [eax], 0x10
je 0x4055a7
push esi
call fcn.004054f1
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x4055c8
call fcn.004054aa
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 0x40566e
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 0x40569d
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 0x4056e1
test edi, edi
jne 0x4056a8
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x4056db
Function at 0x4056e5
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push str.MoveFileExA
push str.KERNEL32.dll
call fcn.00405cb0
test eax, eax
mov esi, dword [esp + 0x18]
je 0x405711
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x405857
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x422ac8], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x422ac8
je 0x405755
push 1
push 0
push esi
call fcn.0040566e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x40585d
cmp eax, edi
jg 0x40585d
mov esi, 0x422540
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x40585d
cmp eax, edi
jg 0x40585d
push esi
push ebp
push str._s_s_r_n
push 0x422140
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebx, eax
push 0x3f0
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.wininit.ini
push esi
call sub.KERNEL32.dll_lstrcatA
xor eax, eax
push eax
push 0x8000080
push 4
push eax
push eax
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x405857
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 0x405850
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 0x405850
cmp edi, dword [esp + 0x18]
jne 0x405850
push str._Rename__r_n
push esi
call fcn.00405602
test eax, eax
jne 0x405864
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.0040599d
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x422140
push eax
call fcn.0040564e
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 [0x4243d0]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x409308
push eax
call fcn.00405602
test eax, eax
je 0x40581b
inc eax
lea edx, [esi + edi]
cmp eax, edx
mov ecx, eax
jae 0x40588d
mov dl, byte [ecx]
mov byte [ecx + ebx], dl
inc ecx
lea edx, [esi + edi]
cmp ecx, edx
jb 0x405880
sub eax, esi
jmp 0x40581d
Function at 0x405891
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x14]
xor ebx, ebx
push eax
push 0x20019
push ebx
push dword [ebp + 0xc]
mov byte [esi], bl
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4058f5
lea eax, [ebp + 8]
mov dword [ebp + 8], 0x400
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4058e4
cmp dword [ebp + 0x14], 1
je 0x4058e6
cmp dword [ebp + 0x14], 2
je 0x4058e6
mov byte [esi], bl
push dword [ebp + 0xc]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x10