joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403130
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push esi
mov esi, dword [ebp + 8]
cmp byte [esi + 0x19], 0
jne 0x403172
cmp dword [esi + 0x1c], 0xffffffff
jne 0x403172
cmp dword [esi + 0x14], 0x10
mov eax, esi
jb 0x403150
mov eax, dword [esi]
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x1c], eax
sete al
mov byte [esi + 0x19], al
mov ecx, dword [esi + 0x1c]
mov esi, dword [ebp + 0xc]
cmp ecx, 0xffffffff
je 0x403272
cmp byte [esi], 0
jne 0x403272
mov eax, dword [esi + 4]
test eax, eax
jne 0x4031bd
push eax
push eax
push eax
movzx eax, byte [ebp + 0x10]
shl eax, 0x18
add eax, 2
push eax
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [esi + 4], eax
test eax, eax
jne 0x4031bd
cmp dword [esi + 8], eax
mov byte [esi], 1
setne al
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi + 8], 0
jne 0x403276
push edi
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
mov dword [ebp + 8], edi
mov dword [esi + 8], edi
test edi, edi
jne 0x4031f1
test eax, eax
mov byte [esi], 1
pop edi
setne al
pop esi
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ebx, eax
lea eax, [ebp - 0x38]
push 0x1c
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x40325d
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x1c]
add edi, dword [ebp - 0x34]
push 0x1c
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x34]
jne 0x403241
add edi, dword [ebp - 0x10]
lea eax, [ebp - 0x1c]
push 0x1c
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x34]
je 0x403228
sub edi, dword [ebp + 8]
je 0x40325d
mov eax, dword [esi + 8]
dec eax
add eax, edi
cmp dword [esi + 8], 0
pop ebx
mov dword [esi + 0xc], eax
setne al
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push dword [esi + 8]
mov byte [esi], 1
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
pop ebx
mov dword [esi + 8], 0
pop edi
cmp dword [esi + 8], 0
setne al
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x404990
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
mov eax, dword [0x40b61c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x144], ecx
lea ecx, [ebp - 0x140]
push ecx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x404a25
push ebx
lea eax, [ebp - 0x148]
mov dword [ebp - 0x148], 0x136
push eax
lea eax, [ebp - 0x13c]
push eax
push 0
push dword [ebp - 0x140]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
je 0x4049fd
xor bl, bl
jmp 0x404a14
push dword [ebp - 0x144]
lea eax, [ebp - 0x13c]
mov bl, 1
push eax
push 0
push esi
call edi
add esp, 0x10
push dword [ebp - 0x140]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test bl, bl
pop ebx
jne 0x404a35
push dword [ebp - 0x144]
push 0
push 0
push esi
call edi
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00404c9b
mov esp, ebp
pop ebp
ret
Function at 0x402b10
Capabilities:
Create pipe
Create process on windows
Get thread local storage value
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x180c
call fcn.0040fc10
mov eax, dword [0x4588a4]
mov ecx, dword [0x458334]
push ebx
shr eax, 3
push esi
push edi
test eax, eax
jbe 0x402c27
mov edi, dword [sym.imp.KERNEL32.dll_GetNumberFormatW]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateJobObjectA]
mov esi, dword [sym.imp.KERNEL32.dll_GetTimeFormatW]
mov dword [ebp - 4], ecx
mov dword [ebp - 8], eax
cmp dword [0x4588a4], 0x959
jne 0x402c10
push 0
lea eax, [ebp - 0xc08]
push eax
push 0
push 0
push 0
push 0
call edi
push 0
push 0
call ebx
push 0
lea ecx, [ebp - 0x408]
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesA]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetFileShortNameW]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push 0
push 0
push 0
push 0
push 0
push 0
call esi
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea edx, [ebp - 0x1808]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0
push 0
push 0
push 0
push 0
push 0
call esi
push 0
lea eax, [ebp - 0x1008]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, dword [ebp - 4]
push ecx
call fcn.00402850
add dword [ebp - 4], 8
sub dword [ebp - 8], 1
jne 0x402b4e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4085ec
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x449590]
jne 0x4085f6
repz ret
jmp fcn.0040b545

