joyce8/EMBER2024-capa huggingface dataset:
Function at 0x660cf0b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword [0x663127c4]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x660cf17b
sub esp, 0x28
mov dword [esp + 0x14], 0x8faa56ef
mov dword [esp + 0x18], 0x55cf3ef2
lea edi, [esp + 0x1c]
lea esi, [0x661eeea4]
call fcn.65f65002
xor eax, eax
jmp 0x660cf100
movzx edi, byte [esp + ebx + 0x14]
lea edx, [edi + edx - 0x4e]
mov byte [esp + ebp + 0x14], dl
xchg esi, eax
mov byte [esp + ebx + 0x14], al
xchg esi, eax
add eax, 2
cmp eax, 0xc
jge 0x660cf132
movzx edx, byte [esp + eax + 0x1c]
movzx ebx, byte [esp + eax + 0x1d]
mov ebp, edx
xor edx, ebx
xchg ebp, eax
movzx eax, al
xchg ebp, eax
add edx, eax
cmp ebp, 8
jae 0x660cf16e
movzx ebx, bl
movzx esi, byte [esp + ebp + 0x14]
lea esi, [esi + edx - 0x4e]
cmp ebx, 8
jb 0x660cf0ea
jmp 0x660cf162
mov dword [esp], 0
lea eax, [esp + 0x14]
mov dword [esp + 4], eax
mov dword [esp + 8], 8
call fcn.65f4fbe0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
add esp, 0x28
ret
mov eax, ebx
mov ecx, 8
call fcn.65f649b0
mov eax, ebp
mov ecx, 8
call fcn.65f649b0
nop
call fcn.65f63530
jmp fcn.660cf0b0

