joyce8/EMBER2024-capa huggingface dataset:
Function at 0x53c920
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f5447
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x705200]
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, ecx
mov dword [ebp - 0x18], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 0
push eax
push 0xf01ff
call dword [0x5fd4fc]
push eax
call dword [0x5fd054]
test eax, eax
jne 0x53c97c
xor esi, esi
jmp 0x53cabc
test edi, edi
mov dword [ebp - 0x14], 0
lea esi, [ebp - 0x14]
xorps xmm0, xmm0
cmovne esi, edi
movlpd qword [ebp - 0x20], xmm0
push 0x94
mov dword [ebp - 0x24], esi
mov dword [esi], 0x94
call fcn.0041ea8c
mov edi, eax
mov dword [ebp - 0x1c], 0x94
mov dword [ebp - 0x20], edi
mov byte [ebp - 4], 1
push dword [esi]
call fcn.0041ea8c
push dword [esi]
mov ebx, eax
push 0
push edi
call fcn.004201e0
mov esi, dword [0x5fd150]
lea eax, [edi + 4]
add esp, 0x14
mov dword [edi], 9
push eax
push str.SeRestorePrivilege
push 0
call esi
lea eax, [edi + 0x10]
push eax
push str.SeBackupPrivilege
push 0
call esi
lea eax, [edi + 0x1c]
push eax
push str.SeDebugPrivilege
push 0
call esi
lea eax, [edi + 0x28]
push eax
push str.SeSecurityPrivilege
push 0
call esi
lea eax, [edi + 0x34]
push eax
push str.SeTakeOwnershipPrivilege
push 0
call esi
lea eax, [edi + 0x40]
push eax
push str.SeImpersonatePrivilege
push 0
call esi
lea eax, [edi + 0x4c]
push eax
push str.SeSystemProfilePrivilege
push 0
call esi
lea eax, [edi + 0x58]
push eax
push str.SeShutdownPrivilege
push 0
call esi
lea eax, [edi + 0x64]
push eax
push str.SeIncreaseQuotaPrivilege
push 0
call esi
lea eax, [edi + 0x70]
push eax
push str.SeAssignPrimaryTokenPrivilege
push 0
call esi
lea eax, [edi + 0x7c]
push eax
push str.SeTcbPrivilege
push 0
call esi
lea eax, [edi + 0x88]
push eax
push str.SeTrustedCredManAccessPrivilege
push 0
call esi
lea eax, [edi + 0xc]
mov ecx, 0xc
nop
mov dword [eax], 2
lea eax, [eax + 0xc]
sub ecx, 1
jne 0x53ca80
mov eax, dword [ebp - 0x24]
push eax
push ebx
push dword [eax]
push edi
push ecx
push dword [ebp - 0x18]
call dword [section..rdata]
test eax, eax
jne 0x53cab1
push ebx
xor esi, esi
call fcn.0041e483
add esp, 4
jmp 0x53cab3
mov esi, ebx
push edi
call fcn.0041e483
add esp, 4
mov ecx, dword [ebp - 0x18]
cmp ecx, 0xffffffff
je 0x53cacf
test ecx, ecx
je 0x53cacf
push ecx
call dword [0x5fd3a0]
mov eax, esi
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.0041e475
mov esp, ebp
pop ebp
ret
Function at 0x42a5ba
Capabilities:
Get graphical window text

Disassembly:
push 0x10
mov eax, 0x44d528
call fcn.0043053c
push 0x40b
push dword [ecx + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
xor esi, esi
mov ebx, eax
push esi
push esi
push 0xe
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x10], esi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
lea esi, [eax + 1]
lea eax, [ebp - 0x10]
push eax
push esi
call fcn.00411e16
push dword [ebp - 0x1c]
and dword [ebp - 4], 0
push esi
push 0xd
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp - 0x1c]
call fcn.0040f51e
pop ecx
mov ecx, dword [ebp + 8]
push eax
push dword [ebp - 0x1c]
call fcn.0040f3cc
lea ecx, [ebp - 0x1c]
call fcn.00411f1c
call fcn.0043050a
ret 4
Function at 0x401af8
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, eax
neg esi
sbb esi, esi
lea ecx, [eax - 0x24]
and esi, ecx
cmp byte [eax + 0x1c], 0
je 0x401b3b
push 0xe801
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetDlgItem]
cmp dword [ebp + 8], 2
jne 0x401b2c
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x401b41
cmp dword [ebp + 8], 0
jne 0x401b3b
push 5
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
cmp dword [ebp + 8], 1
je 0x401b59
mov eax, dword [ebp + 0xc]
shr eax, 0x10
movsx eax, ax
push eax
movsx eax, word [ebp + 0xc]
push eax
add esi, 0x24
push esi
call fcn.00401bcc
xor eax, eax
pop esi
pop ebp
ret 8

