joyce8/EMBER2024-capa huggingface dataset:
Function at 0x460690
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2c10
call fcn.0044abc0
mov eax, dword [0x4d7204]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c10], eax
test eax, eax
je 0x4607fd
cmp dword [ebp + 0xc], 0
je 0x4607fd
push ebx
push esi
xor ebx, ebx
xor esi, esi
push edi
nop dword [eax]
push esi
push 0x4bf5ec
lea eax, [ebp - 0x104]
push 0x100
push eax
call fcn.00460c10
add esp, 0x10
lea eax, [ebp - 0x104]
push 0
push 0
push 3
push 0
push 3
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4607e0
push 0x2710
xorps xmm0, xmm0
mov dword [ebp - 0x2c0c], 0
lea eax, [ebp - 0x2bfc]
movq qword [ebp - 0x2c08], xmm0
push 0
push eax
mov dword [ebp - 0x2c00], 0
mov dword [ebp - 0x2c08], 0
mov dword [ebp - 0x2c04], 0
call fcn.004696a0
add esp, 0xc
lea eax, [ebp - 0x2c0c]
push 0
push eax
push 0x2710
lea eax, [ebp - 0x2bfc]
push eax
push 0xc
lea eax, [ebp - 0x2c08]
push eax
push 0x2d1400
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4607d5
push 0x3e8
lea eax, [ebp - 0x4ec]
push 0
push eax
call fcn.004696a0
lea eax, [ebp - 0x4ec]
push eax
push 1
push dword [ebp - 0x2be4]
lea eax, [ebp - 0x2bfc]
push eax
call fcn.004619a0
add esp, 0x1c
lea eax, [ebp - 0x4ec]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x2c10]
call fcn.00460ba0
test eax, eax
mov eax, 1
cmove ebx, eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x4607ea
inc esi
cmp esi, 0x10
jl 0x4606d0
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044ab64
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.0044ab64
mov esp, ebp
pop ebp
ret
Function at 0x460810
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x4d7204]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
test ebx, ebx
je 0x4608f8
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004696a0
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edx, eax
test edx, edx
je 0x4608f8
mov ecx, ebx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x460867
sub ecx, esi
mov eax, 0x103
sar ecx, 1
sub eax, ecx
cmp edx, eax
jae 0x4608f8
push edi
lea edi, [ebp - 0x20c]
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x460890
mov eax, dword [0x4bf5dc]
mov esi, ebx
mov dword [edi], eax
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x4608a5
lea edi, [ebp - 0x20c]
sub ebx, esi
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4608c0
mov ecx, ebx
lea eax, [ebp - 0x20c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044ab64
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
xor ecx, ebp
pop ebx
call fcn.0044ab64
mov esp, ebp
pop ebp
ret
Function at 0x460910
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x290
mov eax, dword [0x4d7204]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x84]
push edi
push 0x80
push 0
push eax
call fcn.004696a0
push 0x80
lea eax, [ebp - 0x84]
push eax
push esi
call fcn.0045fdd0
lea ecx, [ebp - 0x188]
mov edi, esi
mov eax, ecx
add esp, 0x18
mov edx, 0x104
sub edi, eax
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x46097a
mov al, byte [edi + ecx]
test al, al
je 0x46097a
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x460961
lea eax, [ecx - 1]
test edx, edx
cmovne eax, ecx
mov ecx, 0x104
mov byte [eax], 0
lea eax, [ebp - 0x188]
cmp byte [eax], 0
je 0x46099b
inc eax
sub ecx, 1
jne 0x460990
mov edx, 0x104
mov edi, ecx
mov eax, edx
sub eax, ecx
neg edi
sbb edi, edi
and edi, eax
test ecx, ecx
je 0x4609f0
lea ecx, [ebp - 0x188]
lea ecx, [ecx + edi]
sub edx, edi
je 0x4609e5
lea edi, [ebp - 0x84]
mov eax, SysReAllocString
sub edi, ecx
push ebx
nop dword [eax + eax]
test eax, eax
je 0x4609e4
mov bl, byte [edi + ecx]
test bl, bl
je 0x4609e4
mov byte [ecx], bl
dec eax
inc ecx
sub edx, 1
jne 0x4609d0
pop ebx
test edx, edx
lea eax, [ecx - 1]
cmovne eax, ecx
mov byte [eax], 0
push 0x100
lea eax, [ebp - 0x288]
mov dword [ebp - 0x290], 1
push 0
push eax
call fcn.004696a0
add esp, 0xc
mov dword [ebp - 0x28c], 0x100
lea eax, [ebp - 0x28c]
push eax
lea eax, [ebp - 0x288]
push eax
lea eax, [ebp - 0x290]
push eax
push 0x4bf6e4
push str.SoftwareComMaster
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHGetValueA]
mov edi, dword [sym.imp.SHLWAPI.dll_SHSetValueA]
test eax, eax
jne 0x460aaa
lea eax, [ebp - 0x288]
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x460a74
test cl, cl
je 0x460a70
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x460a74
add eax, 2
add esi, 2
test cl, cl
jne 0x460a54
xor eax, eax
jmp 0x460a79
sbb eax, eax
or eax, 1
test eax, eax
je 0x460aaa
lea ecx, [ebp - 0x288]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x460a86
sub ecx, edx
lea eax, [ebp - 0x288]
push ecx
push eax
push 1
push str.mid_old
push str.SoftwareComMaster
push reloc.OLEAUT32.dll_SysReAllocString
call edi
lea ecx, [ebp - 0x188]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x460ab3
sub ecx, edx
lea eax, [ebp - 0x188]
push ecx
push eax
push 1
push 0x4bf6e4
push str.SoftwareComMaster
push reloc.OLEAUT32.dll_SysReAllocString
call edi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0044ab64
mov esp, ebp
pop ebp
ret