Function at 0x660cf640
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
mov dword [0x66318450], eax
test eax, eax
je 0x660cf688
mov dword [esp], 0x66318454
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
sub esp, 4
add esp, 0x1c
ret
mov dword [esp], 2
call dword [0x660de3dc]
mov dword [esp + 8], 0x3d
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.runtime:_failed_to_create_runtime_initialization_wait_event._n
call sub.msvcrt.dll_fwrite
call sub.msvcrt.dll_abort
lea esi, [esi]
Function at 0x660cfe00
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x663187d8]
test esi, esi
jle 0x660cff10
mov edi, dword [0x663187dc]
xor ebx, ebx
lea edx, [edi + 0xc]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x660cfe34
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x660cfeb5
add ebx, 1
add edx, 0x14
cmp ebx, esi
jne 0x660cfe20
mov dword [esp], eax
mov ebx, eax
call fcn.660d0550
test eax, eax
mov edi, eax
je 0x660cff37
mov eax, dword [0x663187dc]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.660d0650
add eax, dword [edi + 0xc]
mov edx, dword [0x663187dc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x660cff17
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x660cfeae
sub eax, 4
and eax, 0xfffffffb
jne 0x660cfec0
add dword [0x663187d8], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
add ebx, dword [0x663187dc]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov dword [ebx + 4], eax
mov dword [ebx + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x660cfeae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.660d0b48
lea esi, [esi]
xor esi, esi
jmp 0x660cfe3e
mov eax, dword [0x663187dc]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.660d0b48
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.660d0b48
mov esi, esi
lea edi, [edi]

Function at 0x660d01d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x663187e8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x663187e0]
sub esp, 4
test ebx, ebx
je 0x660d0225
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x660d021e
test esi, esi
je 0x660d021e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x660d0200
mov dword [esp], 0x663187e8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x660d0b48
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.660d0b20
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.660d0b20
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
nop
jmp fcn.65f013e0
Function at 0x4059c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x4059eb
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004061c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], eax
test eax, eax
je 0x405a0d
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x405a0f
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test edi, edi
jl 0x405a93
jg 0x405a24
test esi, esi
je 0x405a93
test ecx, ecx
jl 0x405a6d
jg 0x405a2e
test eax, eax
je 0x405a6d
cmp edi, ecx
jg 0x405a42
jl 0x405a38
cmp esi, eax
jae 0x405a42
mov eax, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x1c]
call fcn.00456f30
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x30]
add edx, ecx
sub esi, ecx
sbb edi, dword [esp + 0x10]
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
jmp 0x405a70
mov edx, dword [ebp + 8]
test edi, edi
jl 0x405a93
jg 0x405a7a
test esi, esi
je 0x405a93
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x405a93
push eax
push esi
push 1
push edx
call fcn.0045ab3c
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x405ab0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x38], 0
je 0x405adb
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004062a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi + 0x1c]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
test eax, eax
je 0x405afd
mov eax, dword [edi + 0x2c]
mov eax, dword [eax]
jmp 0x405aff
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test ebx, ebx
jl 0x405b9e
jg 0x405b1c
test esi, esi
je 0x405b9e
test ecx, ecx
jl 0x405b69
jg 0x405b26
test eax, eax
je 0x405b69
cmp ebx, ecx
jg 0x405b3a
jl 0x405b30
cmp esi, eax
jae 0x405b3a
mov eax, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
push eax
push dword [esp + 0x18]
push dword [ebp + 8]
call fcn.00456f30
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [edi + 0x2c]
add edx, ecx
sub esi, ecx
mov dword [esp + 0xc], edx
sbb ebx, dword [esp + 0x10]
sub dword [eax], ecx
mov eax, dword [edi + 0x1c]
add dword [eax], ecx
jmp 0x405b70
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
test ebx, ebx
jl 0x405b9e
jg 0x405b7a
test esi, esi
je 0x405b9e
cmp dword [edi + 0x4c], 0
je 0x405b9e
mov ecx, edi
call fcn.00406e70
push dword [edi + 0x4c]
push esi
push 1
push dword [esp + 0x18]
call fcn.0045b116
add esp, 0x10
sub esi, eax
sbb ebx, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
pop edi
pop esi
sbb edx, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x405eb0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x30
mov eax, dword [0x4a8068]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
mov ebx, dword [esp + 0x38]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x405ee0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00455137
add esp, 0x30
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x405f1d
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x405f1d
lea ecx, [edi - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00455137
add esp, 0x30
ret 4
cmp dword [esi + 0x4c], 0
je 0x406012
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x405f45
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x405f79
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.0045a217
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00455137
add esp, 0x30
ret 4
lea eax, [esp + 0x10]
mov byte [esp + 0xf], bl
mov edx, dword [ecx]
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x23]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x1c]
test eax, eax
js 0x406012
cmp eax, 1
jle 0x405fe1
cmp eax, 3
jne 0x406012
push dword [esi + 0x4c]
movsx eax, byte [esp + 0x13]
push eax
call fcn.0045a217
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00455137
add esp, 0x30
ret 4
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x18]
sub edi, eax
je 0x406000
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.0045ab3c
add esp, 0x10
cmp edi, eax
jne 0x406012
lea eax, [esp + 0xf]
mov byte [esi + 0x3d], 1
cmp dword [esp + 0x14], eax
jne 0x405f07
mov ecx, dword [esp + 0x38]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00455137
add esp, 0x30
ret 4
Function at 0x4074d0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47c9f0
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x4a8068]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 8
mov dword [edi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.0045514d
mov esi, eax
push 1
mov dword [ebp - 4], 0
call fcn.00453b53
mov dword [esi + 4], eax
lea ecx, [edi + 8]
lea eax, [edi + 4]
mov dword [edi + 0x34], esi
mov dword [edi + 0xc], eax
add esp, 8
lea eax, [edi + 0x14]
mov dword [edi + 0x10], ecx
mov dword [edi + 0x1c], eax
lea eax, [edi + 0x18]
mov dword [edi + 0x20], eax
lea eax, [edi + 0x24]
mov dword [edi + 0x2c], eax
lea eax, [edi + 0x28]
mov dword [edi + 0x30], eax
mov dword [ecx], 0
mov eax, dword [edi + 0x20]
mov dword [eax], 0
mov eax, dword [edi + 0x30]
mov dword [eax], 0
mov eax, dword [edi + 0xc]
mov dword [eax], 0
mov eax, dword [edi + 0x1c]
mov dword [eax], 0
mov eax, dword [edi + 0x2c]
mov dword [eax], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40cf10
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47d338
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x4a8068]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.00405270
test al, al
je 0x40cf50
xor al, al
jmp 0x40d086
push esi
lea ecx, [ebp - 0x2c]
call fcn.00405400
mov dword [ebp - 4], 0
lea eax, [ebp - 0x2c]
push 4
push eax
call fcn.0040f610
add esp, 8
lea ecx, [ebp - 0x2c]
call fcn.00405280
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x40d073
lea ecx, [ebp - 0x44]
call fcn.004053e0
mov byte [ebp - 4], 1
lea edx, [ebp - 0x44]
lea ecx, [ebp - 0x2c]
call fcn.004193a0
test al, al
je 0x40cfb2
lea ecx, [ebp - 0x44]
call fcn.00405280
push eax
call edi
mov esi, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.004052c0
cmp esi, 0xffffffff
jne 0x40d073
lea ecx, [ebp - 0x2c]
call fcn.004069c0
cmp eax, 2
jbe 0x40d06f
lea ecx, [ebp - 0x2c]
call fcn.004069c0
lea ecx, [ebp - 0x2c]
lea ebx, [eax - 1]
call fcn.00406710
mov esi, eax
mov ecx, esi
cmp dword [esi + 0x14], 8
jb 0x40cff7
mov ecx, dword [esi]
cmp word [ecx + ebx*2], 0x5c
je 0x40d016
lea ecx, [ebp - 0x2c]
call fcn.004069c0
cmp dword [esi + 0x14], 8
jb 0x40d00e
mov esi, dword [esi]
cmp word [esi + eax*2 - 2], 0x2f
jne 0x40d06f
lea eax, [ebp - 0x2c]
push 0x20
push eax
call fcn.0040f610
add esp, 8
lea ecx, [ebp - 0x2c]
call fcn.00405280
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x40d073
lea ecx, [ebp - 0x44]
call fcn.004053e0
mov byte [ebp - 4], 2
lea edx, [ebp - 0x44]
lea ecx, [ebp - 0x2c]
call fcn.004193a0
test al, al
je 0x40d05e
lea ecx, [ebp - 0x44]
call fcn.00405280
push eax
call edi
mov esi, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.004052c0
cmp esi, 0xffffffff
jne 0x40d073
xor bl, bl
jmp 0x40d075
mov bl, 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004052c0
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 - 0x14]
xor ecx, ebp
call fcn.00455137
mov esp, ebp
pop ebp
ret
Function at 0x40d0b0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47d338
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x4a8068]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.00405270
test al, al
je 0x40d0f0
xor al, al
jmp 0x40d22c
push esi
lea ecx, [ebp - 0x2c]
call fcn.00405400
mov dword [ebp - 4], 0
lea eax, [ebp - 0x2c]
push 4
push eax
call fcn.0040f610
add esp, 8
lea ecx, [ebp - 0x2c]
call fcn.00405280
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40d15f
lea ecx, [ebp - 0x44]
call fcn.004053e0
mov byte [ebp - 4], 1
lea edx, [ebp - 0x44]
lea ecx, [ebp - 0x2c]
call fcn.004193a0
test al, al
je 0x40d14e
lea ecx, [ebp - 0x44]
call fcn.00405280
push eax
call edi
mov ebx, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.004052c0
cmp ebx, 0xffffffff
je 0x40d168
test bl, 0x10
je 0x40d219
lea ecx, [ebp - 0x2c]
call fcn.004069c0
cmp eax, 2
jbe 0x40d215
lea ecx, [ebp - 0x2c]
call fcn.004069c0
lea ecx, [ebp - 0x2c]
lea ebx, [eax - 1]
call fcn.00406710
mov esi, eax
mov ecx, esi
cmp dword [esi + 0x14], 8
jb 0x40d198
mov ecx, dword [esi]
cmp word [ecx + ebx*2], 0x5c
je 0x40d1b7
lea ecx, [ebp - 0x2c]
call fcn.004069c0
cmp dword [esi + 0x14], 8
jb 0x40d1af
mov esi, dword [esi]
cmp word [esi + eax*2 - 2], 0x2f
jne 0x40d215
lea eax, [ebp - 0x2c]
push 0x20
push eax
call fcn.0040f610
add esp, 8
lea ecx, [ebp - 0x2c]
call fcn.00405280
push eax
call edi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40d210
lea ecx, [ebp - 0x44]
call fcn.004053e0
mov byte [ebp - 4], 2
lea edx, [ebp - 0x44]
lea ecx, [ebp - 0x2c]
call fcn.004193a0
test al, al
je 0x40d1ff
lea ecx, [ebp - 0x44]
call fcn.00405280
push eax
call edi
mov ebx, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.004052c0
cmp ebx, 0xffffffff
je 0x40d215
test bl, 0x10
je 0x40d219
xor bl, bl
jmp 0x40d21b
mov bl, 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004052c0
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 - 0x14]
xor ecx, ebp
call fcn.00455137
mov esp, ebp
pop ebp
ret
Function at 0x40d250
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47d370
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x4a8068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.00405270
test al, al
je 0x40d28f
xor al, al
jmp 0x40d31a
push esi
lea ecx, [ebp - 0x28]
call fcn.00405400
mov dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push 4
push eax
call fcn.0040f610
add esp, 8
lea ecx, [ebp - 0x28]
call fcn.00405280
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call esi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40d2fe
lea ecx, [ebp - 0x40]
call fcn.004053e0
mov byte [ebp - 4], 1
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x28]
call fcn.004193a0
test al, al
je 0x40d2ed
lea ecx, [ebp - 0x40]
call fcn.00405280
push eax
call esi
mov ebx, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.004052c0
cmp ebx, 0xffffffff
je 0x40d307
test bl, 0x10
je 0x40d307
mov bl, 1
jmp 0x40d309
xor bl, bl
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004052c0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00455137
mov esp, ebp
pop ebp
ret
Function at 0x40dc20
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47d4e0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x4a8068]
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
call fcn.00405270
test al, al
je 0x40dc5d
xor al, al
jmp 0x40de1b
push edi
call fcn.0040d250
add esp, 4
test al, al
je 0x40dc71
mov al, 1
jmp 0x40de1b
push 0
mov ecx, edi
call fcn.00405280
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push eax
call ebx
test eax, eax
jne 0x40dcc0
lea ecx, [ebp - 0x28]
call fcn.004053e0
mov dword [ebp - 4], 0
lea edx, [ebp - 0x28]
mov ecx, edi
call fcn.004193a0
test al, al
je 0x40dcb1
push 0
lea ecx, [ebp - 0x28]
call fcn.00405280
push eax
call ebx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004052c0
push edi
call fcn.0040d250
add esp, 4
test al, al
jne 0x40dc6a
mov ecx, edi
call fcn.004069c0
xor esi, esi
mov dword [ebp - 0x44], eax
test eax, eax
je 0x40ddbc
mov ecx, edi
call fcn.00406710
mov ebx, eax
nop word [eax + eax]
mov ecx, dword [ebx + 0x14]
mov eax, ebx
cmp ecx, 8
jb 0x40dcfc
mov eax, dword [ebx]
mov edx, 0x2f
cmp dx, word [eax + esi*2]
mov edx, 0x5c
je 0x40dd1f
mov eax, ebx
cmp ecx, 8
jb 0x40dd15
mov eax, dword [ebx]
cmp dx, word [eax + esi*2]
jne 0x40ddac
push esi
push 0
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call fcn.00405220
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.00405270
test al, al
jne 0x40dd9d
lea eax, [ebp - 0x28]
push eax
call fcn.0040cf10
add esp, 4
test al, al
jne 0x40dd9d
push 0
lea ecx, [ebp - 0x28]
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40dd9d
lea ecx, [ebp - 0x40]
call fcn.004053e0
mov byte [ebp - 4], 2
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x28]
call fcn.004193a0
test al, al
je 0x40dd91
push 0
lea ecx, [ebp - 0x40]
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x40]
call fcn.004052c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004052c0
inc esi
cmp esi, dword [ebp - 0x44]
jb 0x40dcf0
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push edi
call fcn.0040cf10
add esp, 4
test al, al
jne 0x40de12
push 0
mov ecx, edi
call fcn.00405280
push eax
call ebx
test eax, eax
jne 0x40de12
lea ecx, [ebp - 0x40]
call fcn.004053e0
mov dword [ebp - 4], 3
lea edx, [ebp - 0x40]
mov ecx, edi
call fcn.004193a0
test al, al
je 0x40de03
push 0
lea ecx, [ebp - 0x40]
call fcn.00405280
push eax
call ebx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.004052c0
push edi
call fcn.0040d250
add esp, 4
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.00455137
mov esp, ebp
pop ebp
ret