Function at 0x402625
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40263c
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
jne 0x40264e
xor eax, eax
jmp 0x40267f
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x402671
cmp edi, eax
jae 0x40264a
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x402663
cmp edi, eax
jae 0x40264a
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret
Function at 0x40465f
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov eax, dword [0x410040]
push ebx
push esi
push edi
mov dword [ebp + 0x398], eax
call dword [0x410070]
xor esi, esi
cmp dword [ebp + 0x3a8], esi
mov ebx, eax
mov eax, dword [ebp + 0x3a4]
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x80], esi
mov dword [ebp - 0x6c], esi
je 0x4046f2
push dword [ebp + 0x3a8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
cmp edi, 0x400
jg 0x4046d3
push edi
call fcn.004044c6
test al, al
pop ecx
je 0x4046d3
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.00407740
mov eax, esp
jmp 0x4046dd
mov eax, edi
lea esi, [ebp - 0x70]
call fcn.0040451f
push ebx
push edi
push dword [ebp + 0x3a8]
mov esi, eax
call fcn.00404324
test eax, eax
jne 0x404724
xor esi, esi
lea eax, [ebp - 0x68]
cmp dword [ebp - 0x6c], eax
je 0x404702
lea eax, [ebp - 0x6c]
call fcn.004056d4
cmp dword [ebp - 0x70], esi
je 0x40471a
mov eax, dword [ebp - 0x70]
mov esi, dword [eax]
push eax
mov dword [ebp - 0x70], esi
call fcn.004068a3
test esi, esi
pop ecx
jne 0x404707
mov eax, 0x8007000e
jmp 0x4047f8
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
test edi, edi
mov dword [ebp - 0x74], edi
jne 0x404744
call fcn.004041d9
mov edi, eax
jmp 0x4047cd
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x40476c
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [ebp - 0x78], eax
jne 0x404773
call fcn.004041d9
jmp 0x4047c2
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
lea eax, [ebx + 1]
push eax
lea esi, [ebp - 0x6c]
call fcn.00404816
mov edi, dword [ebp - 0x6c]
test edi, edi
jne 0x404797
mov edi, 0x8007000e
jmp 0x4047c4
mov esi, dword [ebp - 0x78]
push dword [ebp + 0x3b4]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x6c]
mov byte [ebx + eax], 0
mov ecx, dword [ebp - 0x6c]
lea edx, [ebp - 0x80]
call fcn.00404836
mov edi, eax
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x68]
cmp dword [ebp - 0x6c], eax
je 0x4047dd
lea eax, [ebp - 0x6c]
call fcn.004056d4
cmp dword [ebp - 0x70], 0
je 0x4047f6
mov eax, dword [ebp - 0x70]
mov esi, dword [eax]
push eax
mov dword [ebp - 0x70], esi
call fcn.004068a3
test esi, esi
pop ecx
jne 0x4047e3
mov eax, edi
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x398]
call fcn.00406b52
pop edi
pop esi
pop ebx
add ebp, 0x39c
leave
ret 0x14
Function at 0x405722
Capabilities:
Set registry value

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x14]
xor esi, esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
add edi, eax
add esi, eax
cmp eax, 1
jne 0x40572a
mov eax, dword [esp + 0xc]
push esi
push dword [esp + 0x18]
push 7
push 0
push dword [esp + 0x20]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop edi
pop esi
ret 0xc

Function at 0x405759
Capabilities:
Set registry value

Disassembly:
push 4
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0xc]
push 4
push 0
push dword [esp + 0x18]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
ret 0xc

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

