joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10288fd6
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.10288f52
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x10289145
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x10289145
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x102890fa
jg 0x10289032
test eax, eax
je 0x102890f0
push 1
push 0x1000
call fcn.102819b2
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10289055
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x102890e7
push 0x8000
push ebx
call fcn.10288e83
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x1028907e
jg 0x10289079
cmp ecx, 0x1000
jb 0x1028907e
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.10281698
add esp, 0x10
cmp eax, 0xffffffff
je 0x102890c3
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x10289079
jl 0x102890aa
test ecx, ecx
jne 0x1028906b
push dword [ebp - 0xc]
push ebx
call fcn.10288e83
push esi
call fcn.10281a0f
add esp, 0xc
xor ebx, ebx
jmp 0x10289153
cmp byte [edi + 0x24], 0
je 0x102890da
cmp dword [edi + 0x20], 5
jne 0x102890da
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x102890e5
mov ebx, dword [edi + 0x18]
jmp 0x102890e7
xor ebx, ebx
push esi
call fcn.10281a0f
pop ecx
jmp 0x10289153
test ecx, ecx
jg 0x102890bc
jl 0x102890fa
test eax, eax
jae 0x102890bc
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.102886f9
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1028911a
cmp byte [edi + 0x1c], 0
je 0x102890bc
jmp 0x1028914b
push ebx
call fcn.102716d5
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x102890bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x10289153
cmp byte [edi + 0x1c], 0
je 0x10289150
mov ebx, dword [edi + 0x18]
jmp 0x10289153
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.102886f9
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1028b3fe
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x1028b49b
push ebx
push esi
call fcn.1028b3c7
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.10287b77
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1028b448
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1028b49a
push edi
push eax
call fcn.10281a49
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1028b468
call fcn.10281a0f
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1028b499
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.10287b77
add esp, 0x20
test eax, eax
jne 0x1028b487
push edi
call fcn.10281a0f
jmp 0x1028b48f
push ebx
call fcn.10281a0f
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x1028b49e
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x1028b4af
pop esi
ret
push ebx
push edi
push esi
call fcn.1028b3c7
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.10281a49
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x1028b4d7
push ebx
push esi
push edi
call fcn.10266230
add esp, 0xc
push 0
call fcn.10281a0f
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x1028bc31
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1028b74c

