joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4a5cdd
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 + 0x503688]
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 0x4a5d1d
cmp byte [ebx], 0xa
jne 0x4a5d1d
or byte [edi + eax + 0x28], 4
jmp 0x4a5d22
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 0x4a5e21
mov dl, byte [eax]
cmp dl, 0x1a
je 0x4a5e04
inc eax
cmp dl, 0xd
je 0x4a5d4e
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x4a5d74
cmp eax, ecx
jae 0x4a5d82
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 0x4a5d36
jmp 0x4a5e21
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 0x4a5dff
cmp dword [ebp - 0x10], 0
je 0x4a5dff
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x503688]
test byte [eax + edi + 0x28], 0x48
je 0x4a5dd9
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4a5dc4
mov byte [esi], dl
jmp 0x4a5dd5
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x503688]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4a5e21
cmp byte [ebp - 1], 0xa
jne 0x4a5de8
cmp esi, ebx
jne 0x4a5de8
mov byte [esi], 0xa
jmp 0x4a5e20
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004a6d7c
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4a5e21
mov byte [esi], 0xd
jmp 0x4a5e20
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x503688]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a5e1e
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a5e21
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4a5e2a
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 + 0x503688]
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 0x4a5e70
cmp word [ebx], dx
jne 0x4a5e70
or byte [eax + edi + 0x28], 4
jmp 0x4a5e75
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 0x4a5fd8
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 0x4a5fb8
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4a5eb6
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4a5eec
cmp eax, edx
jae 0x4a5efa
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 0x4a5e91
jmp 0x4a5fd8
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 0x4a5fb3
cmp dword [ebp - 0x18], 0
je 0x4a5fb3
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x503688]
test byte [eax + edi + 0x28], 0x48
je 0x4a5f89
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 0x4a5f4d
mov word [esi], cx
jmp 0x4a5f84
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x503688]
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 + 0x503688]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x503688]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x4a5fd8
pop eax
cmp word [ebp - 4], ax
jne 0x4a5f99
cmp esi, ebx
jne 0x4a5f99
mov word [esi], ax
jmp 0x4a5fd5
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004a6d7c
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4a5fd8
push 0xd
pop eax
jmp 0x4a5f94
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x503688]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x4a5fd2
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x4a5fd8
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 0x4a88e4
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 0x4a8981
push ebx
push esi
call fcn.004a88ad
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.004a2f7f
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4a892e
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4a8980
push edi
push eax
call fcn.004a3b94
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4a894e
call fcn.004a2df3
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4a897f
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004a2f7f
add esp, 0x20
test eax, eax
jne 0x4a896d
push edi
call fcn.004a2df3
jmp 0x4a8975
push ebx
call fcn.004a2df3
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 0x4a8984
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4a8995
pop esi
ret
push ebx
push edi
push esi
call fcn.004a88ad
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.004a3b94
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4a89bd
push ebx
push esi
push edi
call fcn.0048ddb0
add esp, 0xc
push 0
call fcn.004a2df3
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret
Function at 0x4ad88a
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.004ad806
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4ad9f9
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4ad9f9
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4ad9ae
jg 0x4ad8e6
test eax, eax
je 0x4ad9a4
push 1
push 0x1000
call fcn.004a2d96
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4ad909
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4ad99b
push 0x8000
push ebx
call fcn.0049ef9b
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x4ad932
jg 0x4ad92d
cmp ecx, 0x1000
jb 0x4ad932
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004a5ac1
add esp, 0x10
cmp eax, 0xffffffff
je 0x4ad977
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 0x4ad92d
jl 0x4ad95e
test ecx, ecx
jne 0x4ad91f
push dword [ebp - 0xc]
push ebx
call fcn.0049ef9b
push esi
call fcn.004a2df3
add esp, 0xc
xor ebx, ebx
jmp 0x4ada07
cmp byte [edi + 0x24], 0
je 0x4ad98e
cmp dword [edi + 0x20], 5
jne 0x4ad98e
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4ad999
mov ebx, dword [edi + 0x18]
jmp 0x4ad99b
xor ebx, ebx
push esi
call fcn.004a2df3
pop ecx
jmp 0x4ada07
test ecx, ecx
jg 0x4ad970
jl 0x4ad9ae
test eax, eax
jae 0x4ad970
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004a6d7c
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4ad9ce
cmp byte [edi + 0x1c], 0
je 0x4ad970
jmp 0x4ad9ff
push ebx
call fcn.004a8dc1
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4ad970
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 0x4ada07
cmp byte [edi + 0x1c], 0
je 0x4ada04
mov ebx, dword [edi + 0x18]
jmp 0x4ada07
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004a6d7c
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4ae0b0
Capabilities:
Parse pe header

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

Disassembly:
cmp ecx, dword [0x427004]
jne 0x4010f2
repz ret
jmp fcn.0040131e

Function at 0x403c6b
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x427004]
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.0040244e
and dword [ebp - 0x14], 0
cmp dword [0x4299ec], 0
mov dword [ebp - 0x18], eax
jne 0x403d1e
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x403dc6
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x403dc6
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x4299ec], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x4299f0], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x4299f4], eax
call edi
push eax
call esi
mov dword [0x4299fc], eax
test eax, eax
je 0x403d1e
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x4299f8], eax
mov eax, dword [0x4299f8]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x403d77
cmp dword [0x4299fc], ecx
je 0x403d77
push eax
call esi
push dword [0x4299fc]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x403d77
test ebx, ebx
je 0x403d77
call edi
test eax, eax
je 0x403d6e
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x403d6e
test byte [ebp - 8], 1
jne 0x403d77
or dword [ebp + 0x10], 0x200000
jmp 0x403daa
mov eax, dword [0x4299f0]
cmp eax, dword [ebp - 0x18]
je 0x403daa
push eax
call esi
test eax, eax
je 0x403daa
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x403daa
mov eax, dword [0x4299f4]
cmp eax, dword [ebp - 0x18]
je 0x403daa
push eax
call esi
test eax, eax
je 0x403daa
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x4299ec]
call esi
test eax, eax
je 0x403dc6
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x403dc8
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004010e8
leave
ret
Function at 0x416730
Capabilities:
Create pipe

