Function at 0x40d0e0
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c4b88
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x4fad60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x54], eax
lea ecx, [ebp + 0xc]
push ecx
lea edx, [ebp + 0x28]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 2
call fcn.0044e150
add esp, 4
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x2c]
mov edi, 8
cmp dword [ebp - 0x18], edi
jae 0x40d13e
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40d1ce
shr eax, 4
not eax
and eax, 1
je 0x40d1ce
cmp dword [ebp - 0x18], edi
jb 0x40d169
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00490a16
add esp, 4
xor ebx, ebx
xor eax, eax
mov esi, 7
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
cmp dword [ebp + 0x20], edi
jb 0x40d18d
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00490a16
add esp, 4
xor edx, edx
mov dword [ebp + 0x20], esi
mov dword [ebp + 0x1c], ebx
mov word [ebp + 0xc], dx
cmp dword [ebp + 0x3c], edi
jb 0x40d1aa
mov eax, dword [ebp + 0x28]
push eax
call fcn.00490a16
add esp, 4
xor ecx, ecx
mov dword [ebp + 0x3c], esi
mov dword [ebp + 0x38], ebx
mov word [ebp + 0x28], cx
cmp dword [ebp + 0x58], edi
jb 0x40d1c7
mov edx, dword [ebp + 0x44]
push edx
call fcn.00490a16
add esp, 4
xor eax, eax
jmp 0x40d462
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x4c], esp
xor ebx, ebx
xor eax, eax
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], ebx
push ebx
lea edx, [ebp + 0x44]
mov word [ecx], ax
push edx
or eax, 0xffffffff
call fcn.00404570
lea esi, [ebp - 0x48]
call fcn.0044c650
add esp, 0x1c
mov byte [ebp - 4], 4
cmp dword [ebp - 0x34], 0x10
mov eax, dword [ebp - 0x48]
jae 0x40d20e
mov eax, esi
sub esp, 0x1c
mov esi, esp
mov ecx, eax
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
mov dword [ebp - 0x4c], esp
mov byte [esi], bl
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
cmp dl, bl
jne 0x40d227
sub ecx, edi
mov edi, ecx
call fcn.00403cd0
mov eax, dword [ebp - 0x54]
push eax
call fcn.00401da0
mov esi, eax
mov dword [ebp - 0x50], ebx
cmp esi, ebx
jne 0x40d2e9
cmp dword [ebp - 0x34], 0x10
jb 0x40d25f
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.00490a16
add esp, 4
mov esi, 8
mov dword [ebp - 0x34], 0xf
mov dword [ebp - 0x38], ebx
mov byte [ebp - 0x48], bl
cmp dword [ebp - 0x18], esi
jb 0x40d282
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00490a16
add esp, 4
xor eax, eax
mov edi, 7
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
cmp dword [ebp + 0x20], esi
jb 0x40d2a4
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00490a16
add esp, 4
xor edx, edx
mov dword [ebp + 0x20], edi
mov dword [ebp + 0x1c], ebx
mov word [ebp + 0xc], dx
cmp dword [ebp + 0x3c], esi
jb 0x40d2c1
mov eax, dword [ebp + 0x28]
push eax
call fcn.00490a16
add esp, 4
xor ecx, ecx
mov dword [ebp + 0x3c], edi
mov dword [ebp + 0x38], ebx
mov word [ebp + 0x28], cx
cmp dword [ebp + 0x58], esi
jb 0x40d1c7
mov edx, dword [ebp + 0x44]
push edx
call fcn.00490a16
add esp, 4
xor eax, eax
jmp 0x40d462
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x40d2f5
lea eax, [ebp - 0x2c]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40d3b2
cmp dword [ebp - 0x34], 0x10
jb 0x40d328
mov eax, dword [ebp - 0x48]
push eax
call fcn.00490a16
add esp, 4
mov esi, 8
mov dword [ebp - 0x34], 0xf
mov dword [ebp - 0x38], ebx
mov byte [ebp - 0x48], bl
cmp dword [ebp - 0x18], esi
jb 0x40d34b
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00490a16
add esp, 4
xor edx, edx
mov edi, 7
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], dx
cmp dword [ebp + 0x20], esi
jb 0x40d36d
mov eax, dword [ebp + 0xc]
push eax
call fcn.00490a16
add esp, 4
xor ecx, ecx
mov dword [ebp + 0x20], edi
mov dword [ebp + 0x1c], ebx
mov word [ebp + 0xc], cx
cmp dword [ebp + 0x3c], esi
jb 0x40d38a
mov edx, dword [ebp + 0x28]
push edx
call fcn.00490a16
add esp, 4
xor eax, eax
mov dword [ebp + 0x3c], edi
mov dword [ebp + 0x38], ebx
mov word [ebp + 0x28], ax
cmp dword [ebp + 0x58], esi
jb 0x40d1c7
mov ecx, dword [ebp + 0x44]
push ecx
call fcn.00490a16
add esp, 4
xor eax, eax
jmp 0x40d462
mov eax, dword [esi]
mov ecx, dword [esi + 4]
push ebx
lea edx, [ebp - 0x50]
push edx
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x34], 0x10
jb 0x40d3de
mov edx, dword [ebp - 0x48]
push edx
call fcn.00490a16
add esp, 4
mov esi, 8
mov dword [ebp - 0x34], 0xf
mov dword [ebp - 0x38], ebx
mov byte [ebp - 0x48], bl
cmp dword [ebp - 0x18], esi
jb 0x40d401
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00490a16
add esp, 4
xor ecx, ecx
mov edi, 7
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], cx
cmp dword [ebp + 0x20], esi
jb 0x40d423
mov edx, dword [ebp + 0xc]
push edx
call fcn.00490a16
add esp, 4
xor eax, eax
mov dword [ebp + 0x20], edi
mov dword [ebp + 0x1c], ebx
mov word [ebp + 0xc], ax
cmp dword [ebp + 0x3c], esi
jb 0x40d440
mov ecx, dword [ebp + 0x28]
push ecx
call fcn.00490a16
add esp, 4
xor edx, edx
mov dword [ebp + 0x3c], edi
mov dword [ebp + 0x38], ebx
mov word [ebp + 0x28], dx
cmp dword [ebp + 0x58], esi
jb 0x40d45d
mov eax, dword [ebp + 0x44]
push eax
call fcn.00490a16
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00490a21
mov esp, ebp
pop ebp
ret