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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47a833
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x491300]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x48
call fcn.0045eebb
mov esi, eax
add esp, 4
mov dword [ebp - 0x10], esi
xor edi, edi
mov dword [ebp - 4], edi
cmp esi, edi
je 0x445a63
lea ecx, [esi + 4]
mov byte [ebp - 4], 1
mov dword [esi], vtable.google::protobuf::UninterpretedOption.0
call fcn.0041a150
fldz
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
fstp qword [esi + 0x30]
mov eax, 0x4905e0
mov dword [esi + 0x18], eax
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x44], edi
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
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
mov esp, ebp
pop ebp
ret
Function at 0x45ea71
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x491300]
jne 0x45ea7b
repz ret
jmp fcn.0046563b

Function at 0x46fddb
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x491300]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00465741
and dword [ebp - 0x14], 0
cmp dword [0x4939bc], 0
mov dword [ebp - 0x18], eax
jne 0x46fe8e
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x46ff36
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x46ff36
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x4939bc], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x4939c0], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x4939c4], eax
call edi
push eax
call esi
mov dword [0x4939cc], eax
test eax, eax
je 0x46fe8e
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x4939c8], eax
mov eax, dword [0x4939c8]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x46fee7
cmp dword [0x4939cc], ecx
je 0x46fee7
push eax
call esi
push dword [0x4939cc]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x46fee7
test ebx, ebx
je 0x46fee7
call edi
test eax, eax
je 0x46fede
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x46fede
test byte [ebp - 8], 1
jne 0x46fee7
or dword [ebp + 0x10], 0x200000
jmp 0x46ff1a
mov eax, dword [0x4939c0]
cmp eax, dword [ebp - 0x18]
je 0x46ff1a
push eax
call esi
test eax, eax
je 0x46ff1a
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x46ff1a
mov eax, dword [0x4939c4]
cmp eax, dword [ebp - 0x18]
je 0x46ff1a
push eax
call esi
test eax, eax
je 0x46ff1a
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x4939bc]
call esi
test eax, eax
je 0x46ff36
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x46ff38
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045ea71
leave
ret
Function at 0x401005
Capabilities:
Hide graphical window