Disassembly:
push ebp
lea ebp, [esp - 0x98]
sub esp, 0x118
mov eax, dword [0x410040]
push ebx
push esi
push edi
push 0x2001f
push dword [ebp + 0xa0]
mov ebx, ecx
push dword [ebx]
mov dword [ebp + 0x94], eax
xor esi, esi
lea eax, [ebp - 0x70]
mov dword [ebp - 0x70], esi
call fcn.0040579e
mov edi, eax
cmp edi, esi
je 0x4058e2
cmp dword [ebp - 0x70], esi
je 0x4058de
push dword [ebp - 0x70]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
jmp 0x40594c
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
jmp 0x4058fd
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x70]
call fcn.00405892
cmp eax, esi
mov dword [ebp - 0x78], eax
jne 0x405964
lea eax, [ebp - 0x80]
push eax
push esi
push esi
push esi
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x6c]
push eax
push esi
push dword [ebp - 0x70]
mov dword [ebp - 0x74], 0x100
call edi
test eax, eax
je 0x4058ea
cmp dword [ebp - 0x70], esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x405930
push dword [ebp - 0x70]
call edi
mov dword [ebp - 0x70], esi
push dword [ebp + 0xa0]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
cmp dword [ebp - 0x70], esi
mov ebx, eax
je 0x40594a
push dword [ebp - 0x70]
call edi
mov eax, ebx
mov ecx, dword [ebp + 0x94]
pop edi
pop esi
pop ebx
call fcn.00406b52
add ebp, 0x98
leave
ret 4
cmp dword [ebp - 0x70], esi
je 0x405972
push dword [ebp - 0x70]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x78]
jmp 0x40594c
Function at 0x406bc6
Capabilities:
Terminate process