Function at 0x40b177
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00407d1b
and dword [ebp - 4], 0
cmp dword [0x44f5c4], 0
mov ebx, eax
jne 0x40b228
push 0x401c00
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40b2d9
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x401bf4
push edi
call esi
test eax, eax
je 0x40b2d9
push eax
call fcn.00407ca9
mov dword [esp], 0x401be4
push edi
mov dword [0x44f5c4], eax
call esi
push eax
call fcn.00407ca9
mov dword [esp], 0x401bd0
push edi
mov dword [0x44f5c8], eax
call esi
push eax
call fcn.00407ca9
mov dword [esp], 0x401bb4
push edi
mov dword [0x44f5cc], eax
call esi
push eax
call fcn.00407ca9
pop ecx
mov dword [0x44f5d4], eax
test eax, eax
je 0x40b228
push 0x401b9c
push edi
call esi
push eax
call fcn.00407ca9
pop ecx
mov dword [0x44f5d0], eax
mov eax, dword [0x44f5d0]
cmp eax, ebx
je 0x40b280
cmp dword [0x44f5d4], ebx
je 0x40b280
push eax
call fcn.00407d24
push dword [0x44f5d4]
mov esi, eax
call fcn.00407d24
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40b280
test edi, edi
je 0x40b280
call esi
test eax, eax
je 0x40b277
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40b277
test byte [ebp - 0xc], 1
jne 0x40b280
or dword [ebp + 0x10], 0x200000
jmp 0x40b2b9
mov eax, dword [0x44f5c8]
cmp eax, ebx
je 0x40b2b9
push eax
call fcn.00407d24
pop ecx
test eax, eax
je 0x40b2b9
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40b2b9
mov eax, dword [0x44f5cc]
cmp eax, ebx
je 0x40b2b9
push eax
call fcn.00407d24
pop ecx
test eax, eax
je 0x40b2b9
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x44f5c4]
call fcn.00407d24
pop ecx
test eax, eax
je 0x40b2d9
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40b2db
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x8ccbab
Capabilities:
Encode data using xor

Disassembly:
mov edi, 0x8cc92e
push 0x6ce119d1
mov edx, dword [esp]
add esp, 4
call fcn.008ccbed
and ebx, edx
sub edx, edx
dec edx
xor dword [esi], edi
mov edx, 0xc8085f23
mov ebx, 0xc65d99ae
sub edx, 0xc6bc80e5
inc esi
add edx, ebx
cmp esi, eax
jne fcn.008ccbab
push 0xf0f4cfe2
pop ebx
add ebx, edx
and ebx, ebx
ret
Function at 0x430000
Capabilities:
Encode data using xor

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

Function at 0x409ce1
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
mov eax, section.sect_0
call 0x409ce1
lcall 0x5de5, 0x8b10c483
jmp loc.0095f1ac
Function at 0x40137c
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x40a0e4], 0
jne 0x4013ba
xor ecx, ecx
push esi
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
movzx edx, dl
neg edx
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x401390
mov dword [ecx*4 + 0x40a0e0], eax
inc ecx
cmp ecx, 0x100
jl 0x40138b
pop esi
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 8]
not eax
jbe 0x4013e7
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
dec dword [ebp + 0x10]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x40a0e0]
inc ecx
cmp dword [ebp + 0x10], 0
ja 0x4013c8
not eax
pop ebp
ret 0xc