Function at 0x40eba0
Capabilities:
Create directory

Disassembly:
mov ecx, dword [esp + 4]
jmp fcn.0040dc20
Function at 0x417e20
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47e9f8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x4a8068]
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 [ebp + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [edi]
test eax, eax
je 0x417e66
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
lea ecx, [ebp - 0x14]
mov word [edi + 4], 0
mov dword [ebp - 0x14], 0
call fcn.0041ce30
mov dword [ebp - 4], 0
mov esi, dword [ebp - 0x14]
cmp dword [esi], 0
je 0x417e8f
lea ebx, [esi + 8]
jmp 0x417e91
xor ebx, ebx
mov ecx, dword [ebp - 0x18]
call fcn.00405270
test al, al
jne 0x417ea7
mov ecx, dword [ebp - 0x18]
call fcn.00405280
jmp 0x417ea9
xor eax, eax
push eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [edi], eax
test eax, eax
je 0x417eca
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x417eca
mov byte [edi + 5], 1
cmp dword [edi], 0
setne bl
mov dword [ebp - 4], 0xffffffff
mov eax, dword [esi]
test eax, eax
je 0x417ef3
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 0x417f08
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi + 4], 0
push 0x2c
push esi
call fcn.0045517d
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.00455137
mov esp, ebp
pop ebp
ret 4

Function at 0x418990
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47d718
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x4a8068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov ebx, ecx
and esi, 0xffffb1af
push esi
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x4189d9
mov al, 1
jmp 0x418a21
lea ecx, [ebp - 0x28]
call fcn.004053e0
mov dword [ebp - 4], 0
lea edx, [ebp - 0x28]
mov ecx, ebx
call fcn.004193a0
test al, al
je 0x418a0e
push esi
lea ecx, [ebp - 0x28]
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x418a0e
mov bl, 1
jmp 0x418a10
xor bl, bl
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004052c0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00455137
mov esp, ebp
pop ebp
ret