joyce8/EMBER2024-capa huggingface dataset:
Function at 0x487ea3
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x4b5028]
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 0x487eee
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00488343
test al, al
jne 0x487ee8
sub edx, 2
cmp edx, edi
jne 0x487ece
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x487f10
lea eax, [edi + 2]
cmp edx, eax
je 0x487f10
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00487b6a
add esp, 0x10
jmp 0x48800a
push esi
lea ecx, [ebp - 0x255]
call fcn.00488343
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 0x487f53
push dword [ebp - 0x25c]
jmp 0x487f00
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 0x487f90
cmp word [ebp - 0x226], 0
je 0x487fb1
cmp word [ebp - 0x226], ax
jne 0x487f90
cmp word [ebp - 0x224], 0
je 0x487fb1
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00487b6a
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x487ffd
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x487f6a
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x487fe5
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x48800a
push 0x4875ba
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00494d10
add esp, 0x10
jmp 0x487fda
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.00457574
leave
ret
Function at 0x489913
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 0x4899b0
push ebx
push esi
call fcn.004898cf
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.0048980c
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x48995d
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4899af
push edi
push eax
call fcn.00484d69
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x48997d
call fcn.0048326e
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4899ae
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0048980c
add esp, 0x20
test eax, eax
jne 0x48999c
push edi
call fcn.0048326e
jmp 0x4899a4
push ebx
call fcn.0048326e
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 0x4899b3
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4899c4
pop esi
ret
push ebx
push edi
push esi
call fcn.004898cf
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00484d69
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4899ec
push ebx
push esi
push edi
call fcn.00460040
add esp, 0xc
push 0
call fcn.0048326e
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x48a2db
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00489c61

