joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407cfb
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x407d3a
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x407d3a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x407d3a
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x407d3a
cmp dword [ecx + 0x74], 0xe
jbe 0x407d3a
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x40d646
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c8a8
push 0x41c8a0
push str.FlsAlloc
push 0x1f
call fcn.0040d562
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d67a
push dword [ebp + 8]
mov ecx, esi
call dword [0x41b2a8]
call esi
jmp 0x40d680
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40d6c4
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c8b8
push 0x41c8b0
push str.FlsGetValue
push 0x21
call fcn.0040d562
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d6fb
push dword [ebp + 8]
mov ecx, esi
call dword [0x41b2a8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40d703
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c8c0
push 0x41c8b8
push str.FlsSetValue
push 0x22
call fcn.0040d562
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d73d
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41b2a8]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x410281
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x424018]
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 0x4102cc
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.0041041c
test al, al
jne 0x4102c6
sub edx, 2
cmp edx, edi
jne 0x4102ac
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x4102ee
lea eax, [edi + 2]
cmp edx, eax
je 0x4102ee
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.004101cd
add esp, 0x10
jmp 0x4103e8
push esi
lea ecx, [ebp - 0x255]
call fcn.0041041c
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 0x410331
push dword [ebp - 0x25c]
jmp 0x4102de
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 0x41036e
cmp word [ebp - 0x226], 0
je 0x41038f
cmp word [ebp - 0x226], ax
jne 0x41036e
cmp word [ebp - 0x224], 0
je 0x41038f
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.004101cd
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4103db
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x410348
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x4103c3
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x4103e8
push 0x40ff2e
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004160f0
add esp, 0x10
jmp 0x4103b8
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.00404fae
leave
ret
Function at 0x416c9f
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 + 0x425120]
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 0x416cdf
cmp byte [ebx], 0xa
jne 0x416cdf
or byte [edi + eax + 0x28], 4
jmp 0x416ce4
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 0x416de3
mov dl, byte [eax]
cmp dl, 0x1a
je 0x416dc6
inc eax
cmp dl, 0xd
je 0x416d10
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x416d36
cmp eax, ecx
jae 0x416d44
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 0x416cf8
jmp 0x416de3
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 0x416dc1
cmp dword [ebp - 0x10], 0
je 0x416dc1
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x425120]
test byte [eax + edi + 0x28], 0x48
je 0x416d9b
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x416d86
mov byte [esi], dl
jmp 0x416d97
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x425120]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x416de3
cmp byte [ebp - 1], 0xa
jne 0x416daa
cmp esi, ebx
jne 0x416daa
mov byte [esi], 0xa
jmp 0x416de2
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00416c0f
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x416de3
mov byte [esi], 0xd
jmp 0x416de2
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x425120]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x416de0
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x416de3
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x416dec
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 + 0x425120]
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 0x416e32
cmp word [ebx], dx
jne 0x416e32
or byte [eax + edi + 0x28], 4
jmp 0x416e37
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 0x416f9a
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 0x416f7a
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x416e78
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x416eae
cmp eax, edx
jae 0x416ebc
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 0x416e53
jmp 0x416f9a
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 0x416f75
cmp dword [ebp - 0x18], 0
je 0x416f75
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x425120]
test byte [eax + edi + 0x28], 0x48
je 0x416f4b
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 0x416f0f
mov word [esi], cx
jmp 0x416f46
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x425120]
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 + 0x425120]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x425120]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x416f9a
pop eax
cmp word [ebp - 4], ax
jne 0x416f5b
cmp esi, ebx
jne 0x416f5b
mov word [esi], ax
jmp 0x416f97
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00416c0f
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x416f9a
push 0xd
pop eax
jmp 0x416f56
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x425120]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x416f94
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x416f9a
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 0x4175f5
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00417571
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x417764
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x417764
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x417719
jg 0x417651
test eax, eax
je 0x41770f
push 1
push 0x1000
call fcn.0040d3b2
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x417674
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x417706
push 0x8000
push ebx
call fcn.0040cede
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x41769d
jg 0x417698
cmp ecx, 0x1000
jb 0x41769d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0041303c
add esp, 0x10
cmp eax, 0xffffffff
je 0x4176e2
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x417698
jl 0x4176c9
test ecx, ecx
jne 0x41768a
push dword [ebp - 0xc]
push ebx
call fcn.0040cede
push esi
call fcn.0040d40f
add esp, 0xc
xor ebx, ebx
jmp 0x417772
cmp byte [edi + 0x24], 0
je 0x4176f9
cmp dword [edi + 0x20], 5
jne 0x4176f9
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x417704
mov ebx, dword [edi + 0x18]
jmp 0x417706
xor ebx, ebx
push esi
call fcn.0040d40f
pop ecx
jmp 0x417772
test ecx, ecx
jg 0x4176db
jl 0x417719
test eax, eax
jae 0x4176db
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00416c0f
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x417739
cmp byte [edi + 0x1c], 0
je 0x4176db
jmp 0x41776a
push ebx
call fcn.0041189a
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4176db
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x417772
cmp byte [edi + 0x1c], 0
je 0x41776f
mov ebx, dword [edi + 0x18]
jmp 0x417772
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00416c0f
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x1002958e
Capabilities:
Encode data using xor