Disassembly:
push 0x11c
push 0x40e500
call fcn.004071a0
mov eax, dword [0x410040]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x4101ec]
test eax, eax
je 0x406c06
and dword [ebp - 4], 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
pop ecx
pop ecx
or dword [ebp - 4], 0xffffffff
jmp 0x406d10
mov eax, dword [ebp + 8]
dec eax
je 0x406c22
mov ebx, str.Unknown_security_failure_detected_
mov dword [ebp - 0x12c], str.A_security_error_of_unknown_cause_has_been_detected_which_has_ncorrupted_the_programs_internal_state.__The_program_cannot_safely_ncontinue_execution_and_must_now_be_terminated._n
mov edi, 0xd4
jmp 0x406c36
mov ebx, str.Buffer_overrun_detected_
mov dword [ebp - 0x12c], str.A_buffer_overrun_has_been_detected_which_has_corrupted_the_programs_ninternal_state.__The_program_cannot_safely_continue_execution_and_must_nnow_be_terminated._n
mov edi, 0xb9
mov byte [ebp - 0x20], 0
push 0x104
lea eax, [ebp - 0x124]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x406c65
push str._program_name_unknown_
lea eax, [ebp - 0x124]
push eax
call fcn.00407640
pop ecx
pop ecx
lea eax, [ebp - 0x124]
mov dword [ebp - 0x128], eax
push eax
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
call esi
add eax, 0xb
cmp eax, 0x3c
jbe 0x406cac
lea eax, [ebp - 0x124]
push eax
call esi
lea ecx, [ebp - 0x124]
sub ecx, 0x31
add eax, ecx
mov dword [ebp - 0x128], eax
push 3
push 0x40e34c
push eax
call fcn.00407300
add esp, 0xc
push dword [ebp - 0x128]
call esi
lea eax, [eax + edi + 0xc]
add eax, 3
and eax, 0xfffffffc
call fcn.00407740
mov dword [ebp - 0x18], esp
mov edi, esp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ebx, 0x40e348
push ebx
push edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
call esi
push str.Program:
push edi
call esi
push dword [ebp - 0x128]
push edi
call esi
push ebx
push edi
call esi
push dword [ebp - 0x12c]
push edi
call esi
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push edi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 3
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x40705d
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00407740
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4070f8
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x4101c4]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x4070f8
cmp eax, 1
je 0x407119
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4070f8
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4070c5
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4070f4
xor eax, eax
inc eax
jmp 0x407138
cmp edi, eax
jae 0x4070fc
xor eax, eax
jmp 0x407138
cmp eax, esi
jae 0x407103
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x4101c4]
jmp 0x40711c
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40786e
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x40789c
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x4078a3
cmp ebx, dword [eax + 4]
jae 0x4078a3
xor eax, eax
jmp 0x407a93
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4078b4
xor eax, eax
inc eax
jmp 0x407a92
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4078ca
cmp ecx, edx
jae 0x407a0f
cmp dword [eax + 4], 0
je 0x4078d3
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4078bb
cmp dword [ebp + 8], 0
je 0x4078f5
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x407a0f
cmp eax, esi
jae 0x407a0f
mov eax, dword [0x4101f0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40791a
cmp dword [esi*4 + 0x4101f8], edi
je 0x407a13
inc esi
cmp esi, eax
jl 0x407908
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x407a8f
cmp dword [ebp - 8], 0x1000000
jne 0x407a8f
test byte [ebp - 0xc], 0xcc
je 0x407998
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x407a8f
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407a8f
cmp word [eax + 0x18], 0x10b
jne 0x407a8f
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x407a8f
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x407998
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x407998
test byte [ecx + 0x27], 0x80
jne 0x407a0f
push 1
push 0x410238
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4078ac
mov ecx, dword [0x4101f0]
test ecx, ecx
mov edx, ecx
jle 0x4079cc
lea eax, [ecx*4 + 0x4101f4]
cmp dword [eax], edi
je 0x4079cc
dec edx
sub eax, 4
test edx, edx
jg 0x4079c0
test edx, edx
jne 0x4079fd
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4079d9
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4079f1
lea eax, [edx*4 + 0x4101f8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4079df
cmp ecx, 0x10
jge 0x4079fd
inc ecx
mov dword [0x4101f0], ecx
push 0
push 0x410238
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4078ac
xor eax, eax
jmp 0x407a92
test esi, esi
jle 0x4078ac
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x410238
call ebx
test eax, eax
jne 0x4078ac
cmp dword [esi*4 + 0x4101f8], edi
je 0x407a69
mov eax, dword [0x4101f0]
lea esi, [eax - 1]
test esi, esi
jl 0x407a57
cmp dword [esi*4 + 0x4101f8], edi
je 0x407a53
dec esi
jns 0x407a47
test esi, esi
jge 0x407a67
cmp eax, 0x10
jge 0x407a62
inc eax
mov dword [0x4101f0], eax
lea esi, [eax - 1]
jmp 0x407a69
je 0x407a81
xor ecx, ecx
test esi, esi
jl 0x407a81
lea eax, [ecx*4 + 0x4101f8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x407a6f
push 0
push 0x410238
call ebx
jmp 0x4078ac
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408040
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
lea ebp, [esp - 0xdc]
sub esp, 0x15c
mov eax, dword [0x410040]
mov dword [ebp + 0xd8], eax
mov eax, dword [ebp + 0xe4]
mov eax, dword [eax - 0xc]
test eax, eax
push ebx
push esi
push edi
mov dword [ebp - 0x80], ecx
je 0x408087
lea esi, [eax - 1]
lea edi, [ebp + 0xe4]
call fcn.004030ab
cmp al, 0x5c
je 0x408087
push 0x5c
mov eax, edi
call fcn.0040283b
push dword [ebp + 0xf0]
mov ebx, dword [ebp + 0xe4]
add ebx, 0xfffffff0
push ecx
mov eax, ebx
mov esi, esp
mov dword [ebp - 0x7c], ebx
call fcn.00401264
mov ecx, dword [ebp + 0xec]
add eax, 0x10
mov dword [esi], eax
call fcn.00407f43
xor esi, esi
test al, al
jne 0x40820c
inc esi
cmp dword [ebp + 0xe8], esi
jl 0x40820c
mov eax, dword [0x4100e8]
mov ecx, 0x4100e8
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov eax, ebx
mov dword [ebp - 0x74], edi
call fcn.00401264
add eax, 0x10
mov esi, 0x40e778
mov ecx, esi
mov dword [ebp - 0x70], eax
call fcn.00401084
push eax
push esi
lea eax, [ebp - 0x70]
push eax
call fcn.00402881
lea eax, [ebp - 0x68]
push eax
lea esi, [ebp - 0x70]
call fcn.00401000
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
setne dl
test dl, dl
mov dword [ebp - 0x6c], eax
je 0x4081ed
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileA]
lea eax, [ebp - 0x68]
call fcn.00407ebc
test al, al
jne 0x408149
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x6c]
call ebx
test eax, eax
setne dl
test dl, dl
jne 0x40812b
test dl, dl
je 0x4081ed
mov eax, dword [ebp + 0xe8]
dec eax
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp + 0xe4]
lea edi, [ebp + 0xe8]
call fcn.00403b26
pop ecx
lea edi, [ebp - 0x74]
call fcn.004027d1
mov eax, dword [ebp + 0xe8]
add eax, 0xfffffff0
call fcn.0040124c
push dword [ebp + 0xf0]
mov edi, dword [ebp - 0x74]
push dword [ebp + 0xec]
lea eax, [edi - 0x10]
push dword [ebp - 0x78]
push ecx
mov esi, esp
call fcn.00401264
mov ecx, dword [ebp - 0x80]
add eax, 0x10
mov dword [esi], eax
call fcn.00408040
test eax, eax
je 0x40822e
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x6c]
call ebx
test eax, eax
setne dl
test dl, dl
je 0x4081ed
lea eax, [ebp - 0x68]
call fcn.00407ebc
test al, al
jne 0x4081e5
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x6c]
call ebx
test eax, eax
setne dl
test dl, dl
jne 0x4081c7
test dl, dl
jne 0x40815b
xor esi, esi
inc esi
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x70]
add eax, 0xfffffff0
call fcn.0040124c
lea eax, [edi - 0x10]
call fcn.0040124c
mov eax, dword [ebp - 0x7c]
call fcn.0040124c
mov ecx, dword [ebp + 0xd8]
mov eax, esi
call fcn.00406b52
pop edi
pop esi
pop ebx
add ebp, 0xdc
leave
ret 0x10
xor esi, esi
jmp 0x4081f0
Function at 0x408232
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x410040]
push ebx
push esi
push edi
push str.SystemFolder
lea esi, [ebp - 0x7c]
mov dword [ebp + 0x8c], eax
call fcn.00402c48
mov eax, dword [eax]
mov esi, dword [ebp + 0x98]
mov ecx, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push eax
push ecx
call edi
mov ebx, eax
mov eax, dword [ebp - 0x7c]
neg ebx
sbb bl, bl
add eax, 0xfffffff0
inc bl
call fcn.0040124c
test bl, bl
je 0x4082ae
push 0x104
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov byte [ebp + eax - 0x78], 0x5c
mov byte [ebp + eax - 0x77], 0
lea eax, [ebp - 0x78]
push eax
push esi
call fcn.004014d6
jmp 0x408412
push str.WindowsFolder
lea esi, [ebp - 0x7c]
call fcn.00402c48
mov eax, dword [eax]
mov ecx, dword [ebp + 0x98]
mov ecx, dword [ecx]
push eax
push ecx
call edi
mov ebx, eax
mov eax, dword [ebp - 0x7c]
neg ebx
sbb bl, bl
add eax, 0xfffffff0
inc bl
call fcn.0040124c
test bl, bl
je 0x4082fb
push 0x104
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov byte [ebp + eax - 0x78], 0x5c
mov byte [ebp + eax - 0x77], 0
jmp 0x408340
push str.WindowsVolume
lea esi, [ebp - 0x7c]
call fcn.00402c48
mov eax, dword [eax]
mov ecx, dword [ebp + 0x98]
mov ecx, dword [ecx]
push eax
push ecx
call edi
mov ebx, eax
mov eax, dword [ebp - 0x7c]
neg ebx
sbb bl, bl
add eax, 0xfffffff0
inc bl
call fcn.0040124c
test bl, bl
je 0x40834f
push 0x104
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov byte [ebp - 0x75], 0
lea eax, [ebp - 0x78]
push eax
push dword [ebp + 0x98]
jmp 0x4082a4
mov ebx, dword [ebp + 0x98]
mov eax, dword [ebx]
push str.TempFolder
push eax
call edi
test eax, eax
jne 0x408381
lea eax, [ebp - 0x78]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov byte [ebp + eax - 0x78], 0
lea eax, [ebp - 0x78]
push eax
push ebx
jmp 0x4082a4
xor esi, esi
mov eax, dword [esi*4 + 0x410078]
mov ecx, dword [ebx]
push eax
push ecx
call edi
test eax, eax
je 0x40839a
inc esi
cmp esi, 0xa
jb 0x408383
cmp esi, 0xa
jae 0x40840b
lea eax, [ebp - 0x7c]
push eax
push dword [esi*4 + 0x40eba8]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40840b
lea eax, [ebp - 0x78]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
and dword [ebp - 0x80], 0
mov esi, eax
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov eax, dword [ebp - 0x80]
push dword [ebp - 0x7c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
test esi, esi
je 0x40840b
lea eax, [ebp - 0x78]
push eax
push ebx
call fcn.004014d6
mov eax, dword [ebx]
mov eax, dword [eax - 0xc]
lea esi, [eax - 1]
mov edi, ebx
call fcn.004030ab
cmp al, 0x5c
je 0x408412
push 0x5c
mov eax, ebx
call fcn.0040283b
jmp 0x408412
mov eax, ebx
call fcn.00401050
mov ecx, dword [ebp + 0x8c]
pop edi
pop esi
pop ebx
call fcn.00406b52
add ebp, 0x90
leave
ret