Function at 0x463210
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.00462d80
Function at 0x4644f0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x499ac3
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x4d7204]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x80], 0
mov dword [edi], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x7c], 0
lea eax, [ebp - 0x7c]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.004409f0
mov eax, dword [ebp - 0x80]
add esp, 8
test eax, eax
je 0x464703
mov esi, dword [sym.imp.OLEAUT32.dll_VariantInit]
push eax
call esi
test eax, eax
je 0x464703
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x464703
push eax
call esi
test eax, eax
je 0x464703
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x88], 0
push 0x201
push dword [ebp - 0x80]
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 2
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00464440
mov esi, dword [ebp - 0x90]
test eax, eax
jne 0x4646f4
push 0x64
lea eax, [ebp - 0x74]
push 0
push eax
call fcn.004696a0
add esp, 0xc
mov dword [ebp - 0x78], 0x64
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x84]
push eax
push 0
push dword [ebp - 0x7c]
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4646f4
mov eax, dword [ebp - 0x84]
cmp eax, 1
je 0x46461b
cmp eax, 2
jne 0x4646f4
mov ecx, dword [ebp - 0x78]
test ecx, ecx
je 0x46463c
test cl, 1
jne 0x4646f4
mov eax, ecx
shr eax, 1
cmp word [ebp + eax*2 - 0x76], 0
je 0x464642
jmp 0x4646f4
xor eax, eax
mov word [ebp - 0x74], ax
shr ecx, 1
cmp ecx, 0x2d
jne 0x4646f4
lea ecx, [ebp - 0x78]
call fcn.00403360
lea eax, [ebp - 0x74]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x78]
call fcn.004628c0
lea eax, [ebp - 0x84]
mov dword [ebp - 0x84], 0
push eax
lea eax, [ebp - 0x20]
push 0x4c0b24
push eax
call fcn.00425010
push 0x2a
push dword [ebp - 0x78]
call fcn.00462d80
movzx eax, al
add esp, 0x14
cmp dword [ebp - 0x84], eax
jne 0x4646ec
lea edx, [ebp - 0x74]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4646a2
sub edx, ecx
lea eax, [ebp - 0x74]
sar edx, 1
mov ecx, ebx
push edx
push eax
call fcn.00462670
push dword [0x4fc96c]
lea eax, [ebp - 0x74]
push dword [0x4fc968]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x4646dd
mov dword [edi], 1
lea ecx, [ebp - 0x78]
call fcn.004049f0
mov edi, 1
jmp 0x4646f6
lea ecx, [ebp - 0x78]
call fcn.004049f0
xor edi, edi
test esi, esi
je 0x464705
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x464705
xor edi, edi
push dword [ebp - 0x7c]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call esi
push dword [ebp - 0x80]
call esi
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044ab64
mov esp, ebp
pop ebp
ret
Function at 0x464740
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push esi
mov esi, ecx
test edx, edx
jne 0x464755
lea eax, [edx + 0xd]
pop esi
pop ebp
ret 0xc
mov eax, edx
push edi
lea edi, [eax + 2]
nop dword [eax + eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x464760
sub eax, edi
sar eax, 1
lea eax, [eax*2 + 2]
push eax
push edx
push dword [ebp + 0x10]
push 0
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
pop ebp
ret 0xc
Function at 0x4677d0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
add eax, eax
mov dword [edi], 0
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
push esi
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x467841
mov eax, dword [ebp + 0xc]
cmp eax, 1
je 0x46780f
cmp eax, 2
jne 0x46782b
mov ecx, dword [ebp + 0x10]
test esi, esi
je 0x46783b
test ecx, ecx
je 0x467836
test cl, 1
jne 0x46782b
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x46783b
pop edi
mov eax, 0xd
pop esi
pop ebp
ret 0xc
xor eax, eax
mov word [esi], ax
shr ecx, 1
xor eax, eax
mov dword [edi], ecx
pop edi
pop esi
pop ebp
ret 0xc
Function at 0x48a656
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0048a316

Function at 0x48a886
Capabilities:
Create thread
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0048a78b
Function at 0x4939a0
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49a170
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4d7204]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
test edi, edi
je 0x493ae9
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x493ae9
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x493ae9
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x493ae9
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 5
push SysReAllocString
push edi
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x18], edi
cmp edi, 0xffffffff
je 0x493ad5
lea eax, [ebp - 0x20]
xorps xmm0, xmm0
push eax
push edi
movq qword [ebp - 0x20], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x493ace
cmp dword [ebp - 0x1c], ebx
jne 0x493ace
mov ecx, dword [esi + 0x10]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 4], ebx
cmp eax, ecx
ja 0x493a6d
mov dword [esi + 0x10], eax
mov ecx, esi
cmp dword [esi + 0x14], 0x10
jb 0x493a67
mov ecx, dword [esi]
mov byte [ecx + eax], 0
jmp 0x493a79
sub eax, ecx
mov ecx, esi
push 0
push eax
call fcn.0040f7c0
push 0
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push dword [ebp - 0x20]
mov ecx, esi
push 0
call fcn.00405dc0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp + 8]
jne 0x493ace
push edi
mov ebx, 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401210
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 0x10]
xor ecx, ecx
test esi, esi
jbe 0x40124c
mov edx, dword [esp + 8]
push ebx
push ebp
push edi
mov edi, dword [esp + 0x18]
mov eax, dword [edx]
movzx ebx, byte [ecx + edi]
mov ebp, eax
and ebp, 0xff
xor ebx, ebp
mov ebp, dword [ebx*4 + 0x4240f8]
shr eax, 8
xor eax, ebp
inc ecx
cmp ecx, esi
mov dword [edx], eax
jb 0x401226
pop edi
pop ebp
pop ebx
pop esi
ret

