Function at 0x40e5d0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54998d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb0
push esi
push edi
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x10]
push ecx
push edx
mov dword [ebp - 4], 1
mov eax, dword [edx]
mov esi, dword [eax + 0x44]
mov ecx, esi
call dword [0x55f634]
call esi
push dword [ebp - 0x10]
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 0x68
mov edi, eax
lea eax, [ebp - 0xb8]
push 0
push eax
call fcn.004e43a0
mov eax, dword [ebp + 8]
lea edx, [ebp - 0xbc]
add esp, 0xc
mov dword [ebp - 0xbc], 0x6c
mov ecx, dword [eax]
push edx
push eax
mov esi, dword [ecx + 0x58]
mov ecx, esi
call dword [0x55f634]
call esi
push dword [ebp - 0xb4]
push dword [ebp - 0xb0]
push dword [ebp - 0x10]
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
push edi
mov dword [ebp - 0x14], eax
call dword [sym.imp.GDI32.dll_SelectObject]
push 0xcc0020
push 0
push 0
push dword [ebp - 0x10]
mov esi, eax
push dword [ebp - 0xb4]
push dword [ebp - 0xb0]
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
push esi
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edx, dword [ebp + 8]
push dword [ebp - 0x10]
push edx
mov eax, dword [edx]
mov esi, dword [eax + 0x68]
mov ecx, esi
call dword [0x55f634]
call esi
cmp dword [ebp - 0x68], 8
je 0x40e8da
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x30]
call fcn.00402c00
push 0xa
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 2
push eax
push dword [ebp - 0xb0]
xorps xmm0, xmm0
mov byte [ebp - 0x50], 0x20
movups xmmword [ebp - 0x4f], xmm0
mov dword [ebp - 0x37], 0
movq qword [ebp - 0x3f], xmm0
mov byte [ebp - 0x33], 0
call fcn.0052112b
add esp, 0xc
lea ecx, [ebp - 0x30]
push 1
push 0x561b34
call fcn.004062d0
lea ecx, [ebp - 0x50]
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e720
sub ecx, edx
lea eax, [ebp - 0x50]
push ecx
push eax
lea ecx, [ebp - 0x30]
call fcn.004062d0
push 0xa
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0xb4]
call fcn.0052112b
add esp, 0xc
lea ecx, [ebp - 0x30]
push 1
push 0x561b34
call fcn.004062d0
lea ecx, [ebp - 0x50]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e760
sub ecx, edx
lea eax, [ebp - 0x50]
push ecx
push eax
lea ecx, [ebp - 0x30]
call fcn.004062d0
push 0xa
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x68]
call fcn.0052112b
add esp, 0xc
lea ecx, [ebp - 0x30]
push 1
push 0x561b34
call fcn.004062d0
lea ecx, [ebp - 0x50]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e7a0
sub ecx, edx
lea eax, [ebp - 0x50]
push ecx
push eax
lea ecx, [ebp - 0x30]
call fcn.004062d0
mov eax, dword [ebp + 0x24]
test eax, eax
js 0x40e7f7
push 0xa
lea ecx, [ebp - 0x50]
push ecx
push eax
call fcn.0052112b
add esp, 0xc
lea ecx, [ebp - 0x30]
push 1
push 0x561b34
call fcn.004062d0
lea ecx, [ebp - 0x50]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e7e1
sub ecx, edx
lea eax, [ebp - 0x50]
push ecx
push eax
lea ecx, [ebp - 0x30]
call fcn.004062d0
push 4
push str..bmp
lea ecx, [ebp - 0x30]
call fcn.004062d0
mov esi, dword [ebp + 0x38]
cmp esi, 1
jbe 0x40e88d
mov ecx, dword [ebp + 0x3c]
lea eax, [ebp + 0x28]
mov edx, dword [ebp + 0x28]
cmp ecx, 0x10
cmovae eax, edx
cmp byte [esi + eax - 1], 0x5c
je 0x40e839
push 1
push 0x561b40
lea ecx, [ebp + 0x28]
call fcn.004062d0
mov ecx, dword [ebp + 0x3c]
mov edx, dword [ebp + 0x28]
cmp ecx, 0x10
lea eax, [ebp + 0x28]
cmovae eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40e871
push 2
push 0x561b44
lea ecx, [ebp + 0x28]
call fcn.00406430
push str.Invalid_Direcotry_path_provided.._Creating_File_in_current_folder
push 0x4e20
push 0xe
call fcn.004204c0
add esp, 0xc
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
push dword [ebp - 0x20]
cmovae eax, dword [ebp - 0x30]
lea ecx, [ebp + 0x28]
push eax
call fcn.004062d0
lea eax, [ebp + 0x28]
jmp 0x40e890
lea eax, [ebp - 0x30]
push dword [ebp - 0x14]
sub esp, 0x18
mov ecx, esp
push eax
call fcn.00402c00
mov ecx, dword [ebp - 0x18]
call fcn.0040e410
mov edx, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x40e8da
mov ecx, dword [ebp - 0x30]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40e8d0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e95e
push edx
push ecx
call fcn.004c824c
add esp, 8
mov edx, dword [ebp + 0x20]
cmp edx, 0x10
jb 0x40e90a
mov ecx, dword [ebp + 0xc]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40e900
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e963
push edx
push ecx
call fcn.004c824c
add esp, 8
mov edx, dword [ebp + 0x3c]
mov dword [ebp + 0x1c], 0
mov dword [ebp + 0x20], 0xf
mov byte [ebp + 0xc], 0
cmp edx, 0x10
jb 0x40e94c
mov ecx, dword [ebp + 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40e942
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e963
push edx
push ecx
call fcn.004c824c
add esp, 8
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret 0x38
call fcn.004f1161
call fcn.004f1161
int3