Function at 0x1028f7e7
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.10282e4e
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1028f856
cmp esi, dword [ebp - 4]
je 0x1028f851
cmp dword [ebp + 0xc], 0
je 0x1028f851
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x1028f82e
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.1028f339
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x1028f858
xor eax, eax
inc eax
jmp 0x1028f858
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x1028f8bd
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x1032e6c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.10282e4e
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.10282e4e
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x1028f934
cmp word [ecx], dx
je 0x1028f934
mov eax, dword [0x10301f8c]
push edi
dec eax
push eax
push 0x10301e78
call fcn.1028f85c
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x1028f9a7
cmp word [eax], dx
je 0x1028f9a7
mov eax, dword [edi]
test eax, eax
je 0x1028f958
cmp word [eax], dx
je 0x1028f958
lea eax, [ebp - 0x10]
push eax
call fcn.1028f23f
jmp 0x1028f961
lea eax, [ebp - 0x10]
push eax
call fcn.1028f2da
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x1028f9d1
mov eax, dword [0x10301e74]
push dword [ebp - 0x14]
dec eax
push eax
push 0x10301b68
call fcn.1028f85c
add esp, 0xc
test al, al
je 0x1028f9d1
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x1028f99c
cmp word [eax], di
je 0x1028f99c
lea eax, [ebp - 0x10]
push eax
call fcn.1028f23f
pop ecx
jmp 0x1028f9d3
lea eax, [ebp - 0x10]
push eax
call fcn.1028f2da
jmp 0x1028f999
mov eax, dword [edi]
test eax, eax
je 0x1028f9be
cmp word [eax], dx
je 0x1028f9be
lea eax, [ebp - 0x10]
push eax
call fcn.1028f1f4
pop ecx
jmp 0x1028f9d1
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x1028fa9c
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.1028f6e1
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x1028fa9c
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x1028fa9c
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x1028fa9c
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1028fa29
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.102861d3
test ebx, ebx
je 0x1028fa97
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.102861d3
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1028fa9c
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1028fa9c
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.10293229
add esp, 0x10
xor eax, eax
inc eax
jmp 0x1028fa9e
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1026465b
leave
ret
Function at 0x10297e10
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x14]
mov eax, 1
push esi
push edi
mov ecx, 0x3020100
mov edx, dword [ebp + 0x10c]
mov dword [ebp + 0x114], 0x3020100
add ecx, 0x4040404
mov dword [ebp + eax*4 + 0x114], ecx
inc eax
cmp eax, edx
jbe 0x10297e32
mov ebx, dword [esp + 0x18]
xor edi, edi
xor esi, esi
test ebx, ebx
je 0x10297e8a
mov edx, dword [esp + 0x14]
movzx eax, byte [edx + esi]
or edi, eax
mov cl, byte [eax + ebp + 0x114]
mov byte [edx + esi], cl
mov byte [ebp + 0x113], cl
nop word [eax + eax]
mov cl, byte [eax + ebp + 0x113]
mov edx, eax
sub eax, 1
mov byte [edx + ebp + 0x114], cl
jns 0x10297e70
inc esi
cmp esi, ebx
jb 0x10297e50
shr edi, 2
mov dword [ebp + 0x10c], edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x1029f480
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1029f4ad
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1029f4ad
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
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 [0x423fb0]
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.00405c20
cmp eax, ebx
je 0x402b60
push ebx
push dword [0x423fb0]
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 [0x423fb0], 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 0x402ee7
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 0x402f04
mov dword [ebp - 8], 0x8000
and dword [ebp - 4], 0
mov ebx, edi
test edi, edi
jne 0x402f13
mov ebx, 0x40f0c0
mov eax, dword [ebp + 8]
test eax, eax
jl 0x402f28
mov ecx, dword [0x423f58]
add ecx, eax
push ecx
call fcn.00403116
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.004030e4
test eax, eax
je 0x40308f
test byte [ebp + 0x17], 0x80
je 0x403078
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x40aff0
mov dword [ebp - 0xc], eax
call fcn.00405cfa
and dword [ebp + 0x14], 0x7fffffff
mov eax, dword [ebp + 0x14]
mov dword [ebp + 8], eax
jle 0x4030da
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x402f78
mov esi, dword [ebp + 0x14]
mov edi, 0x40b0c0
push esi
push edi
call fcn.004030e4
test eax, eax
je 0x40308f
sub dword [ebp + 0x14], esi
mov dword [0x40b008], edi
mov dword [0x40b00c], esi
mov eax, dword [ebp - 8]
mov ecx, 0x40aff0
mov dword [0x40b010], ebx
mov dword [0x40b014], eax
call fcn.00405d1a
test eax, eax
mov dword [ebp - 0x14], eax
jl 0x403070
mov esi, dword [0x40b010]
sub esi, ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x409234], 1
mov edi, eax
je 0x40301a
sub eax, dword [ebp - 0xc]
cmp eax, 0xc8
ja 0x402fe7
cmp dword [ebp + 0x14], 0
jne 0x40301a
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.00404cee
mov dword [ebp - 0xc], edi
xor eax, eax
cmp esi, eax
je 0x403065
cmp dword [ebp + 0x10], eax
jne 0x403043
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 0x403074
cmp dword [ebp - 0x10], esi
jne 0x403074
add dword [ebp - 4], esi
jmp 0x403059
sub dword [ebp - 8], esi
add dword [ebp - 4], esi
cmp dword [ebp - 8], 1
mov ebx, dword [0x40b010]
jl 0x4030da
cmp dword [ebp - 0x14], 1
jne 0x402f9b
jmp 0x4030da
cmp dword [ebp + 0x14], eax
jg 0x402f6b
jmp 0x4030da
push 0xfffffffffffffffc
jmp 0x403091
push 0xfffffffffffffffe
jmp 0x403091
test edi, edi
je 0x4030cf
cmp dword [ebp + 0x14], esi
jge 0x403084
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.004030e4
test eax, eax
jne 0x4030d7
push 0xfffffffffffffffd
pop eax
jmp 0x4030dd
mov esi, dword [ebp - 8]
cmp dword [ebp + 0x14], esi
jge 0x40309f
mov esi, dword [ebp + 0x14]
mov edi, 0x40b0c0
push esi
push edi
call fcn.004030e4
test eax, eax
je 0x40308f
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 0x403074
cmp esi, dword [ebp + 0x10]
jne 0x403074
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x403094
jmp 0x4030da
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x4051a7
Capabilities:
Create process on windows

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