Function at 0x401502
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
mov eax, dword [0x426a90]
or eax, 8
push eax
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x401597
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x401554
cmp dword [ebp + 0x10], ebx
jne 0x40158b
push ebx
lea eax, [ebp - 0x10c]
push eax
push dword [ebp - 4]
call fcn.00401502
test eax, eax
jne 0x401566
push edi
lea eax, [ebp - 0x10c]
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x40153b
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.004060e1
cmp eax, ebx
je 0x40159e
push ebx
push dword [0x426a90]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x401597
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 [0x426a90], ebx
jne 0x401594
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x401594
jmp 0x401597
Function at 0x403277
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [0x41c1bc]
sub esi, dword [0x4201c8]
push edi
add esi, dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x1f4
xor ebx, ebx
cmp esi, ebx
mov dword [0x426a00], eax
jle 0x4033d5
push dword [0x4201c4]
call fcn.00403260
push ebx
push ebx
push dword [0x4201c8]
push dword [0x40a014]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x41c1b8], esi
mov dword [0x40c12c], ebx
mov ebp, 0x4141b8
mov eax, dword [0x4201c0]
sub eax, dword [0x4201c4]
mov edi, 0x4000
cmp eax, edi
jg 0x4032ec
mov edi, eax
push edi
mov esi, 0x41c1c0
push esi
call fcn.0040322e
test eax, eax
je 0x4033e7
add dword [0x4201c4], edi
mov dword [0x414148], esi
mov dword [0x41414c], edi
cmp dword [0x4269ac], ebx
je 0x403343
cmp dword [0x426a80], ebx
jne 0x403343
mov eax, dword [0x41c1b8]
sub eax, dword [0x41c1bc]
push ebx
sub eax, dword [esp + 0x1c]
add eax, dword [0x4201c8]
mov dword [0x40c12c], eax
call fcn.0040318f
pop ecx
mov ecx, 0x414130
mov dword [0x414150], ebp
mov dword [0x414154], 0x8000
call fcn.004068c5
test eax, eax
jl 0x4033ec
mov esi, dword [0x414150]
sub esi, ebp
je 0x4033a1
push ebx
lea eax, [esp + 0x14]
push eax
push esi
push ebp
push dword [0x40a014]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4033f1
cmp esi, dword [esp + 0x10]
jne 0x4033f1
add dword [0x4201c8], esi
cmp dword [0x41414c], ebx
jne 0x403312
jmp 0x4033ad
cmp dword [0x41414c], ebx
jne 0x4033ec
cmp edi, ebx
je 0x4033ec
mov eax, dword [0x41c1bc]
mov ecx, eax
sub ecx, dword [0x4201c8]
add ecx, dword [esp + 0x18]
test ecx, ecx
jg 0x4032d6
push ebx
push ebx
push eax
push dword [0x40a014]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
call fcn.0040318f
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
or eax, 0xffffffff
jmp 0x4033df
push 0xfffffffffffffffd
pop eax
jmp 0x4033df
push 0xfffffffffffffffe
jmp 0x4033ee
Function at 0x4033f5
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x403421
mov ecx, dword [0x4269f8]
push edi
add eax, ecx
push edi
push eax
push dword [0x40a014]
mov dword [0x41c1bc], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.00403277
cmp eax, edi
jl 0x40351a
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp + 8]
push eax
push dword [0x40a014]
call ebx
test eax, eax
je 0x403516
cmp dword [ebp - 4], esi
jne 0x403516
push dword [ebp + 8]
add dword [0x41c1bc], esi
call fcn.00403277
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x403519
cmp dword [ebp + 0x10], edi
jne 0x4034e5
cmp dword [ebp + 8], edi
jle 0x403511
mov esi, 0x41c1c0
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x403495
mov edi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [0x40a014]
call ebx
test eax, eax
je 0x403516
cmp edi, dword [ebp - 4]
jne 0x403516
push 0
lea eax, [ebp + 0x14]
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4034e1
cmp dword [ebp + 0x14], edi
jne 0x4034e1
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x41c1bc], eax
cmp dword [ebp + 8], 0
jg 0x403488
jmp 0x403511
push 0xfffffffffffffffe
jmp 0x403518
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x4034f0
mov eax, dword [ebp + 0x14]
push edi
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x40a014]
call ebx
test eax, eax
je 0x403516
mov eax, dword [ebp - 4]
add dword [0x41c1bc], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x403519
push 0xfffffffffffffffd
pop eax
pop ebx
pop edi
pop esi
leave
ret 0x10
Function at 0x405aba
Capabilities:
Create process on windows

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

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

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov esi, eax
cmp esi, 0xffffffff
je 0x405cb6
and eax, 0xfffffffe
push eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, esi
pop esi
ret 4

Function at 0x405cbc
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
inc ecx
push 0
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 0x405ceb
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
pop ecx
xor edx, edx
div ecx
push esi
push 0
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x405d2f
test edi, edi
jne 0x405cf6
mov byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x405d29