Function at 0x48d584
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.00482a43
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 0x48d5f3
cmp esi, dword [ebp - 4]
je 0x48d5ee
cmp dword [ebp + 0xc], 0
je 0x48d5ee
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x48d5cb
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0048d0d6
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x48d5f5
xor eax, eax
inc eax
jmp 0x48d5f5
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x48d65a
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4b5028]
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.00482a43
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.00482a43
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 0x48d6d1
cmp word [ecx], dx
je 0x48d6d1
mov eax, dword [0x4a74f4]
push edi
dec eax
push eax
push 0x4a73e0
call fcn.0048d5f9
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x48d744
cmp word [eax], dx
je 0x48d744
mov eax, dword [edi]
test eax, eax
je 0x48d6f5
cmp word [eax], dx
je 0x48d6f5
lea eax, [ebp - 0x10]
push eax
call fcn.0048cfdc
jmp 0x48d6fe
lea eax, [ebp - 0x10]
push eax
call fcn.0048d077
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x48d76e
mov eax, dword [0x4a73dc]
push dword [ebp - 0x14]
dec eax
push eax
push 0x4a70d0
call fcn.0048d5f9
add esp, 0xc
test al, al
je 0x48d76e
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x48d739
cmp word [eax], di
je 0x48d739
lea eax, [ebp - 0x10]
push eax
call fcn.0048cfdc
pop ecx
jmp 0x48d770
lea eax, [ebp - 0x10]
push eax
call fcn.0048d077
jmp 0x48d736
mov eax, dword [edi]
test eax, eax
je 0x48d75b
cmp word [eax], dx
je 0x48d75b
lea eax, [ebp - 0x10]
push eax
call fcn.0048cf73
pop ecx
jmp 0x48d76e
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 0x48d839
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0048d47e
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x48d839
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x48d839
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x48d839
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x48d7c6
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.00483fa5
test ebx, ebx
je 0x48d834
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.00483fa5
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x48d839
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 0x48d839
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.004961d3
add esp, 0x10
xor eax, eax
inc eax
jmp 0x48d83b
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00457574
leave
ret
Function at 0x497556
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0x4b6cb0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x497596
cmp byte [ebx], 0xa
jne 0x497596
or byte [edi + eax + 0x28], 4
jmp 0x49759b
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x49769a
mov dl, byte [eax]
cmp dl, 0x1a
je 0x49767d
inc eax
cmp dl, 0xd
je 0x4975c7
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x4975ed
cmp eax, ecx
jae 0x4975fb
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x4975af
jmp 0x49769a
push 0
lea eax, [ebp - 0x10]
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 0x497678
cmp dword [ebp - 0x10], 0
je 0x497678
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x4b6cb0]
test byte [eax + edi + 0x28], 0x48
je 0x497652
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x49763d
mov byte [esi], dl
jmp 0x49764e
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4b6cb0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x49769a
cmp byte [ebp - 1], 0xa
jne 0x497661
cmp esi, ebx
jne 0x497661
mov byte [esi], 0xa
jmp 0x497699
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004973a8
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x49769a
mov byte [esi], 0xd
jmp 0x497699
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x4b6cb0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x497697
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x49769a
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4976a3
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x4b6cb0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4976e9
cmp word [ebx], dx
jne 0x4976e9
or byte [eax + edi + 0x28], 4
jmp 0x4976ee
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x497851
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x497831
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x49772f
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x497765
cmp eax, edx
jae 0x497773
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x49770a
jmp 0x497851
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x49782c
cmp dword [ebp - 0x18], 0
je 0x49782c
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4b6cb0]
test byte [eax + edi + 0x28], 0x48
je 0x497802
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x4977c6
mov word [esi], cx
jmp 0x4977fd
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4b6cb0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x4b6cb0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4b6cb0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x497851
pop eax
cmp word [ebp - 4], ax
jne 0x497812
cmp esi, ebx
jne 0x497812
mov word [esi], ax
jmp 0x49784e
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004973a8
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x497851
push 0xd
pop eax
jmp 0x49780d
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4b6cb0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x49784b
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x497851
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x49c3b0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x49c3dd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x49c3dd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x4025a9
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
lea ecx, [ebp - 0xc]
call fcn.0041158b
lea ecx, [ebp - 0x18]
call fcn.0041158b
push 0x3c
xor esi, esi
lea eax, [ebp - 0x54]
push esi
push eax
call fcn.00416a40
mov ebx, dword [ebp + 0xc]
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov ecx, 0x740
mov dword [ebp - 0x54], 0x3c
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x38], 0xa
test bl, 1
je 0x402601
mov ecx, 0x8740
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x50], ecx
test bl, 2
mov eax, str.runas
cmove eax, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
and ebx, 0x10000
jne 0x402621
or ecx, 0x100
mov dword [ebp - 0x50], ecx
mov eax, dword [0x430e6c]
push 5
push eax
mov dword [ebp - 0x4c], eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [ebp - 0x4c]
call dword [sym.imp.USER32.dll_BringWindowToTop]
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call fcn.00404cf6
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.004116bd
cmp dword [ebp - 8], esi
je 0x402689
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x40268c
test ebx, ebx
jne 0x402680
push 0xffffffffffffffff
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
inc esi
push dword [ebp - 0x18]
call fcn.00419a19
push dword [ebp - 0xc]
call fcn.00419a19
pop ecx
pop ecx
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x402900
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push dword [ebp + 8]
mov esi, ecx
call fcn.0040323d
xor edi, edi
mov dword [0x430e5c], esi
lea eax, [ebp - 4]
mov dword [0x430e64], edi
push eax
push edi
push esi
push 0x402cd8
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, eax
mov dword [0x430e60], edx
test edx, edx
je 0x402960
cmp dword [0x430e98], 2
je 0x402951
call fcn.004084be
mov edx, dword [0x430e60]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [0x430e60]
mov eax, dword [0x430e64]
mov dword [0x430ffc], edi
test eax, eax
je 0x4029a2
cmp eax, 1
je 0x402996
cmp eax, 2
je 0x402992
cmp eax, 3
je 0x40298e
cmp eax, 0x67
jle 0x402988
cmp eax, 0x6b
jle 0x402a06
push eax
push 0x14
push edi
jmp 0x4029fe
push 0x12
jmp 0x402998
push 0x13
jmp 0x402998
push 0x11
push edi
call fcn.00409be6
pop ecx
pop ecx
jmp 0x402a06
mov ecx, edi
mov dword [ebp + 8], ecx
cmp dword [0x431000], ecx
jne 0x402a06
test edx, edx
je 0x4029cd
lea eax, [ebp + 8]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov ecx, dword [ebp + 8]
test eax, eax
je 0x4029cd
test ecx, ecx
jne 0x4029cd
xor eax, eax
jmp 0x402a0b
mov edx, 0x80070000
mov eax, ecx
and eax, edx
cmp eax, edx
je 0x4029df
push ecx
push 0x21
jmp 0x40298b
movzx eax, cx
cmp eax, 0xe
jne 0x4029f0
cmp dword [0x430e9c], 0xffffffff
je 0x402a06
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.00409be6
add esp, 0xc
mov eax, 0x80004005
pop edi
pop esi
leave
ret 4
Function at 0x403769
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], eax
mov edi, eax
call fcn.00411554
xor esi, esi
lea ecx, [ebp - 0x18]
push esi
call fcn.00404031
push 0x2f
mov ebx, eax
mov eax, dword [ebp + 8]
pop ecx
push 0x5c
pop edx
movzx eax, word [eax + edi*2 - 2]
cmp ax, dx
je 0x4037af
cmp ax, cx
jne 0x4037e3
xor eax, eax
mov word [ebx + edi*2 - 2], ax
dec edi
mov dword [ebp - 4], edi
jmp 0x4037e3
test edi, edi
jle 0x4037db
push 0x2f
pop ecx
push 0x5c
pop edx
movzx eax, word [ebx + edi*2]
cmp ax, cx
je 0x4037d9
cmp ax, dx
je 0x4037d9
dec edi
test edi, edi
jg 0x4037c6
test edi, edi
je 0x403838
xor eax, eax
mov word [ebx + edi*2], ax
push ebx
call fcn.004057e3
pop ecx
test eax, eax
je 0x4037bc
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
jne 0x403817
lea eax, [ebp - 0xc]
push eax
push ebx
call fcn.00404399
pop ecx
pop ecx
test eax, eax
jne 0x4038bc
push ebx
call fcn.004057e3
pop ecx
test eax, eax
jne 0x4038b2
push ebx
push 0xc
push 1
call fcn.00409be6
add esp, 0xc
jmp 0x4038bc
cmp dword [ebp - 4], 2
mov ecx, dword [ebp + 8]
jne 0x403859
mov ax, word [ecx]
or ax, 0x20
sub ax, 0x61
cmp ax, 0x19
ja 0x403859
cmp word [ecx + 2], 0x3a
je 0x4038b9
push ecx
jmp 0x403827
sub eax, edi
lea esi, [ebx + edi*2]
inc eax
push eax
mov eax, dword [ebp + 8]
lea eax, [eax + edi*2]
push eax
push esi
call fcn.00416ba0
xor ecx, ecx
lea eax, [edi + 1]
add esp, 0xc
cmp word [esi], cx
cmove eax, edi
mov edi, eax
jmp 0x403896
movzx eax, cx
push 0x5c
pop ecx
cmp ax, cx
je 0x4038a1
push 0x2f
pop ecx
cmp ax, cx
je 0x4038a1
inc edi
movzx eax, word [ebx + edi*2]
mov ecx, eax
test ax, ax
jne 0x403882
xor eax, eax
push ebx
mov word [ebx + edi*2], ax
call fcn.004057e3
pop ecx
test eax, eax
je 0x4038cc
mov eax, dword [ebp - 4]
cmp edi, eax
jl 0x40385c
xor esi, esi
inc esi
push dword [ebp - 0x18]
call fcn.00419a19
pop ecx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
push ebx
push 0xc
push 1
call fcn.00409be6
add esp, 0xc
xor esi, esi
jmp 0x4038bc
Function at 0x403be2
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.0041158b
push 2
mov ecx, edi
call fcn.00404031
push eax
push 1
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, eax
xor ebx, ebx
mov eax, dword [edi]
xor ecx, ecx
mov dword [edi + 4], ebx
mov word [eax], cx
test esi, esi
je 0x403c39
inc esi
mov ecx, edi
push esi
call fcn.00404031
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, dword [edi]
push esi
call fcn.00404eab
pop ecx
xor ecx, ecx
mov dword [edi + 4], eax
mov word [esi + eax*2], cx
mov esi, dword [edi + 4]
mov dword [ebp + 8], esi
lea eax, [esi + 0xf]
push eax
mov ecx, edi
call fcn.00404031
push ebx
push dword [ebp + 0xc]
lea eax, [eax + esi*2]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov esi, dword [edi]
push esi
call fcn.00404eab
add esp, 0x10
mov dword [edi + 4], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403c88
mov esi, dword [ebp + 8]
inc ebx
lea eax, [esi + 0xf]
cmp ebx, 0xfff
jl 0x403c42
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x403c8f
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
push esi
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.00411554
push 0x426bb8
lea ecx, [ebp - 0xc]
call fcn.0041185b
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
xor esi, esi
cmp ebx, 0xffffffff
je 0x403d6b
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.004116bd
push 0x5c
lea ecx, [ebp - 0xc]
call fcn.004018e1
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0xc]
call fcn.0041185b
test byte [ebp - 0x25c], 0x10
je 0x403d33
push 0x426bc0
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x403d4e
push 0x426bc4
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x403d4e
push dword [ebp - 0xc]
call fcn.00403c8f
pop ecx
jmp 0x403d4a
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x403d95
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x403d95
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x403ccf
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [0x430ed8]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x403d95
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x403d95
xor esi, esi
inc esi
push dword [ebp - 0xc]
call fcn.00419a19
pop ecx
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4041e0
Capabilities:
Get geographical location
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x4300c0]
sub esp, 0xa0
push esi
push edi
xor edi, edi
mov esi, edi
jmp 0x404207
cmp eax, dword [ebp + 8]
je 0x40420b
inc esi
mov eax, esi
shl eax, 4
mov eax, dword [eax + 0x4300c0]
test eax, eax
jne 0x4041f6
shl esi, 4
cmp dword [esi + 0x4300c0], edi
jne 0x404220
mov eax, 0x426a18
jmp 0x404395
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
push dword [ebp + 8]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x60]
push str.SfxString_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x60]
push edi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
mov dword [ebp - 4], edi
call ebx
push 2
pop edx
test eax, eax
jne 0x4042ca
xor ecx, ecx
lea eax, [edi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00419a10
pop ecx
mov ecx, dword [ebp - 4]
mov edi, eax
inc ecx
lea eax, [ebp - 0x60]
push ecx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, dword [ebp - 4]
ja 0x4042c3
call ebx
test eax, eax
jne 0x4042c3
mov eax, dword [esi + 0x4300cc]
test eax, eax
je 0x4042bb
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4042c3
push 2
pop eax
push eax
push dword [esi + 0x4300cc]
call fcn.00419a02
pop ecx
mov dword [esi + 0x4300cc], edi
jmp 0x4042c9
mov dword [esi + 0x4300cc], edi
jmp 0x4042ca
push edi
call fcn.00419a19
pop ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x4300cc]
test eax, eax
jne 0x404394
mov ebx, dword [esi + 0x4300c4]
cmp dword [esi + 0x4300c8], eax
je 0x404302
call fcn.0040478c
cmp eax, dword [0x426dc0]
jne 0x404302
mov ebx, dword [esi + 0x4300c8]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
xor ecx, ecx
push 2
pop edx
lea edi, [eax + 1]
lea eax, [edi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00419a10
pop ecx
mov ecx, dword [0x4300bc]
mov dword [esi + 0x4300cc], eax
cmp ecx, 0xffffffff
jne 0x404379
and dword [0x4300bc], 0
lea eax, [ebp - 0xa0]
push 0x1f
push eax
movzx eax, word [0x430e68]
push 0x1004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x404373
lea eax, [ebp - 0xa0]
push eax
call fcn.0041b200
pop ecx
mov ecx, eax
mov dword [0x4300bc], ecx
jmp 0x404379
mov ecx, dword [0x4300bc]
lea eax, [edi + 1]
push eax
push dword [esi + 0x4300cc]
push edi
push ebx
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x4300cc]
pop ebx
pop edi
pop esi
leave
ret