Disassembly:
jmp 0x401f40
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x20]
push edi
push eax
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.00408ef3
mov ebx, dword [esi + 0x7c]
sub ebx, dword [esi + 0x84]
mov ecx, dword [esi + 0x98]
sub ebx, 0x14
xor edi, edi
sub ecx, 1
mov ebp, eax
js 0x401faa
test edi, edi
jl 0x4020c6
cmp edi, dword [esi + 0x98]
jge 0x4020c6
mov edx, dword [esi + 0x94]
mov eax, dword [edx + edi*4]
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [esi + 0x98]
add edi, 1
sub ecx, 1
cmp edi, ecx
jle 0x401f74
mov eax, dword [esi + 0x58]
mov ecx, dword [eax + 0x20]
lea edx, [esp + 0x10]
push edx
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
lea edx, [esp + 0x10]
push edx
mov ecx, ebp
call fcn.0040f4d4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
sub eax, ebx
push 1
mov dword [esp + 0x20], eax
sub eax, ecx
push eax
mov eax, dword [esp + 0x18]
sub edx, eax
push edx
push ecx
mov ecx, dword [esi + 0x58]
push eax
call fcn.00404f15
mov eax, dword [esi + 0xac]
xor edi, edi
sub eax, 1
js 0x402088
test edi, edi
jl 0x4020c6
cmp edi, dword [esi + 0xac]
jge 0x4020c6
mov edx, dword [esi + 0xa8]
mov eax, dword [edx + edi*4]
lea ecx, [esp + 0x10]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebp
call fcn.0040f4d4
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
sub ecx, ebx
sub eax, ebx
cmp edi, dword [esi + 0xac]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], eax
jge 0x4020c6
mov edx, dword [esp + 0x18]
push 1
sub eax, ecx
push eax
mov eax, dword [esp + 0x18]
sub edx, eax
push edx
push ecx
push eax
mov eax, dword [esi + 0xa8]
mov ecx, dword [eax + edi*4]
push ecx
call dword [sym.imp.USER32.dll_MoveWindow]
mov edx, dword [esi + 0xac]
add edi, 1
sub edx, 1
cmp edi, edx
jle 0x402001
mov ecx, dword [ebp + 0x20]
lea eax, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
sub eax, ebx
push 1
mov dword [esp + 0x20], eax
sub eax, ecx
push eax
mov eax, dword [esp + 0x18]
sub edx, eax
push edx
push ecx
push eax
mov ecx, ebp
call fcn.00404f15
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
jmp fcn.004049ba
Function at 0x4028c0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
jmp 0x4028c0
mov eax, 0x24f40
call fcn.00432f30
mov eax, dword [0x494430]
xor eax, esp
mov dword [esp + 0x24f3c], eax
push ebx
mov ebx, dword [esp + 0x24f54]
push ebp
mov ebp, dword [esp + 0x24f54]
push esi
mov esi, dword [esp + 0x24f60]
push edi
xor edi, edi
xor ecx, ecx
mov eax, ecx
cdq
idiv ebx
mov byte [esp + ecx + 0x14], cl
add ecx, 1
cmp ecx, 0x12799
mov al, byte [edx + ebp]
mov byte [esp + ecx + 0x127af], al
jl 0x4028f5
xor ecx, ecx
jmp 0x402920
mov bl, byte [esp + ecx + 0x14]
movzx edx, byte [esp + ecx + 0x127b0]
add edx, edi
movzx eax, bl
add eax, edx
cdq
mov edi, 0x12799
idiv edi
add ecx, 1
cmp ecx, 0x12799
mov edi, edx
mov al, byte [esp + edi + 0x14]
mov byte [esp + edi + 0x14], bl
mov byte [esp + ecx + 0x13], al
jl 0x402920
mov eax, dword [esp + 0x24f58]
xor edi, edi
test eax, eax
jle 0x4029c6
mov ebp, dword [esp + 0x24f54]
sub ebp, esi
mov dword [esp + 0x10], eax
mov edi, edi
lea eax, [ecx + 1]
cdq
mov ecx, 0x12799
idiv ecx
mov ebx, 0x12799
add esi, 1
mov ecx, edx
movzx eax, byte [esp + ecx + 0x14]
add eax, edi
cdq
mov edi, 0x12799
idiv edi
mov edi, edx
mov dl, byte [esp + ecx + 0x14]
mov al, byte [esp + edi + 0x14]
mov byte [esp + edi + 0x14], dl
mov byte [esp + ecx + 0x14], al
movzx edx, byte [esp + edi + 0x14]
movzx eax, al
add eax, edx
cdq
idiv ebx
movzx eax, byte [esp + edx + 0x14]
xor al, byte [esi + ebp - 1]
sub dword [esp + 0x10], 1
mov byte [esi - 1], al
jne 0x402970
mov ecx, dword [esp + 0x24f4c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00432ae5
add esp, 0x24f40
ret

Function at 0x40574c
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x474083
call fcn.00433bef
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x405771
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextA]
jmp 0x4057bd
call fcn.00417e26
push eax
lea ecx, [ebp - 0x10]
call fcn.0040541c
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
and dword [ebp - 4], 0
lea edx, [ebp - 0x10]
push edx
call dword [eax + 0x8c]
push 0xffffffffffffffff
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00404a08
add esp, 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov esi, eax
call fcn.0040506d
mov eax, esi
call fcn.00433cc7
ret 8

