Function at 0x40d5d0
Capabilities:
Delete file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff78
xor eax, eax
xor edx, edx
xor ecx, ecx
push ebx
push esi
push edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x2c], edx
xor eax, eax
mov byte [ebp - 0x2d], 1
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x38], eax
mov byte [ebp - 0x3d], 0
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x48], ecx
push 0
push 0x8200000
push 3
push 0
push 3
push accept
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x40d630
mov eax, 7
jmp 0x40db3d
push 0x64200
call fcn.004e0050
pop ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40d650
mov dword [ebp - 0x14], 0xa
jmp 0x40daf1
push 0
lea edx, [ebp - 0x20]
push edx
push 0x64200
mov ecx, dword [ebp - 0x10]
push ecx
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_ReadFile
test eax, eax
je 0x40d683
push 0x10
push 0x510d91
mov edx, dword [ebp - 0x10]
push edx
call fcn.004e1044
add esp, 0xc
test eax, eax
je 0x40d68f
mov dword [ebp - 0x14], 7
jmp 0x40daf1
lea ecx, [ebp - 0x1c]
push ecx
mov eax, dword [ebp - 0x10]
push eax
mov edx, dword [ebp - 4]
push edx
call fcn.0040d520
add esp, 0xc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x40d6b8
mov dword [ebp - 0x14], 7
jmp 0x40daf1
xor ebx, ebx
mov eax, dword [ebp - 0x18]
lea esi, [eax + 1]
cmp ebx, dword [ebp - 0x1c]
jae 0x40d6d9
test byte [esi], 0x80
je 0x40d6d0
lea eax, [ebx + 1]
mov dword [ebp - 0x48], eax
inc ebx
add esi, 2
cmp ebx, dword [ebp - 0x1c]
jb 0x40d6c5
push pe_nt_image_headers32
call fcn.004e0050
pop ecx
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x40d6f9
mov dword [ebp - 0x14], 0xa
jmp 0x40daf1
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp - 0x38]
xor eax, eax
push esi
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
push str..pcr
mov eax, dword [ebp - 0x38]
push eax
call fcn.004e0e48
add esp, 8
mov ebx, dword [ebp - 0x48]
dec ebx
shl ebx, 2
add ebx, 0x10
push ebx
push 1
call fcn.004dffb4
add esp, 8
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x40d75b
mov dword [ebp - 0x14], 0xa
jmp 0x40daf1
push 0
push 0xa0
push 3
push 0
push 1
push 0xc0000000
mov eax, dword [ebp + 0xc]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov edi, eax
cmp edi, 0xffffffff
je 0x40d833
push 0
push 0xa0
push 3
push 0
push 1
push 0xc0000000
mov eax, dword [ebp - 0x38]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
je 0x40d82d
lea edx, [ebp - 0x50]
push edx
push 0
push 0
push edi
call sub.KERNEL32.DLL_GetFileTime
push 0
lea ecx, [ebp - 0x20]
push ecx
push 0x10
mov ecx, dword [ebp - 0x34]
push ecx
mov eax, dword [ebp - 0x3c]
push eax
call sub.KERNEL32.DLL_ReadFile
lea edx, [ebp - 0x50]
push edx
mov ecx, dword [ebp - 0x34]
push ecx
call sub.KERNEL32.DLL_CompareFileTime
test eax, eax
jne 0x40d81c
mov byte [ebp - 0x2d], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
push 0
lea eax, [ebp - 0x54]
push eax
mov edx, dword [ebp - 0x58]
push edx
mov ecx, dword [ebp - 0x3c]
push ecx
call sub.KERNEL32.DLL_SetFilePointer
push 0
lea eax, [ebp - 0x20]
push eax
push ebx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x3c]
push eax
call sub.KERNEL32.DLL_ReadFile
mov byte [ebp - 0x3d], 1
jmp 0x40d833
push edi
call sub.KERNEL32.DLL_CloseHandle
mov edx, dword [ebp - 0x3c]
push edx
call sub.KERNEL32.DLL_CloseHandle
jmp 0x40d833
push edi
call sub.KERNEL32.DLL_CloseHandle
cmp byte [ebp - 0x2d], 0
je 0x40d897
push 0
push 0xa0
push 2
push 0
push 1
push 0xc0000000
mov ecx, dword [ebp + 0xc]
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov edi, eax
cmp edi, 0xffffffff
jne 0x40d867
mov dword [ebp - 0x14], 7
jmp 0x40daf1
push 0
push 0xa0
push 2
push 0
push 1
push 0xc0000000
mov eax, dword [ebp - 0x38]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x40d897
mov dword [ebp - 0x14], 7
jmp 0x40daf1
mov edx, dword [ebp - 0x10]
xor ecx, ecx
mov cl, byte [edx + 0x26]
add ecx, 9
mov ebx, 1
shl ebx, cl
mov dword [ebp - 0x28], ebx
mov eax, dword [ebp - 0x28]
push eax
call fcn.004e0050
pop ecx
mov dword [ebp - 0x24], eax
push 0
mov edx, dword [ebp + 0x14]
push edx
call dword [ebp + 0x10]
mov eax, dword [ebp - 0x34]
add esp, 8
xor ebx, ebx
lea edx, [eax + 0xc]
mov dword [ebp - 0x78], edx
cmp ebx, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x18]
lea esi, [ecx + 1]
jae 0x40d9dd
xor eax, eax
mov dword [ebp - 0x5c], eax
test byte [esi], 0x80
je 0x40d97e
mov ecx, dword [ebp - 0x10]
xor edx, edx
mov eax, ebx
movzx ecx, byte [ecx + 0x26]
add ecx, 9
call fcn.004e7ab8
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x44], ebx
lea eax, [ebp - 0x60]
push 0
push eax
mov edx, dword [ebp - 0x64]
push edx
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.DLL_SetFilePointer
push 0
lea eax, [ebp - 0x20]
push eax
mov edx, dword [ebp - 0x28]
push edx
mov ecx, dword [ebp - 0x24]
push ecx
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_ReadFile
mov edx, dword [ebp - 0x28]
push edx
mov ecx, dword [ebp - 0x24]
push ecx
push 0
call fcn.004eef04
add esp, 0xc
mov dword [ebp - 0x5c], eax
cmp byte [ebp - 0x3d], 0
je 0x40d95a
mov eax, dword [ebp - 0x78]
mov edx, dword [eax]
cmp edx, dword [ebp - 0x5c]
jne 0x40d95a
jmp 0x40d97e
push 0
lea ecx, [ebp - 0x60]
push ecx
mov eax, dword [ebp - 0x64]
push eax
push edi
call sub.KERNEL32.DLL_SetFilePointer
push 0
lea edx, [ebp - 0x20]
push edx
mov ecx, dword [ebp - 0x28]
push ecx
mov eax, dword [ebp - 0x24]
push eax
push edi
call sub.KERNEL32.DLL_WriteFile
mov edx, dword [ebp - 0x78]
mov eax, dword [ebp - 0x5c]
xor ecx, ecx
mov dword [edx], eax
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x80], edx
mov dword [ebp - 0x7c], ecx
fild qword [ebp - 0x80]
fdivr dword [0x40db44]
lea ecx, [ebx + 1]
xor eax, eax
mov dword [ebp - 0x88], ecx
mov dword [ebp - 0x84], eax
fild qword [ebp - 0x88]
fmulp st(1)
call fcn.004e7db8
push eax
mov edx, dword [ebp + 0x14]
push edx
call dword [ebp + 0x10]
add esp, 8
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x40d9dd
add dword [ebp - 0x78], 4
inc ebx
add esi, 2
cmp ebx, dword [ebp - 0x48]
jb 0x40d8df
cmp dword [ebp - 0x2c], 0
jne 0x40d9ef
push 0x64
mov ecx, dword [ebp + 0x14]
push ecx
call dword [ebp + 0x10]
add esp, 8
cmp dword [ebp - 0x24], 0
je 0x40d9ff
mov eax, dword [ebp - 0x24]
push eax
call fcn.004e0060
pop ecx
push edi
call sub.KERNEL32.DLL_FlushFileBuffers
cmp byte [ebp - 0x2d], 0
jne 0x40da28
cmp dword [ebp - 0x2c], 0
je 0x40da28
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 8]
cmp ecx, dword [ebp - 0x44]
ja 0x40da32
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x44]
inc esi
mov dword [eax + 8], esi
jmp 0x40da32
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x44]
inc edx
mov dword [ecx + 8], edx
cmp byte [ebp - 0x2d], 0
jne 0x40da6b
mov ecx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x34]
xor edx, edx
movzx ecx, byte [ecx + 0x26]
add ecx, 9
mov eax, dword [esi + 8]
call fcn.004e7ab8
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], edx
push 0
lea eax, [ebp - 0x68]
push eax
mov edx, dword [ebp - 0x6c]
push edx
push edi
call sub.KERNEL32.DLL_SetFilePointer
push edi
call sub.KERNEL32.DLL_SetEndOfFile
lea esi, [ebp - 0x74]
push esi
push 0
push 0
push edi
call sub.KERNEL32.DLL_GetFileTime
push 8
lea eax, [ebp - 0x74]
push eax
mov edx, dword [ebp - 0x34]
push edx
call fcn.004e0b90
add esp, 0xc
push edi
call sub.KERNEL32.DLL_CloseHandle
push 0
push 0
push 0
mov ecx, dword [ebp - 0x3c]
push ecx
call sub.KERNEL32.DLL_SetFilePointer
push 0
lea eax, [ebp - 0x20]
push eax
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 8]
dec ecx
shl ecx, 2
add ecx, 0x10
push ecx
mov eax, dword [ebp - 0x34]
push eax
mov edx, dword [ebp - 0x3c]
push edx
call sub.KERNEL32.DLL_WriteFile
mov ecx, dword [ebp - 0x3c]
push ecx
call sub.KERNEL32.DLL_SetEndOfFile
mov eax, dword [ebp - 0x3c]
push eax
call sub.KERNEL32.DLL_CloseHandle
cmp dword [ebp - 0x2c], 0
je 0x40daf1
cmp byte [ebp - 0x2d], 0
je 0x40daf1
mov edx, dword [ebp + 0xc]
push edx
call sub.KERNEL32.DLL_DeleteFileA
mov ecx, dword [ebp - 0x38]
push ecx
call sub.KERNEL32.DLL_DeleteFileA
cmp dword [ebp - 0x18], 0
je 0x40db01
mov eax, dword [ebp - 0x18]
push eax
call fcn.004e0060
pop ecx
cmp dword [ebp - 0x10], 0
je 0x40db11
mov edx, dword [ebp - 0x10]
push edx
call fcn.004e0060
pop ecx
cmp dword [ebp - 0x38], 0
je 0x40db21
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.004e0060
pop ecx
cmp dword [ebp - 0x34], 0
je 0x40db31
mov eax, dword [ebp - 0x34]
push eax
call fcn.004e0060
pop ecx
mov edx, dword [ebp - 4]
push edx
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret