Function at 0x404787
Capabilities:
Delete file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
push ebx
push esi
push edi
mov dword [ebp - 0x28], 0
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 8]
mov edx, dword [0x44c128]
mov dword [ecx + 0x74], edx
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0x4285cc43
mov eax, dword [ebp - 8]
mov ecx, dword [0x44c13c]
mov dword [eax + 0x234], ecx
mov edx, dword [ebp - 8]
mov eax, dword [0x44c130]
mov dword [edx + 0x54], eax
push 0x10
push 0
lea ecx, [ebp - 0x20]
push ecx
call fcn.00407560
add esp, 0xc
mov dword [ebp - 0x10], 0x25520132
push 0x65
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0xc]
test edx, edx
jne 0x404816
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.GDI32.dll_CreatePenIndirect]
mov dword [ebp - 0x24], eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0xb4], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 0xb4], 0
je 0x4049df
cmp dword [ebp - 0x2c], 0
je 0x4049df
push 0x96
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0xe0001000
push 0x90001000
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov ecx, dword [ebp - 8]
mov edx, dword [0x44c140]
mov dword [ecx + 0x238], edx
mov dword [ebp - 0x30], 0x40a140
mov dword [ebp - 0x38], 0xa9ba
mov dword [ebp - 0x3c], 0xa732
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x3c]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x30]
mov dword [ecx + 0x228], edx
mov dword [ebp - 0x48], 1
mov dword [ebp - 0x44], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0x1e7
je 0x4048c9
cmp dword [ebp - 0x4c], 0x57
jne 0x4049da
push 0x101
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x101
jne 0x4049da
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x38]
mov dword [eax + 0x6c], ecx
mov edx, dword [ebp - 8]
mov dword [edx + 0x214], 0
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, dword [eax + 0x214]
cmp edx, dword [ecx + 0x6c]
jae 0x404951
mov eax, dword [ebp - 0x48]
add eax, 1
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x48]
cmp edx, dword [ecx + 0x214]
jne 0x40493a
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x214]
cmp ecx, dword [ebp - 0x48]
jne 0x40493a
mov edx, dword [ebp - 0x48]
sub edx, 1
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x214]
add ecx, 1
mov edx, dword [ebp - 8]
mov dword [edx + 0x214], ecx
jmp 0x4048fb
mov dword [ebp - 0x50], 0
jmp 0x404963
mov eax, dword [ebp - 0x50]
add eax, 1
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
cmp ecx, dword [ebp - 0x3c]
jae 0x4049a7
mov edx, dword [ebp - 0x44]
add edx, 1
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x50]
jne 0x40498d
mov ecx, dword [ebp - 0x50]
cmp ecx, dword [ebp - 0x48]
jne 0x40498d
mov edx, dword [ebp - 0x48]
sub edx, 1
mov dword [ebp - 0x48], edx
push 4
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 8]
add ecx, 0x130
push ecx
call fcn.00407220
add esp, 0xc
jmp 0x40495a
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov dword [edx + 0x1b4], eax
mov ecx, dword [ebp - 0x38]
sub ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x48]
sub edx, dword [ebp - 0x44]
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x54]
jne 0x4049da
mov dword [ebp - 4], 1
jmp 0x404a9a
mov dword [ebp - 0x60], 0
mov ecx, dword [str.sysconfig.txt]
mov dword [ebp - 0x70], ecx
mov edx, dword [0x44c184]
mov dword [ebp - 0x6c], edx
mov eax, dword [0x44c188]
mov dword [ebp - 0x68], eax
mov cx, word [0x44c18c]
mov word [ebp - 0x64], cx
lea edx, [ebp - 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0
push 4
push 0
push 0
push 1
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x404a9a
push 4
push 0x1000
push 0x1f4
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x404a89
push 0
lea ecx, [ebp - 0x60]
push ecx
push 4
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x60], 4
jne 0x404a89
push 0
lea ecx, [ebp - 0x60]
push ecx
push 4
mov edx, dword [ebp - 8]
add edx, 0x940
push edx
mov eax, dword [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x8000
push 0
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [ebp - 8]
cmp dword [edx + 0xb4], 0
jne 0x404abe
push str.sample.png
push 0x3e8
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0xb4]
mov dword [eax + 0x7c], edx
mov eax, dword [ebp - 8]
mov ecx, dword [0x44c124]
mov dword [eax + 0x70], ecx
mov edx, dword [ebp - 8]
mov eax, dword [0x44c12c]
mov dword [edx + 0x80], eax
push 0x8000
push 0
push 0x1000
push 0xffa0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x404bb1
cmp dword [ebp - 4], 0
je 0x404bb1
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x20c], str._rM:
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x404bb1
push 0x88
push 0
lea edx, [ebp - 0x110]
push edx
call fcn.00407560
add esp, 0xc
mov byte [ebp - 0x110], 0x88
push str.Ntdsapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0
je 0x404bb1
push str.DsBindWithCredA
mov eax, dword [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 0
je 0x404ba4
push 0
push 0
push 0
push 0
call dword [ebp - 0x74]
mov dword [ebp - 0x118], eax
cmp dword [ebp - 0x118], 0x57
jne 0x404ba4
mov ecx, dword [ebp - 8]
push ecx
call fcn.00403cde
add esp, 4
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x96
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret