joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49f5b0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4b7b41
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov al, byte [esp + 0x3c]
push ebx
xor ebx, ebx
push esi
mov esi, ecx
mov byte [esp + 0x10], al
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov ecx, dword [esp + 0x44]
push ebx
mov dword [esp + 0x40], ebx
mov byte [esp + 0x28], al
mov edx, dword [ecx]
lea ecx, [esp + 0x28]
mov dword [esp + 0x24], edx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea edx, [esp + 0x10]
mov ecx, dword [eax]
push ecx
push ebx
push edx
lea ecx, [esp + 0x30]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
lea eax, [esp + 0x20]
lea ecx, [esp + 8]
push eax
push ecx
mov ecx, esi
mov byte [esp + 0x44], 1
call fcn.004a03f0
mov esi, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x28]
cmp eax, ebx
mov dword [esp + 0xc], edx
je 0x49f65b
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x49f652
cmp al, 0xff
je 0x49f652
dec al
mov byte [ecx], al
jmp 0x49f65b
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], ebx
cmp eax, ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
je 0x49f68c
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x49f683
cmp al, 0xff
je 0x49f683
dec al
mov byte [ecx], al
jmp 0x49f68c
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x34]
lea eax, [esi + 0x10]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret 4
Function at 0x14b8b905
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 0x14b8b933
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 0x14b8b93a
cmp ebx, dword [eax + 4]
jae 0x14b8b93a
xor eax, eax
jmp 0x14b8bb2a
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x14b8b94b
xor eax, eax
inc eax
jmp 0x14b8bb29
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x14b8b961
cmp ecx, edx
jae 0x14b8baa6
cmp dword [eax + 4], 0
je 0x14b8b96a
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x14b8b952
cmp dword [ebp + 8], 0
je 0x14b8b98c
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x14b8baa6
cmp eax, esi
jae 0x14b8baa6
mov eax, dword [0x14bbe2b8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x14b8b9b1
cmp dword [esi*4 + 0x14bbe2c0], edi
je 0x14b8baaa
inc esi
cmp esi, eax
jl 0x14b8b99f
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [0x14ba4138]
test eax, eax
je 0x14b8bb26
cmp dword [ebp - 8], 0x1000000
jne 0x14b8bb26
test byte [ebp - 0xc], 0xcc
je 0x14b8ba2f
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x14b8bb26
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x14b8bb26
cmp word [eax + 0x18], 0x10b
jne 0x14b8bb26
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x14b8bb26
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x14b8ba2f
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x14b8ba2f
test byte [ecx + 0x27], 0x80
jne 0x14b8baa6
push 1
push 0x14bbe300
call dword [0x14ba4284]
test eax, eax
jne 0x14b8b943
mov ecx, dword [0x14bbe2b8]
test ecx, ecx
mov edx, ecx
jle 0x14b8ba63
lea eax, [ecx*4 + 0x14bbe2bc]
cmp dword [eax], edi
je 0x14b8ba63
dec edx
sub eax, 4
test edx, edx
jg 0x14b8ba57
test edx, edx
jne 0x14b8ba94
push 0xf
pop ebx
cmp ecx, ebx
jg 0x14b8ba70
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x14b8ba88
lea eax, [edx*4 + 0x14bbe2c0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x14b8ba76
cmp ecx, 0x10
jge 0x14b8ba94
inc ecx
mov dword [0x14bbe2b8], ecx
push 0
push 0x14bbe300
call dword [0x14ba4284]
jmp 0x14b8b943
xor eax, eax
jmp 0x14b8bb29
test esi, esi
jle 0x14b8b943
mov ebx, dword [0x14ba4284]
push 1
push 0x14bbe300
call ebx
test eax, eax
jne 0x14b8b943
cmp dword [esi*4 + 0x14bbe2c0], edi
je 0x14b8bb00
mov eax, dword [0x14bbe2b8]
lea esi, [eax - 1]
test esi, esi
jl 0x14b8baee
cmp dword [esi*4 + 0x14bbe2c0], edi
je 0x14b8baea
dec esi
jns 0x14b8bade
test esi, esi
jge 0x14b8bafe
cmp eax, 0x10
jge 0x14b8baf9
inc eax
mov dword [0x14bbe2b8], eax
lea esi, [eax - 1]
jmp 0x14b8bb00
je 0x14b8bb18
xor ecx, ecx
test esi, esi
jl 0x14b8bb18
lea eax, [ecx*4 + 0x14bbe2c0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x14b8bb06
push 0
push 0x14bbe300
call ebx
jmp 0x14b8b943
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x14b96153
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x14ba2aae
call fcn.14b89230
sub esp, 0x11c
mov eax, dword [0x14bb862c]
push ebx
push esi
push edi
push dword [ebp + 0x1c]
mov esi, ecx
xor ebx, ebx
push ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x128], esi
call fcn.14b97669
lea ecx, [esi + 0x78]
mov dword [ebp - 4], ebx
mov dword [esi], vtable.CFileDialog.0
call fcn.14b42340
cmp dword [ebp + 0x20], ebx
mov byte [ebp - 4], 1
jne 0x14b961e4
mov edi, 0x114
push edi
lea eax, [ebp - 0x124]
push ebx
push eax
call fcn.14b891d0
add esp, 0xc
lea eax, [ebp - 0x124]
push eax
mov dword [ebp - 0x124], edi
call dword [0x14ba4274]
cmp dword [ebp - 0x114], 2
jne 0x14b961dd
cmp dword [ebp - 0x120], 5
mov dword [ebp + 0x20], 0x58
jae 0x14b961e4
mov dword [ebp + 0x20], 0x4c
push dword [ebp + 0x20]
call fcn.14b87254
cmp eax, ebx
pop ecx
mov dword [esi + 0x70], eax
jne 0x14b961f9
call fcn.14b95ed0
push dword [ebp + 0x20]
push ebx
push eax
call fcn.14b891d0
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x20]
mov dword [esi + 0x74], eax
add esp, 0xc
neg eax
sbb eax, eax
add eax, 0x7005
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x70]
mov dword [esi + 0x304], ebx
lea ecx, [esi + 0x7c]
mov word [ecx], bx
lea edi, [esi + 0xfc]
mov word [edi], bx
mov dword [eax], edx
mov eax, dword [esi + 0x70]
mov edx, dword [ebp + 0xc]
mov dword [eax + 0x1c], edi
mov eax, dword [esi + 0x70]
mov dword [eax + 0x20], 0x104
mov eax, dword [esi + 0x70]
mov dword [eax + 0x3c], edx
mov eax, dword [esi + 0x70]
mov edx, dword [ebp + 0x14]
mov dword [eax + 0x24], ecx
mov eax, dword [esi + 0x70]
push 0x40
pop ecx
mov dword [eax + 0x28], ecx
mov eax, dword [esi + 0x70]
or edx, 0x80020
or dword [eax + 0x34], edx
test byte [ebp + 0x14], cl
je 0x14b96278
mov eax, dword [esi + 0x70]
and byte [eax + 0x36], 0x7f
call fcn.14ba04a8
cmp dword [ebp + 0x10], ebx
mov eax, dword [eax + 0xc]
mov ecx, dword [esi + 0x70]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0x70]
mov dword [eax + 0x44], 0x14b96504
je 0x14b962a4
push 0x104
push dword [ebp + 0x10]
push edi
call dword [0x14ba4234]
cmp dword [ebp + 0x18], ebx
je 0x14b962dd
push dword [ebp + 0x18]
lea edi, [esi + 0x78]
mov ecx, edi
call fcn.14b44290
push ebx
mov ecx, edi
call fcn.14b42360
jmp 0x14b962c6
mov word [eax], bx
add eax, 2
push 0x7c
push eax
call fcn.14b87a8b
cmp eax, ebx
pop ecx
pop ecx
jne 0x14b962c0
mov eax, dword [esi + 0x70]
mov ecx, dword [esi + 0x78]
mov dword [eax + 0xc], ecx
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.14b8731c
leave
ret 0x1c
Function at 0x407730
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.XdylwLzm
lea edi, [esi - 0x6000]
push edi
or ebp, 0xffffffff
jmp 0x407752
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x407759
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x407748
mov eax, 1
add ebx, ebx
jne 0x40776b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x407760
jne 0x40777c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407760
xor ecx, ecx
sub eax, 3
jb 0x407790
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x407802
mov ebp, eax
add ebx, ebx
jne 0x40779b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x4077a8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x4077cc
inc ecx
add ebx, ebx
jne 0x4077b8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4077ad
jne 0x4077c9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4077ad
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x4077ec
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x4077dd
jmp 0x40774e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x4077ec
add edi, ecx
jmp 0x40774e
pop esi
lea edi, [esi + 0x5000]
mov eax, dword [edi]
or eax, eax
je 0x40784b
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x7000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x7064]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x407809
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x706c]
or eax, eax
je 0x407845
mov dword [ebx], eax
add ebx, 4
jmp 0x407826
call dword [esi + 0x7068]
mov ebp, dword [esi + 0x7070]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1ef]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x40787f
sub esp, 0xffffff80
jmp section.rUGnmMhn
Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x42e00c
nop
pop eax
nop
nop
nop
nop
nop
add eax, 0x403ac5
nop
sub eax, 0x403a6b
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
jl 0x42e030
nop
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x42e01e
nop
nop
popal
nop
nop
nop
jmp loc.00401219
Function at 0x404830
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d880
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x414008]
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 esi, dword [edi + 4]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
test esi, esi
je 0x4049a2
cmp byte [esi + 0x54], 0
je 0x4049a2
add esi, 0x1c
xorps xmm0, xmm0
xor bl, bl
movlpd qword [ebp - 0x18], xmm0
mov dword [ebp - 0x18], esi
mov byte [ebp - 0x14], bl
test esi, esi
je 0x4048b6
mov eax, dword [esi]
test eax, eax
je 0x4048b3
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4048ad
cmp eax, 0x80
je 0x4048ad
xor bl, bl
jmp 0x4048b3
mov byte [esi + 4], 1
mov bl, 1
mov byte [ebp - 0x14], bl
mov dword [ebp - 4], 0
mov eax, dword [edi + 4]
cmp dword [eax + 0x14], 8
jb 0x4048c8
mov eax, dword [eax]
push 0
push 0x80
push 4
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40497b
mov edx, dword [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x30]
call fcn.00409330
add esp, 4
mov byte [ebp - 4], 1
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x1c], 0x10
lea ecx, [ebp - 0x34]
push 0
push ecx
push dword [ebp - 0x20]
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x404969
mov ecx, dword [ebp - 0x30]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40495f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40495f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040be72
add esp, 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0xf
mov byte [ebp - 0x30], 0
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x40499b
test bl, bl
je 0x40499b
mov eax, dword [esi]
test eax, eax
je 0x404997
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov byte [esi + 4], 0
mov dword [ebp - 0x18], 0
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.0040be31
mov esp, ebp
pop ebp
ret 4
Function at 0x407130
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40dc50
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x414008]
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 eax, dword [edi]
mov ebx, dword [ebp + 8]
test eax, eax
je 0x407173
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
push 0x2c
mov word [edi + 4], 0
mov dword [ebp - 0x14], 0
call fcn.0040be42
mov esi, eax
mov dword [ebp - 0x1c], 0
add esp, 4
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x1c], 0
mov dword [esi], 0
lea eax, [esi + 0x14]
mov dword [esi + 4], 0
mov dword [esi + 8], 0xc
mov dword [esi + 0xc], eax
xor eax, eax
push 0xc
push str.Advapi32.dll
mov dword [esi + 0x10], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
call fcn.00402c10
mov dword [ebp - 4], 0
lea eax, [ebp - 0x2c]
push eax
call fcn.00409870
mov ecx, eax
call fcn.00409930
mov dword [esi + 0x28], eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x40723e
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407234
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x407234
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040be72
add esp, 8
xor eax, eax
mov dword [ebp - 0x1c], 0
sub esp, 8
mov word [ebp - 0x2c], ax
lea eax, [esi + 0x14]
mov dword [ebp - 0x18], 7
lea ecx, [ebp - 0x14]
push eax
call fcn.0040ad10
mov esi, dword [ebp - 0x14]
mov dword [esi], eax
mov dword [ebp - 4], 1
cmp dword [esi], 0
je 0x407277
lea eax, [esi + 8]
jmp 0x407279
xor eax, eax
cmp dword [ebx + 0x10], 0
je 0x407289
cmp dword [ebx + 0x14], 8
jb 0x40728b
mov ebx, dword [ebx]
jmp 0x40728b
xor ebx, ebx
push ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [edi], eax
test eax, eax
je 0x4072ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4072ac
mov byte [edi + 5], 1
cmp dword [edi], 0
setne bl
mov dword [ebp - 4], 0xffffffff
mov eax, dword [esi]
test eax, eax
je 0x4072d5
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x4072ea
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi + 4], 0
push 0x2c
push esi
call fcn.0040be72
add esp, 8
mov dword [ebp - 0x14], 0
mov al, bl
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.0040be31
mov esp, ebp
pop ebp
ret 4
Function at 0x40a8a0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40e378
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x414008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x40a8d6
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40a986
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
lea edx, [ebp - 0x28]
mov ecx, esi
call fcn.0040ab90
test al, al
je 0x40a92f
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x40a972
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40a968
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40a968
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040be72
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040be31
mov esp, ebp
pop ebp
ret
Function at 0x40ad10
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x412298
push 0x40c575
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x414008]
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 0x40ad79
xor eax, eax
jmp 0x40aeef
mov dword [ebp - 4], ebx
push str.InitializeSecurityDescriptor
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40aeba
push 1
push dword [ebp - 0x34]
call eax
test eax, eax
je 0x40aeba
push str.AllocateAndInitializeSid
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40aeba
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 0x40aeba
push str.GetLengthSid
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40aeba
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 0x40aeba
push str.InitializeAcl
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40aeba
push 2
push dword [ebp - 0x30]
push esi
call eax
test eax, eax
je 0x40aeba
push str.AddAccessAllowedAce
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40aeba
push dword [ebp - 0x28]
push 0x10000000
push 2
push esi
call eax
test eax, eax
je 0x40aeba
push str.SetSecurityDescriptorDacl
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x40aeba
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x40aea3
push 0
push ecx
push 1
push dword [ebp - 0x34]
call eax
test eax, eax
je 0x40ae90
mov ebx, 1
mov dword [ebp - 0x38], ebx
cmp dword [ebp - 0x2c], 0
je 0x40aea0
jmp 0x40aeba
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.0040af16
test ebx, ebx
jne 0x40aeed
test esi, esi
je 0x40aedf
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 0x40aeed
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.0040be31
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40b540
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [0x414008]
xor eax, esp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x18]
push ebx
push ebp
mov ebp, ecx
mov dword [esp + 8], eax
push esi
mov esi, dword [esp + 0x20]
xor ebx, ebx
push edi
cmp dword [ebp + 0x10], 0xffffffff
mov edi, dword [esp + 0x20]
je 0x40b5c2
mov ecx, 0x100000
nop dword [eax]
nop word [eax + eax]
cmp esi, 0x100000
mov dword [esp + 0x14], 0
push 0
mov eax, esi
cmova eax, ecx
lea ecx, [esp + 0x18]
push ecx
push eax
push edi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x14]
add ebx, ecx
test eax, eax
je 0x40b5c2
test ecx, ecx
je 0x40b5be
add edi, ecx
sub esi, ecx
mov ecx, 0x100000
jne 0x40b580
xor eax, eax
jmp 0x40b5c7
mov eax, 1
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40b5d1
mov dword [ecx], ebx
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040be31
add esp, 0xc
ret 0xc

Function at 0x40b650
Capabilities:
Get file size

Disassembly:
sub esp, 8
mov eax, dword [0x414008]
xor eax, esp
mov dword [esp + 4], eax
push esi
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x40b67e
mov eax, 1
pop esi
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.0040be31
add esp, 8
ret 4
mov eax, dword [ecx + 0xc]
cmp eax, 0xffffffff
je 0x40b667
push edi
lea ecx, [esp + 8]
mov dword [esp + 8], 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40b6c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40b6c4
pop edi
mov eax, 1
pop esi
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.0040be31
add esp, 8
ret 4
mov ecx, dword [esp + 8]
xor eax, eax
add eax, edi
mov dword [esi], eax
adc ecx, 0
xor eax, eax
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0xc]
pop edi
pop esi
xor ecx, esp
call fcn.0040be31
add esp, 8
ret 4