Function at 0x41528c
Capabilities:
Delete file
Get file attributes
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff70
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x90], ebx
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x88], ebx
mov dword [ebp - 0x84], ebx
mov dword [ebp - 0x80], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov ebx, ecx
mov esi, edx
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x415872
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.KERNEL32.DLL_GetVersion_1
test eax, 0x80000000
jne 0x4152fe
push 0
push 0
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp - 0xc]
call fcn.00406f68
push eax
call sub.KERNEL32.DLL_CreateFileW_1
mov dword [ebp - 0x1c], eax
jmp 0x41532e
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x80]
mov edx, dword [ebp - 0xc]
mov ecx, 0
call fcn.00407120
mov eax, dword [ebp - 0x80]
call fcn.0040652c
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
setne byte [ebp - 0xd]
cmp byte [ebp - 0xd], 0
je 0x41583e
lea eax, [ebx + 1]
push eax
lea eax, [ebp - 8]
mov ecx, 1
mov edx, dword [0x41526c]
call fcn.00408788
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], eax
mov edi, ebx
test edi, edi
jl 0x4156dd
inc edi
mov dword [ebp - 0x14], 0
imul eax, dword [ebp - 0x18], 0xd
mov edx, dword [ebp - 8]
lea eax, [edx + eax*4]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 8]
call fcn.004085c0
cmp eax, dword [ebp - 0x14]
jg 0x4153d1
lea eax, [ebp - 4]
mov edx, dword [esi]
call fcn.00406f30
lea eax, [ebp - 4]
call fcn.00406050
call fcn.0040718c
mov ebx, eax
cmp ebx, 1
jl 0x4153e2
lea eax, [ebp - 4]
call fcn.00406050
cmp word [eax + ebx*2 - 2], 0x5c
jne 0x4153ca
lea eax, [ebp - 4]
mov ecx, ebx
mov edx, 1
call fcn.00407600
jmp 0x4153e2
dec ebx
test ebx, ebx
jne 0x4153a9
jmp 0x4153e2
lea eax, [ebp - 4]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
mov edx, dword [edx + ecx*4]
call fcn.00406f30
lea edx, [ebp - 0x84]
mov eax, dword [ebp - 4]
call fcn.0040f6c8
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp - 0x44]
call fcn.00405ec4
call sub.KERNEL32.DLL_GetVersion_1
test eax, 0x80000000
jne 0x41542a
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, dword [esi]
call fcn.00406f68
push eax
call sub.KERNEL32.DLL_CreateFileW_1
mov ebx, eax
jmp 0x41545e
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x88]
mov edx, dword [esi]
mov ecx, 0
call fcn.00407120
mov eax, dword [ebp - 0x88]
call fcn.0040652c
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4156ca
push 0
push ebx
call sub.KERNEL32.DLL_GetFileSize_1
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
push eax
push 0x40
call sub.KERNEL32.DLL_LocalAlloc_1
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x4156c4
imul eax, dword [ebp - 0x34], 0xb
mov ecx, 0xa
xor edx, edx
div ecx
add eax, 0xc
push eax
push 0x40
call sub.KERNEL32.DLL_LocalAlloc_1
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x4156bb
push 0
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x2c]
push eax
push ebx
call sub.KERNEL32.DLL_ReadFile_1
test eax, eax
je 0x4156b2
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x34]
jne 0x4156b2
mov dword [ebp - 0x66], 0x4034b50
mov word [ebp - 0x62], 0x14
mov word [ebp - 0x60], 0x800
mov word [ebp - 0x5e], 8
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
or eax, 0xffffffff
call fcn.0041522c
not eax
mov dword [ebp - 0x58], eax
imul eax, dword [ebp - 0x34], 0xb
mov ecx, 0xa
xor edx, edx
div ecx
add eax, 0xc
push eax
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
call fcn.004150e0
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x44]
mov eax, dword [eax]
call fcn.00406204
mov word [ebp - 0x4c], ax
mov word [ebp - 0x4a], 0
lea eax, [ebp - 0x24]
push eax
push 0
push 0
push ebx
call sub.KERNEL32.DLL_GetFileTime
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x24]
push eax
call sub.KERNEL32.DLL_FileTimeToLocalFileTime
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x5a]
push eax
lea eax, [ebp - 0x24]
push eax
call sub.KERNEL32.DLL_FileTimeToDosDateTime
mov eax, dword [ebp - 0x44]
add eax, 4
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
mov dword [eax], 0x2014b50
mov eax, dword [ebp - 0x48]
mov word [eax + 4], 0x14
mov eax, dword [ebp - 0x48]
push esi
push edi
lea edi, [eax + 6]
lea esi, [ebp - 0x62]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
pop edi
pop esi
mov eax, dword [ebp - 0x48]
mov word [eax + 0x20], 0
mov eax, dword [ebp - 0x48]
mov word [eax + 0x22], 0
mov eax, dword [ebp - 0x48]
mov word [eax + 0x24], 0
call sub.KERNEL32.DLL_GetVersion_1
test eax, 0x80000000
jne 0x4155d8
mov eax, dword [esi]
call fcn.00406f68
push eax
call sub.KERNEL32.DLL_GetFileAttributesW
mov edx, dword [ebp - 0x48]
mov dword [edx + 0x26], eax
jmp 0x415601
lea eax, [ebp - 0x8c]
mov edx, dword [esi]
mov ecx, 0
call fcn.00407120
mov eax, dword [ebp - 0x8c]
call fcn.0040652c
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov edx, dword [ebp - 0x48]
mov dword [edx + 0x26], eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
push 0
push 0
lea ecx, [ebp - 0x40]
mov edx, 1
mov eax, dword [ebp - 0x1c]
call fcn.00410f2c
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x40]
mov dword [eax + 0x2a], edx
push 0
lea eax, [ebp - 0x28]
push eax
push 0x1e
lea eax, [ebp - 0x66]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.KERNEL32.DLL_WriteFile_1
test eax, eax
je 0x4156a6
cmp dword [ebp - 0x28], 0x1e
jne 0x4156a6
push 0
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x44]
mov eax, dword [eax]
call fcn.00406204
push eax
mov eax, dword [ebp - 0x44]
mov eax, dword [eax]
call fcn.0040652c
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.KERNEL32.DLL_WriteFile_1
test eax, eax
je 0x4156a6
mov eax, dword [ebp - 0x44]
mov eax, dword [eax]
call fcn.00406204
cmp eax, dword [ebp - 0x28]
jne 0x4156a6
push 0
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x54]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.KERNEL32.DLL_WriteFile_1
test eax, eax
je 0x4156a6
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x54]
je 0x4156aa
xor eax, eax
jmp 0x4156ac
mov al, 1
mov byte [ebp - 0xd], al
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x30]
push eax
call sub.KERNEL32.DLL_LocalFree
mov eax, dword [ebp - 0x2c]
push eax
call sub.KERNEL32.DLL_LocalFree
push ebx
call sub.KERNEL32.DLL_CloseHandle_1
cmp byte [ebp - 0xd], 0
je 0x4156dd
inc dword [ebp - 0x14]
add esi, 4
dec edi
jne 0x415371
cmp byte [ebp - 0xd], 0
je 0x4156e9
cmp dword [ebp - 0x18], 0
jg 0x4156ed
xor eax, eax
jmp 0x4156ef
mov al, 1
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
je 0x4157ef
mov dword [ebp - 0x7c], 0x6054b50
mov word [ebp - 0x78], 0
mov word [ebp - 0x76], 0
movzx eax, word [ebp - 0x18]
mov word [ebp - 0x74], ax
mov word [ebp - 0x72], ax
xor eax, eax
mov dword [ebp - 0x70], eax
push 0
push 0
lea ecx, [ebp - 0x40]
mov edx, 1
mov eax, dword [ebp - 0x1c]
call fcn.00410f2c
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x6c], eax
mov word [ebp - 0x68], 0
mov edi, dword [ebp - 0x18]
dec edi
test edi, edi
jl 0x4157c1
inc edi
mov dword [ebp - 0x14], 0
imul eax, dword [ebp - 0x14], 0xd
mov edx, dword [ebp - 8]
lea ebx, [edx + eax*4]
mov eax, dword [ebx]
call fcn.00406204
add eax, 0x2e
add dword [ebp - 0x70], eax
push 0
lea eax, [ebp - 0x28]
push eax
push 0x2e
lea eax, [ebx + 4]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.KERNEL32.DLL_WriteFile_1
test eax, eax
je 0x4157b5
cmp dword [ebp - 0x28], 0x2e
jne 0x4157b5
push 0
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebx]
call fcn.00406204
push eax
mov eax, dword [ebx]
call fcn.0040652c
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.KERNEL32.DLL_WriteFile_1
test eax, eax
je 0x4157b5
mov eax, dword [ebx]
call fcn.00406204
cmp eax, dword [ebp - 0x28]
je 0x4157bb
mov byte [ebp - 0xd], 0
jmp 0x4157c1
inc dword [ebp - 0x14]
dec edi
jne 0x415750
cmp byte [ebp - 0xd], 0
je 0x4157e6
push 0
lea eax, [ebp - 0x28]
push eax
push 0x16
lea eax, [ebp - 0x7c]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.KERNEL32.DLL_WriteFile_1
test eax, eax
je 0x4157e6
cmp dword [ebp - 0x28], 0x16
je 0x4157ea
xor eax, eax
jmp 0x4157ec
mov al, 1
mov byte [ebp - 0xd], al
mov eax, dword [ebp - 0x1c]
push eax
call sub.KERNEL32.DLL_CloseHandle_1
cmp byte [ebp - 0xd], 0
jne 0x41583e
call sub.KERNEL32.DLL_GetVersion_1
test eax, 0x80000000
jne 0x41581a
mov eax, dword [ebp - 0xc]
call fcn.00406f68
push eax
call sub.KERNEL32.DLL_DeleteFileW
jmp 0x41583e
lea eax, [ebp - 0x90]
mov edx, dword [ebp - 0xc]
mov ecx, 0
call fcn.00407120
mov eax, dword [ebp - 0x90]
call fcn.0040652c
push eax
call sub.KERNEL32.DLL_DeleteFileA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x415879
lea eax, [ebp - 0x90]
mov edx, 5
call fcn.00405e94
lea eax, [ebp - 8]
mov edx, dword [0x41526c]
call fcn.004088a8
lea eax, [ebp - 4]
call fcn.00406ecc
ret