Disassembly:
cmp byte [ecx + 0x14], 0
je 0x100295d6
push ebx
push edi
push esi
sub esp, 8
movsd xmm0, qword [0x100b5e10]
movsd qword [esp], xmm0
xor eax, eax
xor esi, esi
xor edx, edx
xor edi, edi
mov ebx, eax
and ebx, 7
mov bl, byte [esp + ebx]
xor byte [ecx + eax], bl
add edx, 1
adc edi, 0
cmp eax, 0x13
sbb esi, 0
mov eax, edx
mov esi, edi
jb 0x100295af
mov byte [ecx + 0x14], 0
add esp, 8
pop esi
pop edi
pop ebx
ret

Function at 0x100295d8
Capabilities:
Encode data using xor

Disassembly:
cmp byte [ecx + 0x29], 0
je 0x10029620
push ebx
push edi
push esi
sub esp, 8
movsd xmm0, qword [0x100b5e20]
movsd qword [esp], xmm0
xor eax, eax
xor esi, esi
xor edx, edx
xor edi, edi
mov ebx, eax
and ebx, 7
mov bl, byte [esp + ebx]
xor byte [ecx + eax], bl
add edx, 1
adc edi, 0
cmp eax, 0x28
sbb esi, 0
mov eax, edx
mov esi, edi
jb 0x100295f9
mov byte [ecx + 0x29], 0
add esp, 8
pop esi
pop edi
pop ebx
ret

Function at 0x10029622
Capabilities:
Encode data using xor

Disassembly:
cmp byte [ecx + 0x15], 0
je 0x1002966a
push ebx
push edi
push esi
sub esp, 8
movsd xmm0, qword [0x100b5e30]
movsd qword [esp], xmm0
xor eax, eax
xor esi, esi
xor edx, edx
xor edi, edi
mov ebx, eax
and ebx, 7
mov bl, byte [esp + ebx]
xor byte [ecx + eax], bl
add edx, 1
adc edi, 0
cmp eax, 0x14
sbb esi, 0
mov eax, edx
mov esi, edi
jb 0x10029643
mov byte [ecx + 0x15], 0
add esp, 8
pop esi
pop edi
pop ebx
ret
Function at 0x1007c330
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xd8
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x10], 0x100bb03c
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], esi
test edi, edi
je 0x1007c36e
mov dword [edi], 0
call fcn.100825a0
mov dword [edi + 4], eax
mov dword [esp], 0
call fcn.100825a0
mov dword [esp + 4], eax
mov edi, esp
lea eax, [esp + 0x80]
lea ecx, [esp + 8]
push edi
push eax
push esi
push ecx
call fcn.1007bad0
add esp, 0x10
movzx eax, byte [esp + 8]
cmp eax, 2
je 0x1007c3b1
test eax, eax
jne 0x1007c3bb
lea ecx, [esp + 0x10]
push edi
call fcn.1007c550
jmp 0x1007c3da
test byte [ebx], 1
je 0x1007c3dc
mov eax, dword [ebx + 8]
jmp 0x1007c3df
mov dword [esp + 0x30], 0x14
lea eax, [esp + 0x30]
lea ecx, [esp + 0x10]
push 0x100bb04d
push eax
push ecx
call fcn.1007d120
add esp, 0xc
jmp 0x1007c3f0
lea eax, [ebx + 2]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, eax
mov al, 1
test ecx, ecx
je 0x1007c3f8
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.100797c0
add esp, 4
mov esi, eax
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 0x11
jne 0x1007c474
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
call fcn.10082400
mov dword [esp + 4], eax
mov dword [esp], esi
mov dword [esp + 0x28], 0
call fcn.100825a0
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x28]
lea ecx, [esp + 0x30]
lea edx, [esp + 0x20]
push eax
push ecx
push ebx
push edx
call fcn.1007bad0
add esp, 0x10
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
cmp al, 2
jne 0x1007c497
xor eax, eax
jmp 0x1007c3f0
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
call fcn.10082400
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], esi
lea eax, [esp + 0x30]
lea ecx, [esp + 0x10]
push eax
jmp 0x1007c3aa
jmp 0x1007c3a5
Function at 0x1007c7b0
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x28
mov edi, dword [ebp + 0xc]
mov ebx, edi
sar ebx, 0x1f
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__get_osfhandle]
mov esi, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
movsd xmm0, qword [esp + 0x18]
movsd qword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
sub esp, 0x14
test eax, eax
je 0x1007c82e
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
sub esp, 4
test eax, eax
je 0x1007c82e
mov esi, dword [ebp + 0x10]
mov dword [esi], 0
call fcn.100825a0
mov dword [esi + 4], eax
xor eax, eax
jmp 0x1007c85b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], eax
call fcn.100797c0
mov esi, eax
mov edi, dword [sym.imp.msvcrt.dll__errno]
call edi
mov dword [eax], esi
call edi
mov esi, dword [eax]
call fcn.10082400
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 4], eax
mov dword [ecx], esi
mov al, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x1007d020
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x80
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [esp + 0x10], 0x100bb03c
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], 0
test esi, esi
je 0x1007d05f
mov dword [esi], 0
call fcn.100825a0
mov dword [esi + 4], eax
test byte [edi], 1
je 0x1007d069
mov eax, dword [edi + 8]
jmp 0x1007d06c
lea eax, [edi + 2]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, eax
mov al, 1
test ecx, ecx
jne 0x1007d112
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.100797c0
add esp, 4
mov esi, eax
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov dword [eax], esi
call ebx
cmp dword [eax], 0x11
jne 0x1007d0e9
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
call fcn.10082400
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp], 0
call fcn.100825a0
mov dword [esp + 4], eax
mov eax, esp
lea ecx, [esp + 0x28]
lea edx, [esp + 0x20]
push eax
push ecx
push edi
push edx
call fcn.1007bad0
add esp, 0x10
cmp byte [esp + 0x20], 2
jne 0x1007d104
xor eax, eax
jmp 0x1007d112
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
call fcn.10082400
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], esi
lea eax, [esp + 0x28]
jmp 0x1007d108
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
push eax
call fcn.1007c550
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x1007d270
Capabilities:
Get common file path

