joyce8/EMBER2024-capa huggingface dataset:
Function at 0x475b80
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bf0d0
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x4f7108]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
mov dword [edi], vtable.CoreTech::CBaseIniReader.0
mov dword [ebp - 4], 0
call fcn.0040583a
mov ebx, eax
test ebx, ebx
je 0x475ce3
mov ecx, dword [ebx]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x4c53b4]
mov ecx, ebx
call esi
add eax, 0x10
mov dword [edi + 4], eax
mov dword [ebp - 4], 1
call fcn.0040583a
mov ebx, eax
test ebx, ebx
je 0x475ce3
mov ecx, dword [ebx]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x4c53b4]
mov ecx, ebx
call esi
add eax, 0x10
mov dword [edi + 8], eax
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi], vtable.CoreTech::CObfuscatedIniReader.0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0x11
mov dword [edi + 0x34], 0
mov dword [edi + 0x38], 0xa
mov dword [edi + 0x3c], 0
mov dword [edi + 0x40], 0
mov dword [edi + 0x20], 0x3f400000
mov dword [edi + 0x24], 0x3e800000
mov dword [edi + 0x28], 0x40100000
mov dword [edi + 0x2c], 0x26
mov dword [edi + 0x30], 0
mov al, byte [ebp + 8]
mov dword [edi + 0x44], 0
mov dword [edi + 0x48], 0
mov dword [edi + 0x4c], 0x11
mov dword [edi + 0x64], 0
mov dword [edi + 0x68], 0xa
mov dword [edi + 0x6c], 0
mov dword [edi + 0x70], 0
mov dword [edi + 0x50], 0x3f400000
mov dword [edi + 0x54], 0x3e800000
mov dword [edi + 0x58], 0x40100000
mov dword [edi + 0x5c], 0x26
mov dword [edi + 0x60], 0
mov byte [edi + 0x74], al
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.0040560b
int3
Function at 0x476f40
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x476f7b
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 0
push 0x8000
push 0x4e3d30
call sub.SHELL32.dll_SHGetKnownFolderPath
mov esi, dword [ebp - 4]
test eax, eax
jns 0x476f88
test esi, esi
je 0x476f7b
push esi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
pop edi
mov eax, 0x57
pop esi
mov esp, ebp
pop ebp
ret 8
push 0xffffffffffffffff
push esi
push dword [ebp + 0xc]
push edi
call fcn.0048dff8
add esp, 0x10
mov edi, eax
test esi, esi
je 0x476fa4
push esi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x477e30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 8
push esi
mov esi, ecx
test eax, eax
je 0x477efe
xor ecx, ecx
cmp cx, word [eax]
je 0x477efe
cmp dword [esi + 0x28], ecx
je 0x477e60
mov eax, 0xb7
pop esi
mov esp, ebp
pop ebp
ret 8
push ebx
push edi
mov edi, dword [ebp + 0xc]
xor ebx, ebx
push ebx
push 0xa0
push edi
push ebx
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [esi + 0x28]
mov dword [esi + 0x28], eax
test ecx, ecx
je 0x477e96
cmp ecx, 0xffffffff
je 0x477e96
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x28]
cmp eax, 0xffffffff
jne 0x477eb3
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
mov ebx, eax
mov dword [esi + 0x28], 0
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 8
cmp edi, 3
jne 0x477ed0
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop edi
mov eax, ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 8
cmp edi, 2
je 0x477eda
cmp edi, 1
jne 0x477ef3
push 0
lea ecx, [ebp - 8]
mov word [ebp - 4], 0xfeff
push ecx
push 2
lea ecx, [ebp - 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
mov eax, ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 8
mov eax, 0x57
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x479490
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
push edi
xor edi, edi
mov dword [ebp - 4], esi
mov dword [ebp - 8], edi
mov eax, dword [esi + 0x34]
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], edi
test eax, eax
je 0x4794bc
push 0x1b58
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [esi + 0x54]
mov ebx, 0x57
mov ecx, esi
call dword [0x4c53b4]
mov ecx, dword [ebp - 4]
call esi
mov esi, dword [ebp - 4]
test al, al
je 0x479589
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x479589
xor ecx, ecx
cmp cx, word [eax]
je 0x479589
mov ecx, esi
call fcn.00477f10
mov ebx, eax
test ebx, ebx
je 0x47950b
cmp ebx, 0xb7
jne 0x479589
lea eax, [ebp - 8]
mov ecx, esi
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004765d0
mov edi, dword [ebp - 8]
mov ebx, eax
test ebx, ebx
jne 0x479589
test edi, edi
jne 0x47953b
lea ebx, [eax + 0xe]
jmp 0x479589
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x479540
sub ecx, edx
lea eax, [ebp - 0x10]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edi
push dword [esi + 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test byte [esi + 0x44], 1
mov dword [ebp - 0xc], eax
je 0x47957d
xor ecx, ecx
cmp cx, word [edi]
je 0x47957d
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x479589
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [esi + 0x28]
mov dword [esi + 0x28], 0
test eax, eax
je 0x4795a3
cmp eax, 0xffffffff
je 0x4795a3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x4795b0
push edi
call fcn.0048cf17
add esp, 4
mov eax, dword [esi + 0x34]
test eax, eax
je 0x4795be
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0x14
Function at 0x47cb60
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bf8cd
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
mov eax, dword [0x4f7108]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 0
push 0x8000
push 0x4e3d30
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
jns 0x47cbbd
mov eax, 0x57
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 4
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0
test esi, esi
jne 0x47cbd2
xor ecx, ecx
jmp 0x47cbe6
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x47cbd7
sub ecx, edx
sar ecx, 1
push ecx
mov ecx, dword [ebp + 8]
push esi
call fcn.0040b5b5
test esi, esi
je 0x47cbfb
push esi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x49c421
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4cb00c
push 0x4cb004
push str.FlsAlloc
push 0x1e
call fcn.0049c24e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x49c455
push dword [ebp + 8]
mov ecx, esi
call dword [0x4c53b4]
call esi
jmp 0x49c45b
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x49c49f
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4cb01c
push 0x4cb014
push str.FlsGetValue
push 0x20
call fcn.0049c24e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x49c4d6
push dword [ebp + 8]
mov ecx, esi
call dword [0x4c53b4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x49ebc0
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0049ea31
Function at 0x4a011f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0047ef90
mov eax, dword [0x4f7108]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0049d6c4
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4a0161
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4a02bd
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0047ecc0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x501f08]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.0049fcb4
mov ecx, dword [esi*4 + 0x501f08]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x4a02b6
cmp eax, dword [edi + ecx + 0x24]
jne 0x4a02b6
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a02b6
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0049fcb4
add esp, 0x14
test edx, edx
jl 0x4a02b6
jg 0x4a022c
test eax, eax
jb 0x4a02b6
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4a02b6
jl 0x4a0246
cmp dword [ebp - 0x1008], eax
ja 0x4a02b6
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4a0264
test ebx, ebx
je 0x4a029d
cmp ecx, edi
jae 0x4a029d
mov al, byte [ecx]
cmp al, 0xd
jne 0x4a027e
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4a028a
cmp byte [ecx + 1], 0xa
jne 0x4a028a
inc ecx
jmp 0x4a028a
movzx eax, al
movsx eax, byte [eax + 0x4fb6a8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4a0264
cmp edx, ebx
jne 0x4a0264
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4a02bb
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0047e22a
leave
ret
Function at 0x4a035c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x501f08]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4a039c
cmp byte [ebx], 0xa
jne 0x4a039c
or byte [eax + edi + 0x28], 4
jmp 0x4a03a1
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4a049f
mov al, byte [edx]
cmp al, 0x1a
je 0x4a0481
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4a03d0
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4a03f5
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4a03ff
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x4a03b2
jmp 0x4a049f
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a047c
cmp dword [ebp - 0xc], 0
je 0x4a047c
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x501f08]
test byte [eax + edi + 0x28], 0x48
je 0x4a0456
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4a0441
mov byte [esi], dl
jmp 0x4a0452
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x501f08]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4a049f
cmp byte [ebp - 1], 0xa
jne 0x4a0465
cmp esi, ebx
jne 0x4a0465
mov byte [esi], 0xa
jmp 0x4a049e
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0049fcd2
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4a049f
mov byte [esi], 0xd
jmp 0x4a049e
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x501f08]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a049b
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a049f
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4a04a8
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x501f08]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4a04eb
cmp word [esi], dx
jne 0x4a04eb
or byte [edi + eax + 0x28], 4
jmp 0x4a04f0
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x4a0643
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x4a0623
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4a0532
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4a0568
cmp eax, edx
jae 0x4a0574
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x4a050a
jmp 0x4a0643
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a061f
cmp dword [ebp - 0x14], 0
je 0x4a061f
mov eax, dword [ebx*4 + 0x501f08]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4a05f7
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x4a05c0
mov word [esi], cx
jmp 0x4a05f3
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x501f08]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x501f08]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x501f08]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4a0643
pop ebx
cmp word [ebp - 4], bx
jne 0x4a0608
cmp esi, dword [ebp + 0xc]
jne 0x4a0608
mov word [esi], bx
jmp 0x4a0640
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0049fcd2
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4a0643
push 0xd
jmp 0x4a063c
mov ecx, dword [ebx*4 + 0x501f08]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a063a
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a0643
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4a20ff
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x4f7108]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x4a214a
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.004a229e
test al, al
jne 0x4a2144
sub edx, 2
cmp edx, edi
jne 0x4a212a
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x4a216c
lea eax, [edi + 2]
cmp edx, eax
je 0x4a216c
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.004a204b
add esp, 0x10
jmp 0x4a2266
push esi
lea ecx, [ebp - 0x255]
call fcn.004a229e
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4a21af
push dword [ebp - 0x25c]
jmp 0x4a215c
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x4a21ec
cmp word [ebp - 0x226], 0
je 0x4a220d
cmp word [ebp - 0x226], ax
jne 0x4a21ec
cmp word [ebp - 0x224], 0
je 0x4a220d
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.004a204b
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4a2259
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x4a21c6
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x4a2241
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x4a2266
push 0x4a1e7b
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004aa7f0
add esp, 0x10
jmp 0x4a2236
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047e22a
leave
ret

Function at 0x4a2b8a
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4a2b9b
pop esi
ret
push ebx
push edi
push esi
call fcn.004a2b53
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0049c855
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4a2bc3
push ebx
push esi
push edi
call fcn.00483a80
add esp, 0xc
push 0
call fcn.0049c81b
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x4a2f87
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004a2bd8
Function at 0x4ab5c5
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]
push dword [ebp + 0xc]
push ebx
call fcn.004ab541
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4ab73d
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4ab73d
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4ab6ec
jg 0x4ab61e
test eax, eax
je 0x4ab6e2
push 1
push 0x1000
call fcn.0049dc0d
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4ab644
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x4ab6d9
push 0x8000
push ebx
call fcn.00498c27
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x4ab670
jg 0x4ab66b
cmp ecx, 0x1000
jb 0x4ab670
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0049f88b
add esp, 0x10
cmp eax, 0xffffffff
je 0x4ab6b5
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 0x4ab66b
jl 0x4ab69c
test ecx, ecx
jne 0x4ab65d
push dword [ebp - 0xc]
push ebx
call fcn.00498c27
push esi
call fcn.0049c81b
add esp, 0xc
xor edi, edi
jmp 0x4ab74e
cmp byte [edi + 0x24], 0
je 0x4ab6cc
cmp dword [edi + 0x20], 5
jne 0x4ab6cc
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4ab6d7
mov edi, dword [edi + 0x18]
jmp 0x4ab6d9
xor edi, edi
push esi
call fcn.0049c81b
pop ecx
jmp 0x4ab74e
test ecx, ecx
jg 0x4ab6ae
jl 0x4ab6ec
test eax, eax
jae 0x4ab6ae
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0049fcd2
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4ab70f
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4ab6ae
jmp 0x4ab746
push ebx
call fcn.004a3410
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4ab6ae
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x4ab74e
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4ab74b
mov edi, dword [edi + 0x18]
jmp 0x4ab74e
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0049fcd2
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4acd40
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
push dword [ebp + 8]
mov ebx, ecx
lea ecx, [ebp - 4]
mov dword [ebp - 8], ebx
call fcn.004abf30
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x14]
push edi
push dword [esi]
push dword [ebp + 0x10]
push 0
push dword [ebp - 4]
push dword [ebx + 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
cmp ebx, 0xea
jne 0x4acdb3
push dword [esi]
call fcn.004686d0
mov dword [esi], 0
push 0x4c637c
push dword [edi]
call fcn.0047ecb3
add esp, 0xc
mov dword [esi], eax
push edi
push eax
push dword [ebp + 0x10]
mov eax, dword [ebp - 8]
push 0
push dword [ebp - 4]
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4acdda
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4c53b4]
mov ecx, edi
call esi
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4ace40
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c01a5
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4f7108]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, ecx
mov dword [ebp - 0x18], edx
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4acf8a
mov ebx, dword [ebp + 0x14]
cmp ebx, 1
jb 0x4acf8a
xor esi, esi
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], esi
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], esi
cmp ecx, 1
jne 0x4acedf
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push ebx
push eax
mov ecx, edx
call fcn.004ac4d0
mov ebx, eax
test ebx, ebx
jne 0x4acefb
mov esi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x14]
mov dword [ebp + 0x10], esi
lea eax, [ebx + 0x20]
push eax
mov dword [ebp - 0x1c], eax
call fcn.0047ea3c
mov edi, eax
add esp, 4
mov dword [ebp - 0x20], edi
mov byte [ebp - 4], 1
test edi, edi
jne 0x4acf1d
lea ebx, [eax + 8]
jmp 0x4acf62
cmp ecx, 7
jne 0x4acebb
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push ebx
push eax
mov ecx, edx
call fcn.004ac310
mov ebx, eax
test ebx, ebx
je 0x4aceb2
mov esi, dword [ebp - 0x10]
push esi
call fcn.004686d0
add esp, 4
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 0x10
mov ecx, dword [ebp - 0x18]
lea eax, [ebx + 0x20]
push eax
push edi
push dword [ebp + 0xc]
push ebx
push dword [ebp + 0x10]
call fcn.004ac900
mov ebx, eax
test ebx, ebx
jne 0x4acf62
push dword [ebp + 8]
lea ecx, [ebp - 0x14]
call fcn.004abf30
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
push edi
push 3
push ebx
push dword [ebp - 0x14]
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [ebp - 0x14]
mov ebx, eax
call fcn.004ac140
push edi
call fcn.004686d0
add esp, 4
push esi
call fcn.004686d0
add esp, 4
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 0x10
mov eax, 0x57
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x4b4c35
xor ecx, ecx
cmp cx, word [eax]
je 0x4b4c35
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4b4c35
test al, 0x10
je 0x4b4c35
mov al, 1
pop ebp
ret
xor al, al
pop ebp
ret