Function at 0x401560
Capabilities:
Get file size

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [eax + 8]
push ebx
push edi
mov edi, dword [eax + 4]
xor ebx, ebx
cmp edi, ecx
je 0x4015f6
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
mov edi, edi
mov eax, dword [edi]
cmp eax, 1
jne 0x401593
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x401593
add ebx, dword [edi + 8]
jmp 0x4015e6
cmp eax, 2
jne 0x4015a1
mov eax, dword [edi + 8]
lea ebx, [ebx + eax + 4]
jmp 0x4015e6
cmp eax, 3
jne 0x4015e6
mov eax, dword [edi + 4]
test eax, eax
je 0x4015e6
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call ebp
mov esi, eax
test esi, esi
je 0x4015e6
cmp esi, 0xffffffff
je 0x4015e6
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x3200000
jae 0x4015df
add ebx, eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 8]
add edi, 0xc
cmp edi, eax
jne 0x401580
pop esi
pop ebp
pop edi
mov eax, ebx
pop ebx
ret 4
Function at 0x401600
Capabilities:
Get file size
Read file on windows

Disassembly:
mov edx, dword [esp + 8]
sub esp, 8
test edx, edx
push edi
je 0x4017b9
mov edi, dword [esp + 0x18]
test edi, edi
je 0x4017b9
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 8]
push ebx
push ebp
mov ebp, dword [eax + 4]
xor ebx, ebx
cmp ebp, ecx
mov dword [esp + 0x10], ebp
je 0x4017ae
push esi
jmp 0x401640
mov edi, dword [esp + 0x24]
lea ecx, [ecx]
mov eax, dword [ebp]
cmp eax, 1
jne 0x401676
mov esi, dword [ebp + 4]
test esi, esi
je 0x401676
mov ecx, dword [ebp + 8]
lea eax, [ecx + ebx]
cmp eax, edi
ja 0x4017ad
mov eax, ecx
shr ecx, 2
lea edi, [ebx + edx]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add ebx, dword [ebp + 8]
jmp 0x401784
cmp eax, 2
jne 0x4016b9
mov eax, dword [ebp + 8]
lea ecx, [eax + ebx + 4]
cmp ecx, edi
ja 0x4017ad
mov dword [ebx + edx], eax
mov esi, dword [ebp + 4]
test esi, esi
je 0x4016ad
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x4016ad
mov eax, ecx
shr ecx, 2
lea edi, [ebx + edx + 4]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 8]
lea ebx, [ebx + ecx + 4]
jmp 0x401784
cmp eax, 3
jne 0x401784
mov eax, dword [ebp + 4]
test eax, eax
je 0x401784
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
test edi, edi
je 0x401780
cmp edi, 0xffffffff
je 0x401780
mov esi, dword [esp + 0x24]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push edi
sub esi, ebx
call ebp
cmp esi, eax
jae 0x401712
mov ebp, esi
jmp 0x401719
push 0
push edi
call ebp
mov ebp, eax
cmp ebp, 0x3200000
jae 0x4017a6
mov eax, dword [esp + 0x24]
lea edx, [ebx + ebp]
cmp edx, eax
ja 0x4017a6
xor esi, esi
mov dword [esp + 0x10], esi
mov eax, ebp
sub eax, esi
cmp eax, 0x400
jbe 0x401746
mov eax, 0x400
mov edx, dword [esp + 0x20]
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
lea eax, [ebx + edx]
add eax, esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401773
mov eax, dword [esp + 0x10]
test eax, eax
jbe 0x401773
cmp esi, ebp
ja 0x401773
add esi, eax
jmp 0x401736
push edi
add ebx, esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 8]
add ebp, 0xc
cmp ebp, ecx
mov dword [esp + 0x14], ebp
jne 0x401639
pop esi
pop ebp
mov eax, ebx
pop ebx
pop edi
add esp, 8
ret 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebp
mov eax, ebx
pop ebx
pop edi
add esp, 8
ret 0xc
xor eax, eax
pop edi
add esp, 8
ret 0xc
Function at 0x403400
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x403419
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40342d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40344e
cmp esi, eax
jae 0x403427
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x403440
cmp esi, eax
jae 0x403427
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

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

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ebx, ebx
push eax
mov esi, ecx
mov dword [esp + 0x10], ebx
call edi
cmp eax, 0xffffffff
je 0x40c4b1
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40c421
mov esi, 1
jmp 0x40c45d
push eax
push 0x41f424
add esi, 0x84
lea ecx, [esp + 0x20]
push esi
push ecx
mov ebx, 3
call fcn.0040bf50
add esp, 0xc
push eax
lea edx, [esp + 0x1c]
push edx
call fcn.0040bf50
mov eax, dword [eax]
add esp, 0xc
push eax
call edi
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov esi, ecx
test bl, 2
je 0x40c485
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
and ebx, 0xfffffffd
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c485
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, 1
je 0x40c4a8
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c4a8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
mov eax, esi
pop esi
pop ebx
pop ecx
ret 8
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret 8
Function at 0x40c530
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Get file attributes
Set file attributes

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov eax, dword [esi]
mov ebx, dword [eax - 4]
mov edx, dword [eax - 8]
sub eax, 0x10
mov ebp, ecx
mov ecx, 1
sub ecx, ebx
mov ebx, 0x400
sub edx, ebx
or ecx, edx
push edi
jge 0x40c55f
push ebx
mov ecx, esi
call fcn.00403730
mov edi, dword [esi]
cmp dword [edi - 8], ebx
jge 0x40c570
push 0x80070057
call fcn.004033d0
mov eax, dword [esi]
mov dword [eax - 0xc], ebx
mov ecx, dword [esi]
push edi
push ebx
mov byte [ecx + 0x400], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x40c5d5
mov edx, dword [esi]
test edx, edx
jne 0x40c594
xor edi, edi
jmp 0x40c5ad
mov eax, edx
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c5a0
sub eax, edi
mov edi, eax
js 0x40c5b2
cmp edi, dword [edx - 8]
jle 0x40c5bc
push 0x80070057
call fcn.004033d0
mov edx, dword [esi]
mov dword [edx - 0xc], edi
mov eax, dword [esi]
push 7
push 0x41fa54
mov ecx, esi
mov byte [edi + eax], 0
call fcn.00403f20
mov edx, dword [esi]
test edx, edx
jne 0x40c5df
xor edi, edi
jmp 0x40c5f1
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c5e4
sub eax, edi
mov edi, eax
js 0x40c5f6
cmp edi, dword [edx - 8]
jle 0x40c600
push 0x80070057
call fcn.004033d0
mov ecx, dword [esi]
mov dword [ecx - 0xc], edi
mov edx, dword [esi]
mov byte [edi + edx], 0
mov eax, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push eax
call edi
cmp eax, 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
je 0x40c625
test al, 0x10
jne 0x40c63b
mov edx, dword [esi]
call fcn.0040b280
mov eax, dword [esi]
push 0
push eax
call ebx
test eax, eax
je 0x40c6bd
push 0x41f424
mov ecx, esi
call fcn.0040bee0
push 1
push 0x41f424
mov ecx, esi
call fcn.00403e90
mov eax, dword [ebp + 0xa4]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, esi
call fcn.00403e90
push 3
push 0x41fa50
mov ecx, esi
call fcn.00403e90
mov eax, dword [esi]
push eax
call edi
cmp eax, 0xffffffff
je 0x40c6a1
mov edx, dword [esi]
push edx
call fcn.0040b0e0
mov eax, dword [esi]
add esp, 4
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [esi]
call fcn.0040b280
mov edx, dword [esi]
push 0
push edx
call ebx
mov esi, dword [esi]
push esi
call edi
cmp eax, 0xffffffff
je 0x40c6bd
test al, 0x10
jne 0x40c6c6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret 4
Function at 0x40cc30
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
sub esp, 0x10
mov eax, dword [0x4259c0]
push ebp
push esi
push edi
mov ecx, 0x4259c0
xor ebp, ebp
call dword [eax + 0xc]
mov edi, eax
add edi, 0x10
push 0x41fad4
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], edi
call fcn.004048b0
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x40cc68
xor eax, eax
jmp 0x40cc79
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cc70
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x18]
call fcn.00403e90
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push 0x2001f
push 0
push esi
push 0x80000002
mov dword [esp + 0x34], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40cdd8
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x14]
push edx
push 0
lea ecx, [esp + 0x20]
push ecx
push 0
push 0x41fac4
mov ebp, eax
push eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40cdd8
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x40ccf6
cmp eax, 2
jne 0x40cdd8
mov eax, dword [esp + 0x14]
test eax, eax
mov dword [esp + 0x14], eax
jbe 0x40cdd8
lea edx, [esp + 0x14]
push edx
dec eax
push eax
lea ecx, [esp + 0x14]
call fcn.0040ba80
push eax
push 0x41fac4
lea ecx, [esp + 0x2c]
call fcn.0040aa00
test eax, eax
jne 0x40cdd4
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jne 0x40cd5e
lea ecx, [esp + 0x10]
call fcn.00403ae0
lea ecx, [esp + 0xc]
call fcn.00403ae0
lea ecx, [esp + 0x20]
call fcn.0040b6f0
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10
ret 8
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffffe
push ecx
lea ecx, [esp + 0x10]
call fcn.00403a80
cmp al, 0x5c
lea ecx, [esp + 0xc]
push 0x41f424
je 0x40cd88
call fcn.00404730
mov edx, dword [esp + 0x24]
push edx
jmp 0x40cd92
call fcn.00404730
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x10]
call fcn.00404730
mov edi, dword [esp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40cdd8
lea ecx, [esp + 0x10]
call fcn.00403ae0
lea ecx, [esp + 0xc]
call fcn.00403ae0
lea ecx, [esp + 0x20]
call fcn.0040b6f0
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x10
ret 8
mov edi, dword [esp + 0xc]
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cdf2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ce0c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test ebp, ebp
je 0x40ce17
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10
ret 8