Disassembly:
push ebx
push edi
push esi
push 0x21c
call sub.msvcrt.dll_malloc
add esp, 4
mov edi, eax
push eax
push 0x10e
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp eax, 0x10f
jb 0x1007d2c5
mov ebx, eax
add eax, eax
push eax
call sub.msvcrt.dll_malloc
add esp, 4
mov esi, eax
test edi, edi
je 0x1007d2b3
push edi
call fcn.100b3ef8
add esp, 4
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x1007d2cb
mov eax, esi
pop esi
pop edi
pop ebx
ret
mov esi, edi
test eax, eax
jne 0x1007d2bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.100797c0
add esp, 4
mov edi, eax
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], edi
xor eax, eax
test esi, esi
je 0x1007d2c1
push esi
call fcn.100b3ef8
xor eax, eax
add esp, 4
pop esi
pop edi
pop ebx
ret

Function at 0x1007df80
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x38
mov esi, dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1007e05f
mov ecx, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x10]
test cl, 1
jne 0x1007e078
mov ecx, eax
and ecx, 0x400
je 0x1007e078
sub esp, 0x1c
movaps xmm0, xmmword [0x100bafc0]
movups xmmword [esp + 4], xmm0
mov dword [esp], esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x2000000
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 4], eax
cmp eax, 0xffffffff
je 0x1007e09b
mov esi, eax
lea eax, [esp + 8]
push 0x28
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandleEx]
test eax, eax
je 0x1007e038
mov eax, dword [esp + 0x28]
mov edx, eax
and edx, 0xfffffffe
xor ecx, ecx
test bl, 0x92
sete cl
or ecx, edx
mov dword [esp + 0x28], ecx
xor edi, edi
cmp ecx, eax
je 0x1007e056
push 0x28
lea eax, [esp + 0xc]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileInformationByHandle]
test eax, eax
jne 0x1007e056
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.100797c0
add esp, 4
mov edi, eax
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], edi
mov edi, 0xffffffff
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1007e0b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.100797c0
add esp, 4
mov esi, eax
call dword [sym.imp.msvcrt.dll__errno]
jmp 0x1007e0b2
mov edx, eax
and edx, 0xfffffffe
xor ecx, ecx
test bl, 0x92
sete cl
or ecx, edx
xor edi, edi
cmp ecx, eax
je 0x1007e0b9
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x1007e0b9
jmp 0x1007e05f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.100797c0
add esp, 4
mov esi, eax
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
mov edi, 0xffffffff
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x1007e710
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x28
mov eax, dword [ebp + 8]
movaps xmm0, xmmword [0x100baff0]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x2000000
call dword [sym.imp.KERNEL32.dll_CreateFileW]
sub esp, 0x1c
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
je 0x1007e7c8
mov esi, eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x20], eax
sar eax, 0x1f
mov dword [esp + 0x24], eax
movsd xmm0, qword [esp + 0x20]
movsd qword [esp + 4], xmm0
mov dword [esp], esi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
sub esp, 0x14
test eax, eax
je 0x1007e79d
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
sub esp, 4
xor edi, edi
test eax, eax
jne 0x1007e7ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], eax
call fcn.100797c0
mov edi, eax
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], edi
mov edi, 0xffffffff
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x1007e7e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], eax
call fcn.100797c0
mov esi, eax
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
mov edi, 0xffffffff
mov eax, edi
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret
Function at 0x10081550
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
call fcn.100897c0
test al, al
je 0x10081597
mov esi, dword [fcn.100896f0]
push 2
call esi
add esp, 4
push ebp
push ebx
push edi
push str.libunwind:__Unwind_SetGR_context_p__reg_d__value0x_0x__n
push eax
call fcn.10080b70
add esp, 0x14
push 2
call esi
add esp, 4
push eax
call sub.msvcrt.dll_fflush
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.100898b0