Disassembly:
sub esp, 0x24
mov eax, dword [0x427004]
xor eax, esp
mov dword [esp + 0x1c], eax
mov eax, dword [0x427b30]
push ebx
mov ebx, dword [0x2bccfbc]
push edi
mov edi, dword [0x2bcf43c]
call fcn.004166b0
cmp dword [0x2bcf43c], 0x2f
jne 0x41679d
push 0
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
call fcn.004166e0
mov ecx, dword [esp + 0x24]
pop edi
pop ebx
xor ecx, esp
call fcn.004010e8
add esp, 0x24
ret
Function at 0x4169f0
Capabilities:
Manipulate console buffer
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 4], 0
jmp 0x416a08
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x1519a5
jge 0x416a51
mov dword [0x2bcf0a4], 0x8e46a6f0
cmp dword [0x2bcf43c], 0x3dc
jne 0x416a4f
xor ecx, ecx
mov word [ebp - 8], cx
xor edx, edx
mov word [ebp - 6], dx
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 8]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterW]
push 0
call dword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
jmp 0x4169ff
mov dword [ebp - 0x10], 0
jmp 0x416a63
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0x12cad2a
jge 0x416b06
cmp dword [0x2bcf43c], 0xa5f
jne 0x416a8c
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x10], 0x84620b
jne 0x416ab1
mov eax, dword [0x428950]
mov dword [0x2bcf43c], eax
mov ecx, dword [0x2bcf43c]
add ecx, 0xa231
mov dword [0x2bcf43c], ecx
cmp dword [0x2bcf43c], 0x141
jne 0x416b01
xor edx, edx
mov word [ebp - 0x24], dx
xor eax, eax
mov word [ebp - 0x22], ax
xor ecx, ecx
mov word [ebp - 0x20], cx
xor edx, edx
mov word [ebp - 0x1e], dx
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x24]
push edx
lea eax, [ebp - 0x1c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputA]
mov dword [0x429f28], 0xec58acac
mov dword [0x429f2c], 0xffffffff
jmp 0x416a5a
call fcn.004167c0
jmp dword [0x2bccfbc]
Function at 0x401ec0
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x354
push ebp
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0xd]
mov ebp, dword [esp + 0x360]
mov byte [esp + 0xc], 0
mov byte [esp + 0x114], al
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x115]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x364]
lea ecx, [esp + 0xc]
push eax
push ebp
push 0x41939c
push 0x105
push ecx
mov dword [esp + 0x1c], 0
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
lea edx, [esp + 0x21c]
lea eax, [esp + 0xc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401f44
pop edi
xor eax, eax
pop ebp
add esp, 0x354
ret
push esi
lea ecx, [esp + 0x24c]
lea edx, [esp + 0x118]
push ecx
push ebp
push 0x41939c
push 0x105
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
lea eax, [esp + 0x12c]
push eax
call fcn.00404d60
add esp, 0x18
cmp eax, 2
jne 0x401ff1
mov esi, 0x419398
lea eax, [esp + 0x24c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401fab
test cl, cl
je 0x401fa7
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401fab
add eax, 2
add esi, 2
test cl, cl
jne 0x401f87
xor eax, eax
jmp 0x401fb0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401ff1
mov esi, 0x419394
lea eax, [esp + 0x24c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401fe4
test cl, cl
je 0x401fe0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401fe4
add eax, 2
add esi, 2
test cl, cl
jne 0x401fc0
xor eax, eax
jmp 0x401fe9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401ff1
inc dword [esp + 0xc]
lea eax, [esp + 0x220]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x401f45
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0xc]
pop esi
pop edi
pop ebp
add esp, 0x354
ret
Function at 0x4023a0
Capabilities:
Create directory

Disassembly:
sub esp, 0x108
push ebx
mov ebx, dword [esp + 0x110]
push esi
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
rep stosd dword es:[edi], eax
mov al, byte [ebx]
xor edi, edi
test al, al
mov esi, ebx
je 0x402408
push ebp
lea ebp, [esp + 0x10]
sub ebp, ebx
mov al, byte [esi]
cmp al, 0x5c
je 0x4023dd
cmp al, 0x2f
jne 0x4023f5
test edi, edi
jle 0x4023f5
cmp byte [ebx + edi - 1], 0x3a
je 0x4023f5
lea eax, [esp + 0x10]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov cl, byte [esi]
mov al, byte [esi + 1]
mov byte [esi + ebp], cl
inc esi
inc edi
test al, al
mov byte [esi + ebp], 0
jne 0x4023d3
pop ebp
lea edx, [esp + 0xc]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop edi
pop esi
mov al, 1
pop ebx
add esp, 0x108
ret

Function at 0x402460
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x350
push esi
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x111]
mov byte [esp + 0x110], 0
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x35c]
mov ecx, 0x41
lea edi, [esp + 9]
mov byte [esp + 8], al
rep stosd dword es:[edi], eax
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4025f9
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push edx
push 0x104
cmp byte [ecx + edx - 1], 0x5c
je 0x4024d1
push str._.s_
lea eax, [esp + 0x11c]
push 0x105
push eax
jmp 0x4024e3
push str._.s
lea ecx, [esp + 0x11c]
push 0x105
push ecx
mov esi, dword [sym.imp.MSVCRT.dll__snprintf]
call esi
mov edx, dword [esp + 0x374]
add esp, 0x14
lea eax, [esp + 0x110]
lea ecx, [esp + 8]
push edx
push eax
push str._s_s
push 0x105
push ecx
call esi
add esp, 0x14
lea edx, [esp + 0x218]
lea eax, [esp + 8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x402549
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._util___Delete_Files__FindFirstFile_error___d_
call fcn.00402650
add esp, 8
pop edi
pop esi
add esp, 0x350
ret
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
lea ecx, [esp + 0x248]
test ecx, ecx
je 0x4025da
cmp byte [esp + 0x248], 0x2e
je 0x4025da
lea edx, [esp + 0x248]
lea eax, [esp + 0x114]
push edx
push eax
push str._s_s
lea ecx, [esp + 0x18]
push 0x104
push ecx
call esi
mov eax, dword [esp + 0x230]
add esp, 0x14
cmp eax, 0x10
je 0x4025b4
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0xc]
push eax
push str._util___Delete_Files__DeleteFile___s_
call fcn.00402650
add esp, 8
jmp 0x4025da
mov al, byte [esp + 0x368]
test al, al
je 0x4025da
push 1
lea ecx, [esp + 0x10]
push 0x419338
push ecx
call fcn.00402460
add esp, 0xc
lea edx, [esp + 0xc]
push edx
call ebp
lea eax, [esp + 0x21c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x402550
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop ebp
pop edi
pop esi
add esp, 0x350
ret
Function at 0x402650
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x10bc
call fcn.00412e60
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov ecx, dword [esp + 0x12]
mov edx, dword [esp + 0xe]
mov eax, dword [esp + 0xc]
and ecx, 0xffff
and edx, 0xffff
push ecx
and eax, 0xffff
push edx
push eax
push 0x41bc58
push 0x41bb50
push str._s_s_04d_02d_02d.log
lea ecx, [esp + 0x38]
push 0x104
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x8e5]
mov byte [esp + 0x8e4], 0
rep stosd dword es:[edi], eax
mov ecx, 0x1e7
lea edi, [esp + 0x145]
lea edx, [esp + 0x40]
mov byte [esp + 0x144], al
push 0x41944c
push edx
rep stosd dword es:[edi], eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x28
mov esi, eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x4027cf
mov ecx, dword [esp + 0x10cc]
lea eax, [esp + 0x10d0]
push eax
push ecx
lea edx, [esp + 0x12c]
push 0x79c
push edx
call dword [sym.imp.MSVCRT.dll__vsnprintf]
add esp, 0x10
test eax, eax
jle 0x40279b
lea eax, [esp + 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [esp + 0x22]
mov edx, dword [esp + 0x20]
and ecx, 0xffff
push eax
mov eax, dword [esp + 0x22]
push ecx
mov ecx, dword [esp + 0x24]
and edx, 0xffff
and eax, 0xffff
push edx
and ecx, 0xffff
push eax
push ecx
push str.__02d:_02d:_02d:_03d__d:_d____s_n
lea edx, [esp + 0x8e4]
push 0x801
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x28
lea edi, [esp + 0x8c4]
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x8c8]
push ecx
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
push ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
add esp, 0x10bc
ret
Function at 0x403d20
Capabilities:
Create directory