Function at 0x40a698
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x40a6d1
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0040a554
push eax
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00408d38
pop esi
ret 4
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
pop esi
jmp dword [eax + 0x8c]
Function at 0x40c7bd
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push ebp
push esi
push edi
xor edi, edi
xor ebx, ebx
cmp dword [esp + 0x14], edi
mov ebp, ecx
je 0x40c800
call fcn.00414c39
mov esi, dword [eax + 0xc]
push pe_nt_image_headers32
push dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x40c800
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x40c81b
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
push ebx
mov ecx, ebp
call fcn.0040c374
test ebx, ebx
mov esi, eax
je 0x40c819
test edi, edi
je 0x40c819
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x432ae5
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x494430]
jne 0x432aef
repz ret
jmp fcn.0043b57c
Function at 0x4501a9
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0043af14
xor ebx, ebx
cmp dword [0x498b70], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
jne 0x45027e
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
jne 0x4501e9
xor eax, eax
jmp 0x450342
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x4501e2
push eax
call fcn.0043aeb1
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x498b70], eax
call esi
push eax
call fcn.0043aeb1
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x498b74], eax
call esi
push eax
call fcn.0043aeb1
mov dword [0x498b78], eax
lea eax, [ebp - 8]
push eax
call fcn.00437594
test eax, eax
pop ecx
pop ecx
je 0x45024c
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0043969f
add esp, 0x14
cmp dword [ebp - 8], 2
jne 0x45027e
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0043aeb1
cmp eax, ebx
pop ecx
mov dword [0x498b80], eax
je 0x45027e
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0043aeb1
pop ecx
mov dword [0x498b7c], eax
mov eax, dword [0x498b7c]
mov esi, dword [ebp - 0x10]
cmp eax, esi
je 0x4502f7
cmp dword [0x498b80], esi
je 0x4502f7
push eax
call fcn.0043af1d
pop ecx
call eax
cmp eax, ebx
je 0x4502c4
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
push dword [0x498b80]
call fcn.0043af1d
pop ecx
call eax
test eax, eax
je 0x4502c4
test byte [ebp - 0x18], 1
jne 0x4502f7
lea eax, [ebp - 0xc]
push eax
call fcn.00437643
test eax, eax
pop ecx
je 0x4502df
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0043969f
add esp, 0x14
cmp dword [ebp - 0xc], 4
jb 0x4502ee
or dword [ebp + 0x10], 0x200000
jmp 0x450328
or dword [ebp + 0x10], 0x40000
jmp 0x450328
mov eax, dword [0x498b74]
cmp eax, esi
je 0x450328
push eax
call fcn.0043af1d
pop ecx
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x450328
mov eax, dword [0x498b78]
cmp eax, esi
je 0x450328
push dword [ebp - 4]
push eax
call fcn.0043af1d
pop ecx
call eax
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
push dword [0x498b70]
call fcn.0043af1d
pop ecx
call eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x45c58e
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x494430]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0045c406
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.00432610
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x45c5dd
cmp dword [ebp - 0x1c], 5
jb 0x45c5f5
jmp 0x45c5f1
cmp dword [ebp - 0x10], 1
jne 0x45c5f5
cmp dword [ebp - 0x1c], 4
ja 0x45c5f1
jne 0x45c5f5
cmp dword [ebp - 0x18], 0
jbe 0x45c5f5
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x487158
call fcn.0045c1c3
test eax, eax
jge 0x45c616
mov byte [0x4962a5], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00432ae5
add ebp, 0x78
leave
ret
Function at 0x4079d0
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x414]
sub esp, 0x414
push 0xfffffffffffffffe
push 0x433330
push 0x4188c0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x436038]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x410], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 4], 0
mov dword [esi + 0x10], 0
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x407a31
mov eax, dword [esi]
xor ecx, ecx
mov word [eax], cx
mov edx, esi
call fcn.00407b00
mov bl, al
mov byte [ebp - 0x19], bl
mov dword [ebp - 4], 0xfffffffe
jmp 0x407a63
test bl, bl
jne 0x407ada
mov dword [esi + 0x10], 0
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x407a78
mov eax, dword [esi]
xor ecx, ecx
mov word [eax], cx
push 0x410
push ecx
lea eax, [ebp]
push eax
call fcn.00417c20
add esp, 0xc
push 0x207
lea eax, [ebp]
push eax
push str.APPDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [ebp]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407ab0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp]
push eax
mov ecx, esi
call fcn.004032a0
movzx ebx, bl
mov eax, 1
cmp dword [esi + 0x10], 0
cmovne ebx, eax
mov al, bl
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x410]
xor ecx, ebp
call fcn.00416858
lea esp, [ebp + 0x414]
pop ebp
ret
mov edx, dword [esp + 4]
jmp 0x4079d0

