Function at 0x4023c0
Capabilities:
Check if file exists
Copy file
Create directory
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x31c
mov eax, dword [0x54c384]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x4023e4
mov eax, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x402c0e
shr eax, 4
and al, 1
je 0x402c0e
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x40240b
mov eax, dword [ebx]
push eax
call edi
cmp eax, 0xffffffff
je 0x40241a
shr eax, 4
and al, 1
jne 0x40242d
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x402424
mov eax, dword [ebx]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push esi
lea ecx, [ebp - 0x1c]
call fcn.00402f60
mov edx, dword [ebp - 8]
lea eax, [ebp - 0x1c]
mov esi, dword [ebp - 0x1c]
cmp edx, 8
mov ecx, dword [ebp - 0xc]
cmovae eax, esi
cmp word [eax + ecx*2 - 2], 0x5c
je 0x4024b9
cmp edx, 8
lea eax, [ebp - 0x1c]
cmovae eax, esi
cmp word [eax + ecx*2 - 2], 0x2f
je 0x4024b9
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x402495
cmp edx, 8
lea esi, [ebp - 0x1c]
push 2
cmovae esi, dword [ebp - 0x1c]
lea edi, [ecx + 1]
push 0x5010bc
mov dword [ebp - 0xc], edi
lea eax, [esi + ecx*2]
push eax
call fcn.004c0040
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x4024b3
push 1
push 0x5010bc
mov byte [ebp - 0x2bc], 0
lea ecx, [ebp - 0x1c]
push dword [ebp - 0x2bc]
push 1
call fcn.00404fc0
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, edx
sub eax, ecx
cmp eax, 3
jb 0x4024ed
cmp edx, 8
lea esi, [ebp - 0x1c]
push 6
cmovae esi, dword [ebp - 0x1c]
lea edi, [ecx + 3]
push 0x5010c0
mov dword [ebp - 0xc], edi
lea eax, [esi + ecx*2]
push eax
call fcn.004c0040
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x40250b
push 3
push 0x5010c0
mov byte [ebp - 0x2bc], 0
lea ecx, [ebp - 0x1c]
push dword [ebp - 0x2bc]
push 3
call fcn.00404fc0
push ebx
lea ecx, [ebp - 0x34]
call fcn.00402f60
mov ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x34]
mov ebx, dword [ebp - 0x34]
cmp ecx, 8
mov edx, dword [ebp - 0x24]
cmovae eax, ebx
cmp word [eax + edx*2 - 2], 0x5c
je 0x402590
cmp ecx, 8
lea eax, [ebp - 0x34]
cmovae eax, ebx
cmp word [eax + edx*2 - 2], 0x2f
je 0x402590
mov eax, ecx
sub eax, edx
cmp eax, 1
jb 0x402572
cmp ecx, 8
lea esi, [ebp - 0x34]
push 2
cmovae esi, ebx
lea edi, [edx + 1]
push 0x5010bc
mov dword [ebp - 0x24], edi
lea eax, [esi + edx*2]
push eax
call fcn.004c0040
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x402590
push 1
push 0x5010bc
mov byte [ebp - 0x2bc], 0
lea ecx, [ebp - 0x34]
push dword [ebp - 0x2bc]
push 1
call fcn.00404fc0
cmp dword [ebp - 8], 8
lea ecx, [ebp - 0x2b8]
lea eax, [ebp - 0x1c]
cmovae eax, dword [ebp - 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x2bc], eax
cmp eax, 0xffffffff
jne 0x4025c0
xor bl, bl
jmp 0x402b7b
xor ecx, ecx
mov dword [ebp - 0x54], 0
test byte [ebp - 0x2b8], 0x10
mov dword [ebp - 0x50], 7
mov word [ebp - 0x64], cx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], 7
mov word [ebp - 0x4c], cx
je 0x4027ea
cmp word [ebp - 0x28c], 0x2e
je 0x402b50
xor eax, eax
mov dword [ebp - 0x2c4], ecx
mov word [ebp - 0x2d4], ax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x2c0], 7
lea ecx, [eax - 3]
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x1c]
cmovae eax, dword [ebp - 0x1c]
push ecx
push eax
lea ecx, [ebp - 0x2d4]
call fcn.00403e30
lea ecx, [ebp - 0x28c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402642
mov ebx, dword [ebp - 0x2c0]
sub ecx, edx
mov edx, dword [ebp - 0x2c4]
mov eax, ebx
sar ecx, 1
sub eax, edx
cmp ecx, eax
ja 0x4026a3
cmp ebx, 8
lea eax, [ecx + ecx]
push eax
lea esi, [ebp - 0x2d4]
cmovae esi, dword [ebp - 0x2d4]
lea eax, [ebp - 0x28c]
push eax
lea edi, [ecx + edx]
mov dword [ebp - 0x2c4], edi
lea eax, [esi + edx*2]
push eax
call fcn.004c0040
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
lea eax, [ebp - 0x2d4]
jmp 0x4026c4
push ecx
lea eax, [ebp - 0x28c]
mov byte [ebp - 0x2f0], 0
push eax
push dword [ebp - 0x2f0]
push ecx
lea ecx, [ebp - 0x2d4]
call fcn.00404fc0
movups xmm0, xmmword [eax]
xor ecx, ecx
movups xmmword [ebp - 0x318], xmm0
movq xmm0, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea ecx, [ebp - 0x64]
movq qword [ebp - 0x308], xmm0
call fcn.00402e70
movups xmm0, xmmword [ebp - 0x318]
mov edx, dword [ebp - 0x2c0]
movups xmmword [ebp - 0x64], xmm0
movq xmm0, qword [ebp - 0x308]
movq qword [ebp - 0x54], xmm0
cmp edx, 8
jb 0x40274e
mov ecx, dword [ebp - 0x2d4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402744
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402c21
push edx
push ecx
call fcn.004bdd39
add esp, 8
lea eax, [ebp - 0x28c]
push eax
lea edx, [ebp - 0x34]
lea ecx, [ebp - 0x2d4]
call fcn.004048c0
mov esi, eax
add esp, 4
lea eax, [ebp - 0x4c]
cmp eax, esi
je 0x40279a
mov ecx, eax
call fcn.00402e70
movups xmm0, xmmword [esi]
xor eax, eax
movups xmmword [ebp - 0x4c], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x3c], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov edx, dword [ebp - 0x2c0]
cmp edx, 8
jb 0x4027da
mov ecx, dword [ebp - 0x2d4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4027d0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402c21
push edx
push ecx
call fcn.004bdd39
add esp, 8
lea edx, [ebp - 0x4c]
lea ecx, [ebp - 0x64]
call fcn.004023c0
jmp 0x402ac2
xor eax, eax
mov dword [ebp - 0x2c4], ecx
mov word [ebp - 0x2d4], ax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x2c0], 7
lea ecx, [eax - 3]
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x1c]
cmovae eax, dword [ebp - 0x1c]
push ecx
push eax
lea ecx, [ebp - 0x2d4]
call fcn.00403e30
lea ecx, [ebp - 0x28c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402830
mov ebx, dword [ebp - 0x2c0]
sub ecx, edx
mov edx, dword [ebp - 0x2c4]
mov eax, ebx
sar ecx, 1
sub eax, edx
cmp ecx, eax
ja 0x402891
cmp ebx, 8
lea eax, [ecx + ecx]
push eax
lea esi, [ebp - 0x2d4]
cmovae esi, dword [ebp - 0x2d4]
lea eax, [ebp - 0x28c]
push eax
lea edi, [ecx + edx]
mov dword [ebp - 0x2c4], edi
lea eax, [esi + edx*2]
push eax
call fcn.004c0040
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
lea eax, [ebp - 0x2d4]
jmp 0x4028b2
push ecx
lea eax, [ebp - 0x28c]
mov byte [ebp - 0x2f4], 0
push eax
push dword [ebp - 0x2f4]
push ecx
lea ecx, [ebp - 0x2d4]
call fcn.00404fc0
movups xmm0, xmmword [eax]
xor ecx, ecx
movups xmmword [ebp - 0x318], xmm0
movq xmm0, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea ecx, [ebp - 0x64]
movq qword [ebp - 0x308], xmm0
call fcn.00402e70
movups xmm0, xmmword [ebp - 0x318]
mov edx, dword [ebp - 0x2c0]
movups xmmword [ebp - 0x64], xmm0
movq xmm0, qword [ebp - 0x308]
movq qword [ebp - 0x54], xmm0
cmp edx, 8
jb 0x40293c
mov ecx, dword [ebp - 0x2d4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402932
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402c21
push edx
push ecx
call fcn.004bdd39
add esp, 8
xor eax, eax
mov dword [ebp - 0x2dc], 0
lea ecx, [ebp - 0x28c]
mov dword [ebp - 0x2d8], 7
mov word [ebp - 0x2ec], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402962
mov eax, dword [ebp - 0x24]
sub ecx, edx
sar ecx, 1
add eax, ecx
lea ecx, [ebp - 0x2ec]
push eax
call fcn.00402d70
cmp dword [ebp - 0x20], 8
lea ecx, [ebp - 0x34]
mov edx, dword [ebp - 0x2d8]
mov eax, edx
cmovae ecx, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x2dc]
sub eax, ebx
mov edi, dword [ebp - 0x24]
cmp edi, eax
ja 0x4029d9
cmp edx, 8
lea eax, [edi + ebx]
mov dword [ebp - 0x2dc], eax
lea esi, [ebp - 0x2ec]
cmovae esi, dword [ebp - 0x2ec]
lea eax, [edi + edi]
push eax
push ecx
lea eax, [esi + ebx*2]
push eax
call fcn.004c0040
add esp, 0xc
lea eax, [ebx + edi]
xor ecx, ecx
mov word [esi + eax*2], cx
jmp 0x4029f4
push edi
push ecx
mov byte [ebp - 0x2f8], 0
lea ecx, [ebp - 0x2ec]
push dword [ebp - 0x2f8]
push edi
call fcn.00404fc0
lea ecx, [ebp - 0x28c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402a00
mov ebx, dword [ebp - 0x2d8]
sub ecx, edx
mov edx, dword [ebp - 0x2dc]
mov eax, ebx
sar ecx, 1
sub eax, edx
cmp ecx, eax
ja 0x402a5b
cmp ebx, 8
lea eax, [ecx + ecx]
push eax
lea esi, [ebp - 0x2ec]
cmovae esi, dword [ebp - 0x2ec]
lea eax, [ebp - 0x28c]
push eax
lea edi, [edx + ecx]
mov dword [ebp - 0x2dc], edi
lea eax, [esi + edx*2]
push eax
call fcn.004c0040
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x402a7c
push ecx
lea eax, [ebp - 0x28c]
mov byte [ebp - 0x2fc], 0
push eax
push dword [ebp - 0x2fc]
push ecx
lea ecx, [ebp - 0x2ec]
call fcn.00404fc0
lea ecx, [ebp - 0x4c]
call fcn.00402e70
movups xmm1, xmmword [ebp - 0x2ec]
cmp dword [ebp - 0x2d8], 8
lea ecx, [ebp - 0x4c]
movq xmm0, qword [ebp - 0x2dc]
movd eax, xmm1
push 0
movups xmmword [ebp - 0x4c], xmm1
cmovae ecx, eax
cmp dword [ebp - 0x50], 8
lea eax, [ebp - 0x64]
movq qword [ebp - 0x3c], xmm0
cmovae eax, dword [ebp - 0x64]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov edx, dword [ebp - 0x38]
cmp edx, 8
jb 0x402afc
mov ecx, dword [ebp - 0x4c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402af2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402c21
push edx
push ecx
call fcn.004bdd39
add esp, 8
mov edx, dword [ebp - 0x50]
xor eax, eax
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 7
mov word [ebp - 0x4c], ax
cmp edx, 8
jb 0x402b4a
mov ecx, dword [ebp - 0x64]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402b40
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402c21
push edx
push ecx
call fcn.004bdd39
add esp, 8
mov eax, dword [ebp - 0x2bc]
lea ecx, [ebp - 0x2b8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x402b6d
mov eax, dword [ebp - 0x2bc]
jmp 0x4025c0
push dword [ebp - 0x2bc]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov bl, 1
mov edx, dword [ebp - 0x20]
cmp edx, 8
jb 0x402bb1
mov ecx, dword [ebp - 0x34]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402ba7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402c21
push edx
push ecx
call fcn.004bdd39
add esp, 8
mov edx, dword [ebp - 8]
xor eax, eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 7
mov word [ebp - 0x34], ax
cmp edx, 8
jb 0x402bfb
mov ecx, dword [ebp - 0x1c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402bf1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402c21
push edx
push ecx
call fcn.004bdd39
add esp, 8
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bdaf8
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bdaf8
mov esp, ebp
pop ebp
ret
call fcn.004c8da3
int3