Function at 0x405d33
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0x14]
lea eax, [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
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 0x405da4
lea eax, [ebp + 0xc]
push eax
push esi
lea eax, [ebp + 0x14]
push eax
push ebx
push dword [ebp + 0x10]
mov dword [ebp + 0xc], 0x400
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405d93
cmp dword [ebp + 0x14], 1
je 0x405d95
cmp dword [ebp + 0x14], 2
je 0x405d95
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
Function at 0x405f08
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x405f2d
mov eax, dword [0x40a058]
cmp eax, 0xffffffff
je 0x405f24
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x40a058], 0xffffffff
jmp 0x405fa2
cmp dword [0x424d24], ebx
je 0x405fa2
cmp byte [0x425d40], bl
je 0x405f6c
cmp dword [0x40a058], 0xffffffff
jne 0x405f75
push 4
push 0x40000000
push 0x425d40
call fcn.00405cbc
mov dword [0x40a058], eax
cmp eax, 0xffffffff
je 0x405fa2
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x40a058], 0xffffffff
je 0x405fa2
push esi
push 0x408d3c
mov esi, 0x424d40
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
lea ecx, [ebp + 8]
push ecx
push eax
push esi
push dword [0x40a058]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
pop ebx
pop ebp
ret 4

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

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00405c96
mov edi, eax
cmp edi, 0xffffffff
je 0x406192
test byte [esp + 0x10], 1
push esi
je 0x40617b
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
je 0x406183
xor eax, eax
inc eax
jmp 0x406194
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x406172
test byte [esp + 0x10], 4
jne 0x406192
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
pop edi
pop esi
ret 8

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

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x422658
push esi
call fcn.00405e4c
push esi
call fcn.00405bc7
mov edi, eax
test edi, edi
jne 0x40620e
xor eax, eax
jmp 0x406266
push edi
call fcn.00405e6e
test byte [0x426a08], 0x80
je 0x406227
mov al, byte [edi]
test al, al
je 0x40620a
cmp al, 0x5c
je 0x40620a
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
sub edi, esi
jmp 0x406247
push esi
call fcn.004060ba
test eax, eax
je 0x406241
test byte [eax], 0x10
je 0x40626b
push esi
call fcn.004061c6
push esi
call ebx
cmp eax, edi
jg 0x406232
push esi
call fcn.00406199
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop ebx
pop edi
pop esi
ret 4
xor eax, eax
jmp 0x406265
Function at 0x4064c1
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
push 0x408e00
mov edi, 0x422a58
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [esp + 0x1c]
mov ebp, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov ebx, 0x400
test esi, esi
je 0x406510
push 1
push 0
push esi
call fcn.00405cbc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push edi
push esi
call ebp
test eax, eax
je 0x406649
cmp eax, ebx
jg 0x406649
push ebx
mov esi, 0x423798
push esi
push dword [esp + 0x20]
call ebp
test eax, eax
je 0x406649
cmp eax, ebx
jg 0x406649
push esi
push edi
push str._s_s_r_n
push 0x422f98
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebx, eax
mov eax, dword [0x4269ac]
push dword [eax + 0x128]
push esi
call fcn.0040626f
push 4
push 0xc0000000
push esi
call fcn.00405cbc
mov ebp, eax
mov dword [esp + 0x1c], ebp
cmp ebp, 0xffffffff
je 0x406649
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 0x406642
push 0
lea eax, [esp + 0x14]
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406642
cmp edi, dword [esp + 0x10]
jne 0x406642
push str._Rename__r_n
push esi
call fcn.00405c1c
test eax, eax
jne 0x4065d8
push str._Rename__r_n
lea eax, [esi + edi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x40660d
push 0x408de8
add eax, 0xa
push eax
call fcn.00405c1c
mov ebp, eax
test ebp, ebp
je 0x406609
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x4065fa
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x4065f4
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x1c]
jmp 0x40660f
mov ebp, dword [esp + 0x1c]
mov eax, edi
push ebx
push 0x422f98
add eax, esi
push eax
call fcn.00405c72
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x14]
push eax
add edi, ebx
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]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x4124e0
Capabilities:
Enumerate files on windows

Disassembly:
push 0xffffffffffffffff
push 0x49202b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x180
push ebx
push ebp
mov ebp, ecx
lea ecx, [esp + 8]
lea eax, [ebp + 0x40]
push eax
call fcn.00486e90
mov ecx, dword [esp + 8]
mov dword [esp + 0x190], 0
mov eax, dword [ecx - 8]
test eax, eax
je 0x412562
lea edx, [esp + 0x10]
push 1
push edx
lea ecx, [esp + 0x10]
call fcn.00484c0a
mov eax, dword [eax]
push 0x5f5cd8
push eax
call fcn.00476a44
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
setne bl
call fcn.0048711b
test bl, bl
je 0x412562
push 0x5f5cd8
lea ecx, [esp + 0xc]
call fcn.004874ab
push 0x5f5ce4
lea ecx, [esp + 0xc]
call fcn.004874ab
mov ecx, dword [esp + 8]
lea eax, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x41259e
lea ecx, [esp + 8]
mov dword [esp + 0x190], eax
call fcn.0048711b
jmp 0x412669
push esi
mov esi, dword [esp + 0x19c]
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
mov ebx, 0x23
test byte [esp + 0x50], 0x10
je 0x412622
lea edx, [esp + 0x7c]
push 0x5f5ce0
push edx
call fcn.00476a44
add esp, 8
test eax, eax
je 0x412622
lea eax, [esp + 0x7c]
push 0x5f5cdc
push eax
call fcn.00476a44
add esp, 8
test eax, eax
je 0x412622
mov eax, dword [ebp + 0x1c]
lea edx, [esp + 0x1c]
push edx
push 0
lea ecx, [esp + 0x84]
push 0x1100
push eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], 0xffff0003
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 1
mov dword [esp + 0x44], ecx
mov dword [esp + 0x34], ebx
call edi
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x50]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4125b2
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp + 0x1c]
push esi
push 2
push 0x1102
push ecx
call edi
lea ecx, [esp + 0x10]
mov dword [esp + 0x198], 0xffffffff
call fcn.0048711b
pop edi
pop esi
mov ecx, dword [esp + 0x188]
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x18c
ret 4

Function at 0x412e60
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x10c
lea eax, [esp]
push esi
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x412ec2
mov edx, dword [esp + 4]
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
push esi
push edx
mov dword [esp + 0x18], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 0x11c]
lea eax, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10c
ret 0xc