Disassembly:
sub esp, 0x540
push ebx
push ebp
push esi
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x351]
mov byte [esp + 0x350], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x451]
mov byte [esp + 0x450], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x251]
mov byte [esp + 0x250], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x151]
mov byte [esp + 0x150], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x554]
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
push eax
lea ecx, [esp + 0x454]
push str._s.
push ecx
call edi
mov ebp, dword [esp + 0x564]
add esp, 0xc
mov esi, 0x419970
mov eax, ebp
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x403dec
test cl, cl
je 0x403de8
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x403dec
add eax, 2
add esi, 2
test cl, cl
jne 0x403dc4
xor eax, eax
jmp 0x403df1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x403e1c
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x403e1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x403e1c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x540
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x450]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403e43
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x540
ret
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileA]
mov eax, dword [esp + 0x554]
lea edx, [esp + 0x3c]
push edx
push eax
lea ecx, [esp + 0x358]
push 0x41939c
push ecx
call edi
mov al, byte [esp + 0x20]
add esp, 0x10
test al, 0x10
je 0x403ecd
cmp byte [esp + 0x3c], 0x2e
je 0x403efd
mov eax, dword [esp + 0x554]
lea edx, [esp + 0x3c]
push edx
push eax
lea ecx, [esp + 0x258]
push 0x41939c
push ecx
call edi
add esp, 0x10
lea edx, [esp + 0x3c]
lea eax, [esp + 0x150]
push edx
push ebp
push 0x41939c
push eax
call edi
lea ecx, [esp + 0x160]
lea edx, [esp + 0x260]
push ecx
push edx
call fcn.00403d20
add esp, 0x18
test eax, eax
je 0x403f28
jmp 0x403efd
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x150]
push eax
push ebp
push 0x41939c
push ecx
call edi
add esp, 0x10
lea edx, [esp + 0x150]
lea eax, [esp + 0x350]
push 0
push edx
push eax
call esi
test eax, eax
je 0x403f28
lea ecx, [esp + 0x10]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x403e49
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x540
ret
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x540
ret