Function at 0x40526c
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.0040550e
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], eax
test cl, 8
je 0x4052a2
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x423f88], eax
jmp 0x405427
mov dword [ebp + 8], ecx
push edi
and dword [ebp + 8], 1
je 0x4052bd
test eax, eax
je 0x4053d2
test cl, 2
je 0x4053d2
mov esi, 0x421518
push ebx
push esi
call fcn.0040593a
cmp dword [ebp + 8], 0
je 0x4052dc
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x4052e2
push ebx
call fcn.00405474
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 0x4053c8
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.00405458
cmp byte [eax], 0
je 0x405333
cmp byte [ebp - 0x18], 0
je 0x405333
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x405349
mov al, byte [esi + 1]
test al, al
je 0x4053a7
cmp al, 0x2e
jne 0x405349
cmp byte [esi + 2], 0
je 0x4053a7
push esi
push edi
call fcn.0040593a
test byte [ebp - 0x148], 0x10
je 0x40536e
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4053a7
push dword [ebp + 0xc]
push ebx
call fcn.0040526c
jmp 0x4053a7
push ebx
call fcn.004055f2
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40539f
test byte [ebp + 0xc], 4
je 0x405397
push ebx
push 0xfffffffffffffff1
call fcn.00404cee
push 0
push ebx
call fcn.00405688
jmp 0x4053a7
inc dword [0x423f88]
jmp 0x4053a7
push ebx
push 0xfffffffffffffff2
call fcn.00404cee
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405311
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x4053d2
and byte [edi - 1], 0
xor esi, esi
pop edi
cmp dword [ebp + 8], esi
je 0x405427
cmp dword [ebp - 8], esi
jne 0x4053e7
inc dword [0x423f88]
jmp 0x405427
push ebx
call fcn.00405be2
test eax, eax
je 0x405427
push ebx
call fcn.0040542d
push ebx
call fcn.004055f2
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x40541f
test byte [ebp + 0xc], 4
je 0x4053df
push ebx
push 0xfffffffffffffff1
call fcn.00404cee
push esi
push ebx
call fcn.00405688
jmp 0x405427
push ebx
push 0xffffffffffffffe5
call fcn.00404cee
pop esi
pop ebx
leave
ret 8
Function at 0x40550e
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x421918
push esi
call fcn.0040593a
push esi
call fcn.004054c1
mov edi, eax
test edi, edi
jne 0x40552f
xor eax, eax
jmp 0x405581
push edi
call fcn.00405b49
test byte [0x423f10], 0x80
je 0x405548
mov al, byte [edi]
test al, al
je 0x40552b
cmp al, 0x5c
je 0x40552b
sub edi, esi
jmp 0x405560
call fcn.00405be2
test eax, eax
je 0x40555a
test byte [eax], 0x10
je 0x40552b
push esi
call fcn.00405474
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x40554c
call fcn.0040542d
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 0x4055f2
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 0x40560e
and al, 0xfe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x405611
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 0x405640
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 0x405684
test edi, edi
jne 0x40564b
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x40567e
Function at 0x405688
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.00405c20
test eax, eax
mov esi, dword [esp + 0x18]
je 0x4056ac
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x4057e5
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x4226a0], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x4226a0
je 0x4056f0
push 1
push 0
push esi
call fcn.00405611
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x4057eb
cmp eax, edi
jg 0x4057eb
mov esi, 0x422118
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x4057eb
cmp eax, edi
jg 0x4057eb
push esi
push ebp
push str._s_s_r_n
push 0x421d18
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x423f08]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.0040595c
push 4
push 0xc0000000
push esi
call fcn.00405611
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x4057e5
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 0x4057de
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 0x4057de
cmp edi, dword [esp + 0x18]
jne 0x4057de
push str._Rename__r_n
push esi
call fcn.00405586
test eax, eax
jne 0x4057f2
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.0040593a
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x421d18
push eax
call fcn.004055d2
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 [0x423f90]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x409388
push eax
call fcn.00405586
test eax, eax
je 0x4057a9
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x405819
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x40580e
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x4057ab
Function at 0x405821
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 0x405892
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 0x405881
cmp dword [ebp + 0x14], 1
je 0x405883
cmp dword [ebp + 0x14], 2
je 0x405883
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