Function at 0x407d60
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x414]
sub esp, 0x414
push 0xfffffffffffffffe
push 0x433330
push 0x4188c0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x436038]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x410], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 4], 0
mov dword [esi + 0x10], 0
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x407a31
mov eax, dword [esi]
xor ecx, ecx
mov word [eax], cx
mov edx, esi
call fcn.00407b00
mov bl, al
mov byte [ebp - 0x19], bl
mov dword [ebp - 4], 0xfffffffe
jmp 0x407a63
test bl, bl
jne 0x407ada
mov dword [esi + 0x10], 0
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x407a78
mov eax, dword [esi]
xor ecx, ecx
mov word [eax], cx
push 0x410
push ecx
lea eax, [ebp]
push eax
call fcn.00417c20
add esp, 0xc
push 0x207
lea eax, [ebp]
push eax
push str.APPDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [ebp]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407ab0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp]
push eax
mov ecx, esi
call fcn.004032a0
movzx ebx, bl
mov eax, 1
cmp dword [esi + 0x10], 0
cmovne ebx, eax
mov al, bl
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x410]
xor ecx, ebp
call fcn.00416858
lea esp, [ebp + 0x414]
pop ebp
ret
mov edx, dword [esp + 4]
jmp 0x4079d0
Function at 0x40a840
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x433998
push 0x4188c0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x436038]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x28], 0
xor esi, esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x2c], esi
xor ebx, ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x24], ebx
mov word [ebp - 0x20], 0x100
mov eax, dword [ecx]
mov edi, dword [eax + 0x28]
mov dword [ebp - 0x40], edi
test edi, edi
jne 0x40a8a9
xor eax, eax
jmp 0x40aa1f
mov dword [ebp - 4], ebx
push str.InitializeSecurityDescriptor
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40a9ea
push 1
push dword [ebp - 0x34]
call eax
test eax, eax
je 0x40a9ea
push str.AllocateAndInitializeSid
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40a9ea
lea ecx, [ebp - 0x28]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 1
lea ecx, [ebp - 0x24]
push ecx
call eax
test eax, eax
je 0x40a9ea
push str.GetLengthSid
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40a9ea
push dword [ebp - 0x28]
call eax
add eax, 0x10
mov dword [ebp - 0x30], eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x3c], esi
test esi, esi
je 0x40a9ea
push str.InitializeAcl
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40a9ea
push 2
push dword [ebp - 0x30]
push esi
call eax
test eax, eax
je 0x40a9ea
push str.AddAccessAllowedAce
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40a9ea
push dword [ebp - 0x28]
push 0x10000000
push 2
push esi
call eax
test eax, eax
je 0x40a9ea
push str.SetSecurityDescriptorDacl
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x40a9ea
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x40a9d3
push 0
push ecx
push 1
push dword [ebp - 0x34]
call eax
test eax, eax
je 0x40a9c0
mov ebx, 1
mov dword [ebp - 0x38], ebx
cmp dword [ebp - 0x2c], 0
je 0x40a9d0
jmp 0x40a9ea
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x30]
push 0
push esi
push 1
push dword [ebp - 0x34]
call eax
mov ecx, 1
test eax, eax
cmovne ebx, ecx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 4], 0xfffffffe
call fcn.0040aa46
test ebx, ebx
jne 0x40aa1d
test esi, esi
je 0x40aa0f
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40aa1d
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00416858
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10004310
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
mov eax, dword [0x1015050c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
cmp dword [ebx], 0
jne 0x100043d1
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.1008e9b0
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x100043bb
push edi
push 0x104
lea edi, [ebx + 4]
push 0
push edi
call fcn.1008e9b0
add esp, 0xc
lea eax, [ebp - 0x108]
push edi
push 0
push 0x10117830
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push str..bat
push edi
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x80
push 4
push 0
push 7
push 0xc01200a0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebx], eax
pop edi
cmp dword [ebx], 0
jne 0x100043d1
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10073638
mov esp, ebp
pop ebp
ret
push 0x208
lea eax, [ebp - 0x310]
push 0
push eax
call fcn.1008e9b0
add esp, 0xc
mov dword [ebp - 0x314], 0
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
lea eax, [ebp - 0x310]
push 0x207
push eax
call fcn.100044a0
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.100a9b71
or ecx, 0xffffffff
add esp, 0x1c
test eax, eax
cmovs eax, ecx
test eax, eax
js 0x10004431
cmp eax, 0x207
ja 0x10004431
jne 0x10004438
mov byte [ebp - 0x109], 0
lea ecx, [ebp - 0x310]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004441
push 0
lea eax, [ebp - 0x314]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x310]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.10073638
mov esp, ebp
pop ebp
ret